[odb-users] Deadlock in apache module that uses odb-mysql?

Boris Kolpackov boris at codesynthesis.com
Wed Apr 29 12:37:47 EDT 2015


Hi Val,

I did some digging and it appears something is going wrong with
MySQL threading initialization when done from an apache module.
The code in question (i.e., nptl_pthread_exit_hack_handler() in
the stack trace) itself is dealing with (allegedly) a bug in
NPTL. Here is the comment from my_thr_init.c:

  /*                                                                  
    BUG#24507: Race conditions inside current NPTL pthread_exit()     
    implementation.                                                   
                                                                      
    To avoid a possible segmentation fault during concurrent          
    executions of pthread_exit(), a dummy thread is spawned which     
    initializes internal variables of pthread lib. See bug description
    for a full explanation.                                           
                                                                      
    TODO: Remove this code when fixed versions of glibc6 are in common
    use.                                                              
  */

Also, generally, from our experience, MySQL multi-threading support
is a huge mess. See the comment at the beginning of libodb-mysql/odb/
mysql/connection-factory.cxx for the kind of hacks we have to resort
to make it work.

Note also that while we could reproduce this problem with 5.5.37-
MariaDB, it seem to have been fixed in 10.0.17-MariaDB.

Boris



More information about the odb-users mailing list