cam-accessing programs locking up

From: Fabian Keil <freebsd-listen_at_fabiankeil.de>
Date: Fri, 26 Oct 2012 11:26:59 +0200
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_at_r500 ~ $sudo procstat -kk $(pgrep mount)
PID    TID COMM             TDNAME           KSTACK                       
 2818 100458 mount_cd9660     -                mi_switch+0x194 sleepq_wait+0x42 _sleep+0x3a2 cam_periph_runccb+0x5a cdrunccb+0x4f cdcheckmedia+0xbf cdopen+0x131 g_disk_access+0x115 g_access+0x15e g_dev_open+0xd3 devfs_open+0x218 VOP_OPEN_APV+0x44 vn_open_vnode+0x159 vn_open_cred+0x20c kern_openat+0x1fe amd64_syscall+0x5f9 Xfast_syscall+0xf7 

Trying to eject through software (which often works) resulted
in cdrecord hanging as well:

fk_at_r500 ~ $sudo procstat -kk $(pgrep cdrecord)
  PID    TID COMM             TDNAME           KSTACK                       
 4905 100982 cdrecord         -                mi_switch+0x194 sleepq_wait+0x42 _sleep+0x3a2 cam_periph_getccb+0x62 cam_periph_ioctl+0x36 passioctl+0x7b devfs_ioctl_f+0x7b kern_ioctl+0x106 sys_ioctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7 

Looking for cam sysctl's to fiddle with resulted in "sysctl -a"
hanging after printing "kern.cam.enc.emulate_array_devices: 1":

fk_at_r500 ~ $sudo procstat -kk $(pgrep sysctl)
  PID    TID COMM             TDNAME           KSTACK                       
 4938 100989 sysctl           -                mi_switch+0x194 sleepq_timedwait+0x42 _sleep+0x1c9 g_waitfor_event+0xc2 sysctl_disks+0x49 sysctl_root+0x18d userland_sysctl+0x145 sys___sysctl+0xaa amd64_syscall+0x5f9 Xfast_syscall+0xf7 

"zpool export", "zpool list" and an aborted "zpool iostat"
where affected as well:

fk_at_r500 ~ $sudo procstat -kk $(pgrep zpool)
Password:
  PID    TID COMM             TDNAME           KSTACK                       
 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_ioctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7 
 5013 101502 zpool            -                mi_switch+0x194 sleepq_wait+0x42 _sx_xlock_hard+0x4ff _sx_xlock+0x75 zvol_remove_minors+0x70 zfs_ioc_pool_export+0x47 zfsdev_ioctl+0xe6 devfs_ioctl_f+0x7b kern_ioctl+0x106 sys_ioctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7 
 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_ioctl+0x106 sys_ioctl+0xfd amd64_syscall+0x5f9 Xfast_syscall+0xf7 

Fabian

Received on Fri Oct 26 2012 - 07:33:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:31 UTC