From owner-freebsd-current@FreeBSD.ORG Sat Aug 22 19:47:39 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 148EF1065693 for ; Sat, 22 Aug 2009 19:47:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id A148B8FC34 for ; Sat, 22 Aug 2009 19:47:38 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id n7MJlOLo027070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 22 Aug 2009 22:47:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id n7MJlOBX051130; Sat, 22 Aug 2009 22:47:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n7MJlOY2051129; Sat, 22 Aug 2009 22:47:24 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 22 Aug 2009 22:47:24 +0300 From: Kostik Belousov To: Jeremie Le Hen Message-ID: <20090822194724.GE9623@deviant.kiev.zoral.com.ua> References: <20090822185812.GC61707@felucia.tataz.chchile.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kh0gS47ASyprwiQo" Content-Disposition: inline In-Reply-To: <20090822185812.GC61707@felucia.tataz.chchile.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: freebsd-current@freebsd.org Subject: Re: truss(1) locked in kernel with 8.0-BETA2 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Aug 2009 19:47:39 -0000 --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--