Bug 12617

Summary: thread library bug
Product: Base System Reporter: nara <nara>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description nara 1999-07-13 03:10:01 UTC
i used gdb on mysql and find quite interesting result.
here is log from gdb.
 
arch9# gdb /usr/local/libexec/mysqld mysqld.core
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd"...
(no debugging symbols found)...
Core was generated by `mysqld'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc_r.so.3...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libstdc++.so.2...(no debugging symbols found)...
done.
Reading symbols from /usr/lib/libm.so.2...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libc.so.3...(no debugging symbols found)...done.
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols found)...
done.
#0  0x281531f1 in _mutex_notify_priochange () from /usr/lib/libc_r.so.3
(gdb) up
#1  0x28152323 in pthread_mutex_lock () from /usr/lib/libc_r.so.3
(gdb) up
#2  0x28162aa9 in localtime_r () from /usr/lib/libc_r.so.3
(gdb) up
#3  0x8064d18 in Field_timestamp::val_str ()
(gdb) up
#4  0x804b88a in Item_field::str ()
(gdb) 
 
it seems to me that there is VERY SERIOUS problem in libc_r and thread library.
it was fine in RELEASE-3.1, but, in RELEASE-3.2, it isn't.
 
 
Jiho Kim
nara@magewar.com
http://archmage.magewar.com/archmage

How-To-Repeat: do heavy load on mysql
Comment 1 Daniel Eischen freebsd_committer freebsd_triage 1999-08-04 12:52:59 UTC
State Changed
From-To: open->feedback

Statically allocated mutexes and condition variables were 
not properly initialized.  This was fixed in -current at 
the time the PR was submitted, but was not commited to 
-stable until recently. 

I have tested localtime_r and it works as expected (no SIGSEGV). 
I will close this PR in a week or so if I don't hear back from 
the originator. 
Comment 2 Daniel Eischen freebsd_committer freebsd_triage 1999-08-12 21:08:19 UTC
State Changed
From-To: feedback->closed

No response during feedback state and my testing shows the problem has 
been fixed.