-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: WT2.9.3, WT3.0.0
-
Component/s: None
-
None
Our previous update attempt (https://jira.mongodb.org/browse/WT-3504 unable to link issue) was unsuccessful. Now we are trying to update up to 3.0.0 and met similar issue, after debugging 3.0.0 we've finally understood that problem probably not in checkpoint process. The application pools a lot of cursors in a single session, experimentally we've find out that 2.9.3+ versions goes to deadlock creating 65534+ cursors
Snippet to reproduce
import os from wiredtiger import wiredtiger os.system('rm -rf WT_HOME') os.makedirs('WT_HOME') conn = wiredtiger.wiredtiger_open('WT_HOME', 'create,cache_size=30MB,statistics=(all,clear),statistics_log=(wait=30)') session = conn.open_session() session.create('table:T','key_format=u,value_format=u,prefix_compression=true,block_compressor=snappy,columns=(key,value)') pool = [session.open_cursor('table:T') for i in range(65536)] print 'done'
'done' does not apear in versions 2.9.3+, but 2.9.2 (tried to open 200000 cursors per session) works fine. Also give me advice please is it better to pool many session or is it fine to work in single session?
(gdb) bt #0 0x00007fe7f58b51f6 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0 #1 0x00007fe7edc2eb7c in __wt_cond_wait_signal () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #2 0x00007fe7edc65d30 in __wt_cond_wait () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #3 0x00007fe7edc6615b in __wt_readlock () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #4 0x00007fe7edc5f444 in __wt_session_lock_dhandle () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #5 0x00007fe7edc60089 in __wt_session_get_dhandle () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #6 0x00007fe7edc4c5ea in __wt_schema_get_table_uri () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #7 0x00007fe7edcf33d7 in __wt_curtable_open () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #8 0x00007fe7edc549f5 in __session_open_cursor_int () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #9 0x00007fe7edc5537f in __session_open_cursor () from /usr/lib64/python2.7/site-packages/wiredtiger/_wiredtiger.so #10 0x00007fe7edbf4669 in _wrap_Session_open_cursor (self=<optimized out>, args=<optimized out>) at lang/python/wiredtiger_wrap.c:6409 #11 0x00007fe7f5c2dd38 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0 #12 0x00007fe7f5c2f288 in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0 #13 0x00007fe7f5c2f499 in PyEval_EvalCode () from /lib64/libpython2.7.so.1.0 #14 0x00007fe7f5c3578f in run_mod () from /lib64/libpython2.7.so.1.0 #15 0x00007fe7f5c3573a in PyRun_FileExFlags () from /lib64/libpython2.7.so.1.0 #16 0x00007fe7f5c3562e in PyRun_SimpleFileExFlags () from /lib64/libpython2.7.so.1.0 #17 0x00007fe7f5c3b8ce in Py_Main () from /lib64/libpython2.7.so.1.0 #18 0x00007fe7f4d8900a in __libc_start_main () from /lib64/libc.so.6 #19 0x000055ac8d47f78a in _start ()