httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reyad Attiyat <reyad.atti...@gmail.com>
Subject Re: Stuck on DBD DSO Lock
Date Tue, 05 Feb 2013 18:03:39 GMT
The apr_dbd_get_driver call blocks in the child process  I should also note
this doesn't block when I'm running apache in debug (-X) and that I'm using
apache 2.4 with the event mpm.

Here is some backtrace. It is the same in each child process.

(gdb) backtrace
#0  __lll_lock_wait () at
../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:136
#1  0x000000315ca09c56 in _L_lock_840 () from /lib64/libpthread.so.0
#2  0x000000315ca09b58 in __pthread_mutex_lock (mutex=0x21bc2a8) at
pthread_mutex_lock.c:65
#3  0x00007f59a0124739 in apr_thread_mutex_lock (mutex=<optimized out>)
    at locks/unix/thread_mutex.c:92
#4  0x00007f59a03578fc in apu_dso_mutex_lock () at misc/apu_dso.c:46
#5  0x00007f59a034e036 in apr_dbd_get_driver (pool=pool@entry=0x21c2138,
    name=0x7f599b1ea21c "mysql", driver=0x230ee40) at dbd/apr_dbd.c:167
#6  0x00007f599b1e4e8b in connect_database (db_pool=0x21c2138,
    error_messages=0x7f599a7c7000, dbd_config=dbd_config@entry=0x2273940)
    at database/dbd.c:35
#7  0x00007f599b1e3b96 in mediaplayer_child_init (child_pool=0x2311418,
s=0x2270e30)
    at mod_mediaplayer.c:294
#8  0x000000000044f539 in ap_run_child_init ()
#9  0x000000000047508a in child_main ()
#10 0x0000000000475466 in make_child ()
#11 0x0000000000475527 in startup_children ()
#12 0x0000000000475f11 in event_run ()
#13 0x000000000043088c in ap_run_mpm ()
#14 0x0000000000429472 in main ()
(gdb)



On Tue, Feb 5, 2013 at 11:20 AM, Nick Kew <niq@apache.org> wrote:

>
> On 5 Feb 2013, at 16:51, Reyad Attiyat wrote:
>
> > Hello modules-dev,
> > Was not sure if I should post in this mailing list or apr but I
> > have trouble using apr-util and the mysql dbd driver. In my apache
> module i
> > make several mysql connections using the apr dbd functions. I make one
> > connection in the postconfig hook where I perform a directory
> > syncronization with file metadata to the database. This is done in a
> thread
> > and works fine. Next I connect in the child init hook. This is where
> > apr_dbd_mysql blocks on a pthread lock.
>
> What particular call blocks?
> I take it you're using matching apr_dbd_open and apr_dbd_close
> calls in all these (startup-time) functions?
>
> --
> Nick Kew
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message