Date: Thu, 30 Oct 2008 10:32:15 +0100 From: =?ISO-8859-1?Q?V=E1clav_Haisman?= <v.haisman@sh.cvut.cz> To: Dominique Goncalves <dominique.goncalves@gmail.com> Cc: freebsd-stable@freebsd.org Subject: Re: Perl application hang in umtxn state Message-ID: <49097F1F.7060109@sh.cvut.cz> In-Reply-To: <7daacbbe0810290217l60236d8ci1b2c4011720a0cc8@mail.gmail.com> References: <7daacbbe0810290217l60236d8ci1b2c4011720a0cc8@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Dominique Goncalves wrote: > Hi, > > I run FreeBSD 7.1-PRERELEASE and with a Perl GTK2 application, Perl > hang in umtxn state: > > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 76288 dom 1 53 0 67860K 46080K umtxn 0:02 0.00% perl5.8.8 > > And the only way to stop the application is kill -9 > > I tried to use ktrace/kdump and ktrace.out show "_umtx_op" > > $ kdump -f ktrace.out > [...] > 13199 perl5.8.8 RET lstat 0 > 13199 perl5.8.8 CALL gettimeofday(0xbfbfb144,0) > 13199 perl5.8.8 RET gettimeofday 0 > 13199 perl5.8.8 CALL _umtx_op(0xbfbfd18c,0x3,0x1,0,0) > 13199 perl5.8.8 RET _umtx_op 0 > 13199 perl5.8.8 CALL sigprocmask(SIG_BLOCK,0xbfbfd120,0x8121490) > 13199 perl5.8.8 RET sigprocmask 0 > 13199 perl5.8.8 CALL _umtx_op(0x287fb8a0,0x5,0,0,0) > 13199 perl5.8.8 RET _umtx_op RESTART > 13199 perl5.8.8 PSIG SIGKILL SIG_DFL > > > How to debug this hang? (btw I'm not a developer) You can try rebuilding perl with debugging information. I am not sure this is the best way but I have used this in my /etc/make.conf: # Disable binaries stripping. STRIP= # Add debugging info to binaries. CFLAGS?= CFLAGS+= -g3 -ggdb CXXFLAGS?= CXXFLAGS+= -g3 -ggdb When you have that, try running your test case again. When it blocks again, attach GDB to the hung process: gdb -p PID `which perl`. And then obtain the call stack: (gdb) bt. I suspect there will be some pthreads call on top of the stack. I am not FreeBSD developer but this seems really similar to situations reported in thread "umtxn and Apache 2.2" and mine "Process in "uwait" state". > > $ uname -a > FreeBSD freebsd7 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #15 r184123: > Tue Oct 21 16:24:59 CEST 2008 > root@freebsd7:/usr/obj/usr/src/sys/GENERIC i386 > > Thanks for your help, > Regards. > - -- VH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iFYEAREIAAYFAkkJfx8ACgkQhQBMvHf/WHnzuwDffY0A82o1mpzdVBixQ6bjeqon pLikFIEvlXke3ADeIGmhTjnC5TPnJE01XiiZyPuOcrrgYpXhFzTdPw== =KOCn -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49097F1F.7060109>