cvs commit: src/sys/geom geom_disk.c

Poul-Henning Kamp phk at phk.freebsd.dk
Wed May 14 04:38:03 PDT 2003


In message <20030514081041.GD4390 at wantadilla.lemis.com>, "Greg 'groggy' Lehey" 
writes:

>malloc() of "16" with the following non-sleepablelocks held:
>exclusive sleep mutex g_xup r = 0 (0xc8612ca8) locked @ /src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/geom/geom_io.c:363

This is a problem, you cannot sleep in the primary I/O path (ie: strategy()
and done()), if you sleep in the I/O path, you stop all I/O processing
and if the system needs to page something out to make the ram available
to you, you have a deadlock.

>panic: final g_dev_close() with outstanding bios

This means that close was called before all the I/O requests had been
delivered, this is not allowed.

You have to stop sending I/Os, wait for the ones you have sent to come
back, then you can close.

Otherwise the I/O's arriving after the close will be very likely to
access stuff which is no longer there, and result in really weird
random memory corruption.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the cvs-all mailing list