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 close make my system halt? Does Berkeley DB spawn lots of threads or takes up too much CPU when closing?