Date: Sat, 22 Aug 2009 22:47:24 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Jeremie Le Hen <jeremie@le-hen.org> Cc: freebsd-current@freebsd.org Subject: Re: truss(1) locked in kernel with 8.0-BETA2 Message-ID: <20090822194724.GE9623@deviant.kiev.zoral.com.ua> In-Reply-To: <20090822185812.GC61707@felucia.tataz.chchile.org> References: <20090822185812.GC61707@felucia.tataz.chchile.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--kh0gS47ASyprwiQo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 22, 2009 at 08:58:12PM +0200, Jeremie Le Hen wrote: > Hi, >=20 > I've upgraded my laptop to 8.0-BETA2 and ran portupgrade in script(1). > But according to top, it seems script(1) is going crazy, even after I've > hit ^C: >=20 > % CPU: 0.0% user, 7.9% nice, 92.1% system, 0.0% interrupt, 0.0% idle > % Mem: 64M Active, 675M Inact, 141M Wired, 21M Cache, 111M Buf, 90M Free > % Swap: 1024M Total, 1024M Free > %=20 > % PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > % 47998 root 1 128 10 3344K 788K RUN 3:02 100.00% scri= pt >=20 > jarjarbinks:~:7# procstat -k 47998 > PID TID COMM TDNAME KSTACK = =20 > 47998 100087 script - mi_switch critical_exit in= tr_event_handle intr_execute_handlers lapic_handle_intr Xapic_isr1 binuptim= e bintime microtime gettimeofday syscall Xint0x80_syscall=20 >=20 > truss(1) show the following sequence infinitely: > % gettimeofday({1250965404.830938 },0x0) =3D 0 (0x0) > % select(5,{0 4},0x0,0x0,{30.000000 }) =3D 1 (0x1) > % read(0,0xbfbfdf5c,1024) =3D 0 (0x0) > % write(4,0xbfbfdf5c,0) =3D 0 (0x0) >=20 > And when I try to stop truss, it nevers end and seems to be blocked in ke= rnel: >=20 > ps aux: > root 49506 0.0 0.1 3284 912 2 I+ 8:23PM 0:00.06 truss -p 4= 7998 > root 47998 0.0 0.1 3344 788 1 TNX+ 8:39AM 6:37.36 /usr/bin/s= cript -qa /tmp/portupgrade20090822-4080-3knxs0-0 env UPGRA >=20 > procstat -k: > 49506 100121 truss - mi_switch sleepq_switch sl= eepq_catch_signals sleepq_wait_sig _sleep kern_wait wait4 syscall Xint0x80_= syscall > 47998 100087 script - mi_switch thread_suspend_s= witch ptracestop syscall Xint0x80_syscall=20 > Note that once I've truss(1)'ed script(1), it stops consuming all the > CPU cycles. It seems to be deadlocked, but DDB shows only one lock. So > this is not a deadlock stricly speaking, but obviously truss(1) is > waiting for something that will never come but nonetheless I can kill it > with a SIGKILL. >=20 >=20 > The same thing can happen with dialog(1); truss shows: > % read(0,0xbfbfcf10,1) =3D 0 (0x0) > % read(0,0xbfbfcf10,1) =3D 0 (0x0) > % read(0,0xbfbfcf10,1) =3D 0 (0x0) > % read(0,0xbfbfcf10,1) =3D 0 (0x0) >=20 > And so on. And after ^C the processes are staled in the same state in > the kernel. >=20 > I've reproduced this twice in a row across a reboot. I think I can > reproduce it on demand. Does kill -9 kills truss ? I expect that it does, and then the debuggee is killable. --kh0gS47ASyprwiQo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkqQS0sACgkQC3+MBN1Mb4izCQCgw7TAJ4w7EW7eu1nzwZcV/vjL 8sQAoIYH4ruzjbrrgLAn1FPZPZ9UvWdt =c27E -----END PGP SIGNATURE----- --kh0gS47ASyprwiQo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090822194724.GE9623>