I have a program using berkeley db as data store, and when the program finishes its job and exits, it triggers berkeley db to close.
Ok, here is the problem. Nine times out of ten, my Linux system goes down when berkeley db is closing. By goes down, I mean linux shell cannot respond to any linux command (ls,top,ps...) I typed in, just like the system is dead.
According to berkeley db's api of close, it will flash all the data in cache back to disk. But I wonder how could the db-closing make my system halt? Does berkeley db spawn lots of threads or takes up too much cpu when closing?