Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2012 11:26:59 +0200
From:      Fabian Keil <freebsd-listen@fabiankeil.de>
To:        FreeBSD Current <freebsd-current@freebsd.org>
Subject:   cam-accessing programs locking up
Message-ID:  <20121026112659.21cbd32e@fabiankeil.de>

next in thread | raw e-mail | index | archive | help
--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//--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121026112659.21cbd32e>