[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libssh 0.8.1 breaks amarok



----- Original Message -----
> From: "Antonio Rojas" <arojas@xxxxxxxxxxxxx>
> To: libssh@xxxxxxxxxx
> Sent: Tuesday, August 21, 2018 8:00:43 PM
> Subject: Re: libssh 0.8.1 breaks amarok
> 
> El martes, 21 de agosto de 2018 19:22:18 (CEST) Andreas Schneider escribió:
> > 
> > FYI:
> > 
> > mysql_library_init() is an alias for mysql_server_init() which calls
> > pthread_once(). pthread_once() returns an error. Would be interesting which
> > errno it returns!
> 
> We are still on mariadb 10.1, which is significantly different. Here is the
> full trace of the amarok mysql_server_init call:
> 
> Thread 1 "amarok" hit Breakpoint 1, mysql_server_init (argc=9,
> argv=0x555555d29b98, groups=0x0) at
> /usr/src/debug/mariadb-10.1.35/libmysql/libmysql.c:130
> 132     in /usr/src/debug/mariadb-10.1.35/libmysql/libmysql.c
> 133     in /usr/src/debug/mariadb-10.1.35/libmysql/libmysql.c
> 134     in /usr/src/debug/mariadb-10.1.35/libmysql/libmysql.c
> my_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_init.c:78
> 80      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 81      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 82      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 83      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 86      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 89      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 92      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> init_glob_errs () at /usr/src/debug/mariadb-10.1.35/mysys/errors.c:64
> my_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_init.c:94
> 96      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 98      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 99      in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> 103     in /usr/src/debug/mariadb-10.1.35/mysys/my_init.c
> my_mutex_init () at /usr/src/debug/mariadb-10.1.35/mysys/thr_mutex.c:94
> 101     in /usr/src/debug/mariadb-10.1.35/mysys/thr_mutex.c
> 102     in /usr/src/debug/mariadb-10.1.35/mysys/thr_mutex.c
> 0x00007ffff3020440 in pthread_mutexattr_settype () from
> /usr/lib/libpthread.so.0
> Single stepping until exit from function pthread_mutexattr_settype,
> which has no line number information.
> my_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_init.c:105
> my_thread_global_init () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:168
> 170     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 179     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 185     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 188     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> my_thread_init_internal_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:188
> 188     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed680
> <THR_LOCK_threads>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed680 <THR_LOCK_threads>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed680
> <THR_LOCK_threads>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_internal_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:95
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed6c0
> <THR_LOCK_malloc>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed6c0 <THR_LOCK_malloc>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed6c0
> <THR_LOCK_malloc>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_internal_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:96
> inline_mysql_cond_init (attr=0x0, that=0x7fffa75ed740 <THR_COND_threads>,
> key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:1114
> init_cond_noop (key=0, identity=0x7fffa75ed740 <THR_COND_threads>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:113
> inline_mysql_cond_init (attr=0x0, that=0x7fffa75ed740 <THR_COND_threads>,
> key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:1118
> my_thread_global_init () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:190
> my_thread_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:275
> 275     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 282     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 295     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 300     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 301     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 302     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> my_thread_init_thr_mutex (var=0x555555d78320) at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:302
> 302     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 109     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> inline_mysql_mutex_init (attr=<optimized out>, that=0x555555d78360, key=0) at
> /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x555555d78360) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x555555d78360,
> key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_thr_mutex (var=0x555555d78320) at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:110
> inline_mysql_cond_init (attr=0x0, that=0x555555d78328, key=<optimized out>)
> at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:1114
> init_cond_noop (key=0, identity=0x555555d78328) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:113
> inline_mysql_cond_init (attr=0x0, that=0x555555d78328, key=<optimized out>)
> at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:1118
> my_thread_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:304
> 307     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> inline_mysql_mutex_lock (that=0x7fffa75ed680 <THR_LOCK_threads>,
> src_file=0x7fffa67f7dc8
> "/build/mariadb/src/mariadb-10.1.35/mysys/my_thr_init.c",
>     src_line=307) at
>     /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:662
> my_thread_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:307
> inline_mysql_mutex_lock (that=0x7fffa75ed680 <THR_LOCK_threads>,
> src_file=0x7fffa67f7dc8
> "/build/mariadb/src/mariadb-10.1.35/mysys/my_thr_init.c",
>     src_line=307) at
>     /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:693
> 696     in /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h
> my_thread_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:308
> 309     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> 310     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> inline_mysql_mutex_unlock (that=0x7fffa75ed680 <THR_LOCK_threads>) at
> /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:756
> 765     in /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h
> my_thread_init () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:311
> my_thread_global_init () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:193
> 193     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> get_thread_lib () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:193
> 193     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> confstr (__len=64, __buf=0x7fffffffdce0 "\b\336\377\377\377\177", __name=3)
> at /usr/include/bits/unistd.h:250
> 250       return __confstr_alias (__name, __buf, __len);
> get_thread_lib () at /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:467
> 195     in /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed780
> <THR_LOCK_lock>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed780 <THR_LOCK_lock>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed780
> <THR_LOCK_lock>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:62
> inline_mysql_mutex_init (attr=0x0, that=0x7fffa75ed600 <THR_LOCK_myisam>,
> key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed600 <THR_LOCK_myisam>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=0x0, that=0x7fffa75ed600 <THR_LOCK_myisam>,
> key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:63
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed700
> <THR_LOCK_myisam_mmap>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed700 <THR_LOCK_myisam_mmap>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed700
> <THR_LOCK_myisam_mmap>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:64
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed7c0
> <THR_LOCK_heap>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed7c0 <THR_LOCK_heap>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed7c0
> <THR_LOCK_heap>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:65
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed640
> <THR_LOCK_net>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed640 <THR_LOCK_net>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed640
> <THR_LOCK_net>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/mysys/my_thr_init.c:66
> inline_mysql_mutex_init (attr=<optimized out>, that=0x7fffa75ed840
> <THR_LOCK_charset>, key=<optimized out>)
>     at /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:616
> init_mutex_noop (key=0, identity=0x7fffa75ed840 <THR_LOCK_charset>) at
> /usr/src/debug/mariadb-10.1.35/mysys/psi_noop.c:91
> my_thread_init_common_mutex () at
> /usr/src/debug/mariadb-10.1.35/include/mysql/psi/mysql_thread.h:625
> 

Thank you again for the traces. Apparently, the execution is interrupted due to an error in:

https://github.com/MariaDB/server/blob/10.1/libmysql/libmysql.c#L134

We can see the execution reached the call in:

https://github.com/MariaDB/server/blob/10.1/mysys/my_init.c#L105

inside my_thread_global_init, it reaches:

https://github.com/MariaDB/server/blob/10.1/mysys/my_thr_init.c#L195

So, I believe my_thread_global_init() should return zero. But it is not the case, since the execution do not continue further. I am still trying to figure out how is it possible.
I will try to create a smaller reproducer to be able to debug faster.

References:
libssh 0.8.1 breaks amarokAntonio Rojas <arojas@xxxxxxxxxxxxx>
Re: libssh 0.8.1 breaks amarokAnderson Sasaki <ansasaki@xxxxxxxxxx>
Re: libssh 0.8.1 breaks amarokAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: libssh 0.8.1 breaks amarokAntonio Rojas <arojas@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org