From owner-freebsd-current@FreeBSD.ORG Fri Oct 26 18:45:51 2007 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 EA60B16A419; Fri, 26 Oct 2007 18:45:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from gnome.kiev.sovam.com (gnome.kiev.sovam.com [212.109.32.24]) by mx1.freebsd.org (Postfix) with ESMTP id 902B913C49D; Fri, 26 Oct 2007 18:45:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay02.kiev.sovam.com ([62.64.120.197]) by gnome.kiev.sovam.com with esmtp (Exim 4.67 (FreeBSD)) (envelope-from ) id 1IlUBq-000KbB-L8; Fri, 26 Oct 2007 21:45:50 +0300 Received: from [212.82.216.226] (helo=deviant.kiev.zoral.com.ua) by relay02.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1IlUBo-00038c-I6; Fri, 26 Oct 2007 21:45:50 +0300 Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id l9QIja5l097864; Fri, 26 Oct 2007 21:45:36 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.1/8.14.1/Submit) id l9QIjajB097863; Fri, 26 Oct 2007 21:45:36 +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: Fri, 26 Oct 2007 21:45:36 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20071026184536.GE37471@deviant.kiev.zoral.com.ua> References: <200710251435.58984.jhb@freebsd.org> <200710261222.28656.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="vv4Sf/kQfcwinyKX" Content-Disposition: inline In-Reply-To: <200710261222.28656.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Scanner-Signature: a0e7373be156534abcc10f92c304d741 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 1684 [Oct 26 2007] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: freebsd-current@freebsd.org Subject: Re: Deadlock, exclusive sx so_rcv_sx, amd64 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: Fri, 26 Oct 2007 18:45:52 -0000 --vv4Sf/kQfcwinyKX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 26, 2007 at 12:22:28PM -0400, John Baldwin wrote: > On Friday 26 October 2007 05:52:07 am Gleb Kozyrev wrote: > > On 25/10/2007, John Baldwin wrote: > > > > Running rtorrent and ftp brings my system to a deadlock > > > > in a few hours. Kernel still responds to pings and sends some > > > > TCP acks. > > ... > > > > Please suggest any other commands to run in DDB if needed. > > > > Cores are saved. > > > > > > show sleepchain will show if it's a real deadlock or not. > > > > >=20 > > This time the freeze was a matter of minutes. > >=20 > > db> ps > > pid ppid pgrp uid state wmesg wchan cmd > > 1229 991 991 0 ? smbd > > 1201 1195 1201 1001 SL+ pfault 0xffffffff80b1359c rtorrent > > 1199 1193 1199 1001 Ss+ ttyin 0xffffff0001211410 tcsh > > 1197 1193 1197 1001 Ss+ ttyin 0xffffff0001218810 tcsh > > 1195 1193 1195 1001 Ss+ pause 0xffffff000624a0c0 tcsh > > 1193 1192 1193 1001 SLs pfault 0xffffffff80b1359c screen > > 1192 1190 1190 1001 S+ pause 0xffffff00013c10c0 screen > > 1190 1189 1190 1001 Ss+ pause 0xffffff00065b40c0 tcsh > > 1189 1187 1187 1001 S select 0xffffffff80af79d0 sshd > > 1187 1097 1187 0 Ss sbwait 0xffffff00065346cc sshd > > ... > >=20 > > db> show alllocks > > Process 1187 (sshd) thread 0xffffff00065ad350 (100166) > > exclusive sx so_rcv_sx r =3D 0 (0xffffff0006534670) locked @ > > /usr/src/sys/kern/uipc_sockbuf.c:145 > >=20 > > db> show sleepchain 1187 > > thread 100166 (pid 1187, sshd) sleeping on 0xffffff00065346cc "sbwait" > > db> show sleepchain 1201 > > thread 100164 (pid 1201, rtorrent) sleeping on 0xffffffff80b1359c "pfau= lt" > >=20 > > Nothing interesting I guess... > > Maybe this is not a deadlock, what else can cause such a freeze? > > I won't reboot it for a while -- maybe someone can suggest anything els= e. >=20 > "sbwait" is waiting for data to come in on a socket and "pfault" is > waiting on disk I/O. It is a bit odd that 1187 is holding a lock while No, pfault means that the process handles page faults, and sleeps waiting for some page to become available (either from cache or free list). > sleeping though that is permitted with an sx lock. Still, if it's > supposed to be protect socket's receive buffer that is odd. Maybe get > a trace of the process blocked in "sbwait" (tr ) and bug rwatson@ > about it. --vv4Sf/kQfcwinyKX Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFHIjXPC3+MBN1Mb4gRAgmSAKDpuxX5/t07+T1q0jKFV0ybA31mMwCdH3U4 x4TF3cRgX339ll6QGz99KDg= =dcSK -----END PGP SIGNATURE----- --vv4Sf/kQfcwinyKX--