[odb-users] Deadlock in apache module that uses odb-mysql?
Val Hendrix
vchendrix at lbl.gov
Tue Apr 28 15:54:36 EDT 2015
Hello,
Details of my system:
- OS - Scientific Linux 7 - Linux vagrant 3.10.0-229.1.2.el7.x86_64 #1
SMP Thu Mar 26 09:10:25 CDT 2015 x86_64 x86_64 x86_64 GNU/Linux
- ODB - 2.3.0-6.el7
- DB - Maria DB 1:5.5.41-2.el7_0
- Apache - httpd.x86_64 2.4.6-31.sl7
I am a new user to ODB. On my project we are integrating ODB into our an
existing application that is deployed as an apache module. I have created
a working version of ODB classes that map to our database schema. I wrote
integration tests that creates, queries and deletes data.
When I try to register a simple apache module that links to the odb-mysql
library, the apache web server hangs on start up. Executing pstack on the
apache process that is starting up shows the following trace. It looks
like there is a dead lock but I am unfamiliar with these libraries. Can
someone shed some light on what is the problem? I have confirmed that
libmysqlclient is indeed reentrant.
*$ sudo pstack 5457*
*Thread 2 (Thread 0x7f2a6fbb5700 (LWP 5458)):*
*#0 0x00007f2a734bef7d in __lll_lock_wait () from /lib64/libpthread.so.0*
*#1 0x00007f2a734bad5c in _L_lock_839 () from /lib64/libpthread.so.0*
*#2 0x00007f2a734bac79 in pthread_mutex_lock () from
/lib64/libpthread.so.0*
*#3 0x00007f2a746591ee in _dl_open () from /lib64/ld-linux-x86-64.so.2*
*#4 0x00007f2a7301c992 in do_dlopen () from /lib64/libc.so.6*
*#5 0x00007f2a74655314 in _dl_catch_error () from
/lib64/ld-linux-x86-64.so.2*
*#6 0x00007f2a7301ca52 in __libc_dlopen_mode () from /lib64/libc.so.6*
*#7 0x00007f2a734c0853 in pthread_cancel_init () from
/lib64/libpthread.so.0*
*#8 0x00007f2a734c0a1c in _Unwind_ForcedUnwind () from
/lib64/libpthread.so.0*
*#9 0x00007f2a734bed90 in __pthread_unwind () from /lib64/libpthread.so.0*
*#10 0x00007f2a734b9e15 in pthread_exit () from /lib64/libpthread.so.0*
*#11 0x00007f2a71ab6c9b in nptl_pthread_exit_hack_handler () from
/usr/lib64/mysql/libmysqlclient.so.18*
*#12 0x00007f2a734b8df3 in start_thread () from /lib64/libpthread.so.0*
*#13 0x00007f2a72fe21ed in clone () from /lib64/libc.so.6*
*Thread 1 (Thread 0x7f2a74851780 (LWP 5457)):*
*#0 0x00007f2a734b9f37 in pthread_join () from /lib64/libpthread.so.0*
*#1 0x00007f2a71ab7857 in my_thread_global_init () from
/usr/lib64/mysql/libmysqlclient.so.18*
*#2 0x00007f2a71ab53af in my_init () from
/usr/lib64/mysql/libmysqlclient.so.18*
*#3 0x00007f2a71a7c91c in mysql_server_init () from
/usr/lib64/mysql/libmysqlclient.so.18*
*#4 0x00007f2a7218a226 in mysql_process_init (this=0x7f2a723a3784
<odb::mysql::(anonymous namespace)::mysql_process_init_>) at
connection-factory.cxx:113*
*#5 __static_initialization_and_destruction_0 (__initialize_p=1,
__priority=65535) at connection-factory.cxx:128*
*#6 _GLOBAL__sub_I_connection_factory.cxx(void) () at
connection-factory.cxx:316*
*#7 0x00007f2a74655503 in _dl_init_internal () from
/lib64/ld-linux-x86-64.so.2*
*#8 0x00007f2a74659b44 in dl_open_worker () from
/lib64/ld-linux-x86-64.so.2*
*#9 0x00007f2a74655314 in _dl_catch_error () from
/lib64/ld-linux-x86-64.so.2*
*#10 0x00007f2a7465925b in _dl_open () from /lib64/ld-linux-x86-64.so.2*
*#11 0x00007f2a732ae02b in dlopen_doit () from /lib64/libdl.so.2*
*#12 0x00007f2a74655314 in _dl_catch_error () from
/lib64/ld-linux-x86-64.so.2*
*#13 0x00007f2a732ae62d in _dlerror_run () from /lib64/libdl.so.2*
*#14 0x00007f2a732ae0c1 in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2*
*#15 0x00007f2a736dfb2d in apr_dso_load () from /lib64/libapr-1.so.0*
*#16 0x000000000047c707 in load_file ()*
*#17 0x0000000000441be7 in invoke_cmd ()*
*#18 0x0000000000442e71 in execute_now ()*
*#19 0x00000000004421f1 in ap_build_config_sub ()*
*#20 0x000000000044284a in ap_build_config ()*
*#21 0x0000000000443564 in process_resource_config_nofnmatch ()*
*#22 0x0000000000443964 in ap_process_resource_config ()*
*#23 0x0000000000436866 in include_config ()*
*#24 0x000000000044152e in invoke_cmd ()*
*#25 0x0000000000442e71 in execute_now ()*
*#26 0x00000000004421f1 in ap_build_config_sub ()*
*#27 0x000000000044284a in ap_build_config ()*
*#28 0x0000000000443564 in process_resource_config_nofnmatch ()*
*#29 0x00000000004436a7 in ap_process_resource_config ()*
*#30 0x00000000004445a0 in ap_read_config ()*
*#31 0x0000000000425d54 in main ()*
Thanks!
Val
More information about the odb-users
mailing list