apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viktor Griph <vik...@griph.se>
Subject DBD mysql driver segfault on cleanup when used together with legacy modules in apache using mysql
Date Wed, 28 Oct 2009 09:41:23 GMT
There is a possiblility that the mysql library has been unloaded by
the DSO loader before the cleanup function that tries to call
mysql_thread_end() is called, casusing a segmentation fault. In my
particular usecase I've been trying to use a module using a dbd
backend for mysql together with the module mod_auth_mysql. The mysql
library is dynamically linked when the mod_auth_mysql is loaded, and
is unlikned before the cleanup in mod_dbd_mysql is called, leaving a
call to an unloaded library.


Backtrace of the crash:
[Switching to Thread 0xb7d02b50 (LWP 16503)]
0xb7add81d in ?? ()
(gdb) bt
#0  0xb7add81d in ?? ()
#1  0xb7c44787 in thread_end (data=0x0) at dbd/apr_dbd_mysql.c:1260
#2  0xb7eb9fcb in apr_pool_destroy (pool=0x954a090)
    at memory/unix/apr_pools.c:2314
#3  0xb7eba22d in apr_pool_terminate () at memory/unix/apr_pools.c:605
#4  0xb7ebc16a in apr_terminate () at misc/unix/start.c:82
#5  0x08065a59 in destroy_and_exit_process (process=0x954e130,
    process_exit_value=0) at main.c:271
#6  0x08066b78 in main (argc=Cannot access memory at address 0x0
) at main.c:654

/Viktor

Mime
View raw message