dannote / mod-ndb

Automatically exported from code.google.com/p/mod-ndb
0 stars 0 forks source link

segfault on solaris -- "trying to lock uninitialized mutex" #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
safe_mutex: Trying to lock unitialized mutex at my_thr_init.c, line 286

(gdb) break ndb_thread_wrapper
Breakpoint 1 at 0xfec51465: file NdbThread.c, line 62.
(gdb) run 
Starting program: /usr/local/apache13/bin/httpd -X -f /export/home/jdd/ndb-gcc-
src/mod_ndb/httpd.conf 
warning: Lowest section in /lib/libpthread.so.1 is .dynamic at 00000074
warning: Lowest section in /lib/libthread.so.1 is .dynamic at 00000074
[Thu Aug 30 16:11:50 2007] [debug] config.cc(696): N-SQL query: SELECT id, 
name, color, 
nvisits, channel FROM typ1  SCAN ORDERED INDEX channel ORDER ASC\n;
[Thu Aug 30 16:11:50 2007] [debug] config.cc(696): N-SQL query: SELECT i, d1, 
d2, d3, d4 from 
typ3 where primary key = i;
[Thu Aug 30 16:11:50 2007] [debug] config.cc(696): N-SQL query: SELECT i, d1, 
d2, d3, d4 from 
typ3 scan table;
[Thu Aug 30 16:11:50 2007] [alert] httpd: Could not determine the server's 
fully qualified 
domain name, using 10.5.12.60 for ServerName
warning: Temporarily disabling breakpoints for unloaded shared library 
"/export/home/jdd/mysql-builds/5121ndb/lib/mysql/libndbclient.so.3"
warning: Lowest section in /lib/libthread.so.1 is .dynamic at 00000074
[New LWP 1]
[New LWP 2]
[New LWP 3]
[Switching to LWP 2]

Breakpoint 1, ndb_thread_wrapper (_ss=0x80e7f70) at NdbThread.c:62
62        my_thread_init();
(gdb) step
my_thread_init () at my_thr_init.c:246
246       my_bool error=0;
(gdb) 
254       if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys))
(gdb) 
262       if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
(gdb) 
267       pthread_setspecific(THR_KEY_mysys,tmp);
(gdb) 
280       tmp->pthread_self= pthread_self();
(gdb) 
[New LWP    4        ]
[New Thread 3 (LWP 3)]
[Switching to Thread 3 (LWP 3)]

Breakpoint 1, ndb_thread_wrapper (_ss=0x80e7fe8) at NdbThread.c:62
62        my_thread_init();
(gdb) 
my_thread_init () at my_thr_init.c:246
246       my_bool error=0;
(gdb) 
254       if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys))
(gdb) 
[Switching to Thread 2 (LWP 2)]
282       pthread_mutex_init(&tmp->mutex,MY_MUTEX_INIT_FAST);
(gdb) 
safe_mutex_init (mp=0x80d696c, attr=0x0, file=0x80d696c "", line=135096684) at 
thr_mutex.c:59
59        bzero((char*) mp,sizeof(*mp));
(gdb) 
60        pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK);
(gdb) 
0xfee05ab2 in _ti_bind_guard () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_guard, 
which has no line number information.
0xfee05b00 in _ti_bind_clear () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_clear, 
which has no line number information.
0xfedf8320 in pthread_mutex_init () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function pthread_mutex_init, 
which has no line number information.
safe_mutex_init (mp=0x80d696c, attr=0x0, file=0x0, line=0) at thr_mutex.c:61
61        pthread_mutex_init(&mp->mutex,attr);
(gdb) 
63        mp->file= file;
(gdb) 
64        mp->line= line;
(gdb) 
88        thread_safe_increment(safe_mutex_count, &THR_LOCK_mutex);
(gdb) 
0xfee05ab2 in _ti_bind_guard () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_guard, 
which has no line number information.
0xfee05b00 in _ti_bind_clear () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_clear, 
which has no line number information.
0xfee00be5 in pthread_mutex_lock () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function pthread_mutex_lock, 
which has no line number information.
0xfee05ab2 in _ti_bind_guard () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_guard, 
which has no line number information.
0xfee05b00 in _ti_bind_clear () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_clear, 
which has no line number information.
0xfee01085 in pthread_mutex_unlock () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function pthread_mutex_unlock, 
which has no line number information.
safe_mutex_init (mp=0x80d696c, attr=0x0, file=0x0, line=0) at thr_mutex.c:90
90        return 0;
(gdb) 
91      }
(gdb) 
my_thread_init () at my_thr_init.c:283
283       pthread_cond_init(&tmp->suspend, NULL);
(gdb) 
284       tmp->init= 1;
(gdb) 
286       pthread_mutex_lock(&THR_LOCK_threads);
(gdb) 
safe_mutex_lock (mp=0xfed11040, file=0xfece961d "my_thr_init.c", line=286) at 
thr_mutex.c:97
97        if (!mp->file)
(gdb) 
99          fprintf(stderr,
(gdb) 
102         fflush(stderr);
(gdb) 
103         abort();
(gdb) 
0xfee05ab2 in _ti_bind_guard () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_guard, 
which has no line number information.
0xfee05b00 in _ti_bind_clear () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function _ti_bind_clear, 
which has no line number information.
0xfeda0cd0 in abort () from /lib/libc.so.1
(gdb) 
Single stepping until exit from function abort, 
which has no line number information.
[New Thread 4 (LWP 4)]
[Switching to Thread 4 (LWP 4)]

Breakpoint 1, ndb_thread_wrapper (_ss=0x80e8010) at NdbThread.c:62
62        my_thread_init();
(gdb) 
my_thread_init () at my_thr_init.c:246
246       my_bool error=0;
(gdb) 
254       if (my_pthread_getspecific(struct st_my_thread_var *,THR_KEY_mysys))
(gdb) 
262       if (!(tmp= (struct st_my_thread_var *) calloc(1, sizeof(*tmp))))
(gdb) 
267       pthread_setspecific(THR_KEY_mysys,tmp);
(gdb) 
280       tmp->pthread_self= pthread_self();
(gdb) 
282       pthread_mutex_init(&tmp->mutex,MY_MUTEX_INIT_FAST);
(gdb) 
safe_mutex_init (mp=0x80ff294, attr=0x0, file=0x80ff294 "", line=135262868) at 
thr_mutex.c:59
59        bzero((char*) mp,sizeof(*mp));
(gdb) 
60        pthread_mutex_init(&mp->global,MY_MUTEX_INIT_ERRCHK);
(gdb) 
61        pthread_mutex_init(&mp->mutex,attr);
(gdb) 

Program received signal SIGABRT, Aborted.
[Switching to Thread 2 (LWP 2)]
0xfee08567 in _lwp_kill () from /lib/libc.so.1

Original issue reported on code.google.com by john.david.duncan on 30 Aug 2007 at 11:15

GoogleCodeExporter commented 9 years ago
Maybe related to mysql bug 30274?

http://bugs.mysql.com/bug.php?id=30274

If so, it's in 5.1.21-debug only.

Original comment by john.david.duncan on 31 Aug 2007 at 5:04

GoogleCodeExporter commented 9 years ago
I confirmed that I *cannot* reproduce this problem using a non-debug build of 
mysql 5.1.21

Original comment by john.david.duncan on 31 Aug 2007 at 6:16

GoogleCodeExporter commented 9 years ago
Marked as "Won't Fix" assuming it's a mysql issue.

Original comment by john.david.duncan on 2 Sep 2007 at 5:22