Subject: Re: FreeAmp & pthread
To: Nick Hudson <skrll@netbsd.org>
From: Rui-Xiang Guo <rxg@ms25.url.com.tw>
List: netbsd-help
Date: 05/14/2002 19:33:57
> > Yes, when I comment it, I can build FreeAmp successfally.
> > But I am not lucky enough because I just got core dumped with such message:
> >
> > FreeAmp has been compiled with mutex debugging enabled.
> > To dump mutex info: kill -SIGUSR1 15620
> >
> > So I think we should define _POSIX_THREAD_SYSCALL_SOFT or wait for your
> > work about _POSIX_THREAD_SYSCALL_HARD, am I wrong?
>
> I doubt _POSIX_THREAD_SYSCALL_HARD would make any difference to your core
> dump problem.
Well, I think your doubt is correct.
Here are some debug messages:
[...]
Program received signal SIGUSR1, User defined signal 1.
0x48281307 in __sigsuspend14 () from /usr/lib/libc.so.12
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
0x8133a5e in _gdbm_findkey (dbf=0x0, key={
dptr = 0x813c020 "FREEAMP_DATABASE_VERSION", dsize = 25},
dptr=0xbfbfd1a8, new_hash_val=0xbfbfd1a4) at lib/gdbm/findkey.c:105
105 _gdbm_get_bucket (dbf, *new_hash_val>> (31-dbf->header->dir_bits));
Current language: auto; currently c
(gdb) bt
#0 0x8133a5e in _gdbm_findkey (dbf=0x0, key={
dptr = 0x813c020 "FREEAMP_DATABASE_VERSION", dsize = 25},
dptr=0xbfbfd1a8, new_hash_val=0xbfbfd1a4) at lib/gdbm/findkey.c:105
#1 0x8130886 in gdbm_fetch (dbf=0x0, key={
dptr = 0x813c020 "FREEAMP_DATABASE_VERSION", dsize = 25})
at lib/gdbm/gdbmfetch.c:58
#2 0x80ec8bc in Database::Value (this=0x81a5790,
key=0x813c020 "FREEAMP_DATABASE_VERSION") at base/src/database.cpp:131
#3 0x80ecbf2 in Database::TestDatabaseVersion (this=0x81a5790, version=1)
at base/src/database.cpp:231
#4 0x80ec631 in Database::Database (this=0x81a5790,
name=0x81a1ea0 "/home/rxg/.freeamp/db//metadatabase", version=1)
at base/src/database.cpp:56
#5 0x80b9330 in MusicCatalog::SetDatabase (this=0x818b200,
path=0x81a1ea0 "/home/rxg/.freeamp/db//metadatabase")
at base/src/musiccatalog.cpp:824
#6 0x80a4f7a in Player::Player (this=0x819e600, context=0x818b000)
at base/src/player.cpp:221
#7 0x80a4455 in Player::GetPlayer (context=0x818b000)
at base/src/player.cpp:86
#8 0x8104ee4 in main (argc=1, argv=0xbfbfd588)
at base/unix/src/bootstrap.cpp:236
#9 0x80a3e90 in ___start ()
(gdb)
It seems the 'gdbm' causes the core dumped. I also ever tried to link
freeamp with *another* 'gdbm'(/usr/pkg/lib/libgdbm*) which be installed from
our pkgsrc but got the same result.
However, for anyone who wants to help me debug it, please fetch the pkg from:
http://cgi.educities.edu.tw/rxghome/netbsd/pkg/freeamp.tar.gz
Thanks for your reply, Nick.
-rxg