NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/46462: Hang trying to run a disklabel on an inserted USB flash drive
On Sat, May 19, 2012 at 08:29:03PM +0100, Mindaugas Rasiukevicius wrote:
> OK, this thread is likely a problem:
>
> > db> tr/t 0.59
> > trace: pid 0 lid 59 at 0xffffa00049c1b770
> > sleepq_block() at netbsd:sleepq_block+0xdd
> > cv_wait() at netbsd:cv_wait+0xf1
> > biowait() at netbsd:biowait+0x4f
> > read_sector() at netbsd:read_sector+0x23
> > scan_mbr() at netbsd:scan_mbr+0x40
> > readdisklabel() at netbsd:readdisklabel+0xfb
> > sdopen() at netbsd:sdopen+0x26a
> > spec_open() at netbsd:spec_open+0x29a
> > VOP_OPEN() at netbsd:VOP_OPEN+0x29
> > dkwedge_discover() at netbsd:dkwedge_discover+0xee
> > sdattach() at netbsd:sdattach+0x206
> > config_attach_loc() at netbsd:config_attach_loc+0x15a
> > scsi_probe_bus() at netbsd:scsi_probe_bus+0x4aa
> > scsibus_config() at netbsd:scsibus_config+0x5d
> > scsipi_completion_thread() at netbsd:scsipi_completion_thread+0x23
>
> - scsipi_completion_thread()
> This asynchronous completion thread handles the event, which is
> in this case attaching of a new device. Callbacks are performed
> under splbio().
>
> -- [skipping] .. sdopen()
> Acquiring sd->sc_dk.dk_openlock here. We are still at IPL_BIO.
>
> --- [skipping] .. read_sector() -> disk_read_sectors()
> Invoking sdstrategy() and entering biowait(). However, since
> we are still at IPL_BIO, biodone() does not happen - thread has
> deadlocked against interrupt with sd->sc_dk.dk_openlock held.
I don't understand how you get to this conclusion. biowait() will cause the
thread to sleep, and IPL_BIO interrupts will be accepted again while
it sleeps. Otherwise, all IPL_VM and lower interrupts would be blocked,
which would probably cause not only disklabel to hang, but most probably
the complete system.
I guess the problem is more that the USB I/O doesn't completes for some
reason.
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index