Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deadlock in Berkley DB #66

Open
ruffinakoza opened this issue Mar 10, 2020 · 0 comments
Open

Deadlock in Berkley DB #66

ruffinakoza opened this issue Mar 10, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@ruffinakoza
Copy link
Member

An attempt to sync Fenia DB coincided with periodic archive script that runs db_checkpoint -1 && db_archive -d && db_dump fenia |bzip2 > ../fenia.dump.tbz2. Resulting stack trace:

#0  0x00007f45bb2359f3 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007f45bba008ab in __db_pthread_mutex_lock () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#2  0x00007f45bbaa858f in __lock_get_internal () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#3  0x00007f45bbaa8ef6 in __lock_get () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#4  0x00007f45bbad3c7a in __db_lget () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#5  0x00007f45bba1d01c in __bam_search () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#6  0x00007f45bba084db in ?? () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#7  0x00007f45bba0cbeb in ?? () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#8  0x00007f45bbac12b1 in __dbc_iput () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#9  0x00007f45bbabc460 in __db_put () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#10 0x00007f45bbad1f9b in __db_put_pp () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#11 0x00007f45bb9f386f in Db::put(DbTxn*, Dbt*, Dbt*, unsigned int) () from /usr/lib/x86_64-linux-gnu/libdb_cxx-5.3.so
#12 0x00007f45bc7df762 in DbContext::put (this=this@entry=0x557f6ba58eb8, k=<optimized out>, k@entry=4179398893, dat=...) at ../../../dreamland_code/src/io/txncontext.cpp:383
#13 0x00007f45bc798112 in Scripting::Object::Manager::put (this=this@entry=0x557f6ba58eb8, id=4179398893, 
    s="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<object type=\"ObjectWrapper\">\n  <guts>\n    <temperature>\n      <backref regtype=\"object\">-115568403</backref>\n      <target regtype=\"number\">20</target>\n    </te"...) at ../../../dreamland_code/src/fenia/object.cpp:221
#14 0x00007f45bc7997ea in Scripting::Object::save (this=0x557f70c4de40) at ../../../dreamland_code/src/fenia/object.cpp:124
#15 0x00007f45bc799cf9 in Scripting::Object::Manager::syncPut (this=this@entry=0x557f6ba58eb8, finishAt=finishAt@entry=0x7ffeab07afd0)
    at ../../../dreamland_code/src/fenia/object.cpp:245
#16 0x00007f45bc799db3 in Scripting::Object::Manager::sync (this=0x557f6ba58eb8, tickEnd=<optimized out>) at ../../../dreamland_code/src/fenia/object.cpp:304
#17 0x00007f45bcae924a in DreamLand::pulseEnd (this=this@entry=0x7ffeab07b100) at ../../dreamland_code/src/dreamland.cpp:200
#18 0x00007f45bcae9744 in DreamLand::run (this=0x7ffeab07b100) at ../../dreamland_code/src/dreamland.cpp:169
#19 0x0000557f69ca8f84 in main (argc=<optimized out>, argv=0x7ffeab07b5d8) at ../../dreamland_code/src/main.cpp:38

Lock wasn't released even after db_dump process was killed externally.

@ruffinakoza ruffinakoza added the bug Something isn't working label Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant