From owner-freebsd-current@FreeBSD.ORG Fri Oct 26 09:33:38 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 21BE3A99 for ; Fri, 26 Oct 2012 09:33:38 +0000 (UTC) (envelope-from freebsd-listen@fabiankeil.de) Received: from smtprelay03.ispgateway.de (smtprelay03.ispgateway.de [80.67.31.30]) by mx1.freebsd.org (Postfix) with ESMTP id A6FF98FC17 for ; Fri, 26 Oct 2012 09:33:37 +0000 (UTC) Received: from [84.44.209.158] (helo=fabiankeil.de) by smtprelay03.ispgateway.de with esmtpsa (SSLv3:AES128-SHA:128) (Exim 4.68) (envelope-from ) id 1TRgID-0004A2-UJ for freebsd-current@freebsd.org; Fri, 26 Oct 2012 11:33:30 +0200 Date: Fri, 26 Oct 2012 11:26:59 +0200 From: Fabian Keil To: FreeBSD Current Subject: cam-accessing programs locking up Message-ID: <20121026112659.21cbd32e@fabiankeil.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/eW7ahWxXZxNcGnV_3+mF6//"; protocol="application/pgp-signature" X-Df-Sender: Nzc1MDY3 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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 2012 09:33:38 -0000 --Sig_/eW7ahWxXZxNcGnV_3+mF6// Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Since a couple of weeks I occasionally notice that a command accessing cd0 hangs and once that happens I haven't found a way to get cd0 working again through software without rebooting. No kernel complaints are logged, but afterwards somewhat related commands hang as well. In this case I noticed that a mount of a DVD didn't succeed and thus ctrl+c'd it to clean the disc, but the drive still ignored the eject button and mount kept running in the background: fk@r500 ~ $sudo procstat -kk $(pgrep mount) PID TID COMM TDNAME KSTACK =20 2818 100458 mount_cd9660 - mi_switch+0x194 sleepq_wait+= 0x42 _sleep+0x3a2 cam_periph_runccb+0x5a cdrunccb+0x4f cdcheckmedia+0xbf cd= open+0x131 g_disk_access+0x115 g_access+0x15e g_dev_open+0xd3 devfs_open+0x= 218 VOP_OPEN_APV+0x44 vn_open_vnode+0x159 vn_open_cred+0x20c kern_openat+0x= 1fe amd64_syscall+0x5f9 Xfast_syscall+0xf7=20 Trying to eject through software (which often works) resulted in cdrecord hanging as well: fk@r500 ~ $sudo procstat -kk $(pgrep cdrecord) PID TID COMM TDNAME KSTACK = =20 4905 100982 cdrecord - mi_switch+0x194 sleepq_wait+= 0x42 _sleep+0x3a2 cam_periph_getccb+0x62 cam_periph_ioctl+0x36 passioctl+0x= 7b devfs_ioctl_f+0x7b kern_ioctl+0x106 sys_ioctl+0xfd amd64_syscall+0x5f9 X= fast_syscall+0xf7=20 Looking for cam sysctl's to fiddle with resulted in "sysctl -a" hanging after printing "kern.cam.enc.emulate_array_devices: 1": fk@r500 ~ $sudo procstat -kk $(pgrep sysctl) PID TID COMM TDNAME KSTACK = =20 4938 100989 sysctl - mi_switch+0x194 sleepq_timed= wait+0x42 _sleep+0x1c9 g_waitfor_event+0xc2 sysctl_disks+0x49 sysctl_root+0= x18d userland_sysctl+0x145 sys___sysctl+0xaa amd64_syscall+0x5f9 Xfast_sysc= all+0xf7=20 "zpool export", "zpool list" and an aborted "zpool iostat" where affected as well: fk@r500 ~ $sudo procstat -kk $(pgrep zpool) Password: PID TID COMM TDNAME KSTACK = =20 5131 100976 zpool - mi_switch+0x194 sleepq_wait+= 0x42 _sx_xlock_hard+0x4ff _sx_xlock+0x75 spa_all_configs+0x5c zfs_ioc_pool_= configs+0x29 zfsdev_ioctl+0xe6 devfs_ioctl_f+0x7b kern_ioctl+0x106 sys_ioct= l+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7=20 5013 101502 zpool - mi_switch+0x194 sleepq_wait+= 0x42 _sx_xlock_hard+0x4ff _sx_xlock+0x75 zvol_remove_minors+0x70 zfs_ioc_po= ol_export+0x47 zfsdev_ioctl+0xe6 devfs_ioctl_f+0x7b kern_ioctl+0x106 sys_io= ctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7=20 3408 100484 zpool - mi_switch+0x194 sleepq_wait+= 0x42 _sx_xlock_hard+0x4ff _sx_xlock+0x75 spa_open_common+0x7a spa_get_stats= +0x5b zfs_ioc_pool_stats+0x2c zfsdev_ioctl+0xe6 devfs_ioctl_f+0x7b kern_ioc= tl+0x106 sys_ioctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7=20 Fabian --Sig_/eW7ahWxXZxNcGnV_3+mF6// Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCKV2oACgkQBYqIVf93VJ3bbACfWgI/n5NpwBp5eChrzLlf0XT6 5LIAnRw0yKvRjxAxGIwKPEsY5AA/j0G4 =v4cT -----END PGP SIGNATURE----- --Sig_/eW7ahWxXZxNcGnV_3+mF6//--