atapicam problem (again): hang on boot with DVD burner

Sergey Lungu sergey.lungu at gmail.com
Thu Feb 9 08:30:03 PST 2006


On Wed, 8 Feb 2006 00:24:44 +0300 Sergey Lungu <sergey.lungu at gmail.com>
wrote:

> On Tue, 7 Feb 2006 01:59:11 +0300 Sergey Lungu
> <sergey.lungu at gmail.com> wrote:
> 
> > Hi!
> > 
> > I'm not burning DVDs frequently, so I haven't seen this problem
> > before. I have burned a DVD with growisofs and after that I am
> > seeing a 3-5 min hang at boot time. No error messages at all, just
> > hang :)
> > 
> > Here is what I have:
> > 
> > Copyright (c) 1992-2005 The FreeBSD Project.
> > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
> > 1994 The Regents of the University of California. All rights
> > reserved. FreeBSD 6.1-PRERELEASE #0: Fri Feb  3 11:35:18 MSK 2006
> >     keyer at ogre.obchaga.org:/usr/obj/usr/src/sys/OGRE
> > ACPI APIC Table: <A M I  OEMAPIC >
> > Timecounter "i8254" frequency 1193182 Hz quality 0
> > CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2405.47-MHz 686-class CPU)
> >   Origin = "GenuineIntel"  Id = 0xf41  Stepping = 1
> > 
> > [...]
> > 
> > acd0: DMA limited to UDMA33, controller found non-ATA66 cable
> > acd0: DVDR <PIONEER DVD-RW DVR-110D/1.08> at ata1-master UDMA33
> > cd0 at ata1 bus 0 target 0 lun 0
> > cd0: <PIONEER DVD-RW  DVR-110D 1.08> Removable CD-ROM SCSI-0 device 
> > cd0: 33.000MB/s transfers
> > cd0: Attempt to query device size failed: NOT READY, Medium not
> > present
> > 
> > [3-5 min hang goes here]
> > 
> > Trying to mount root from ufs:/dev/ad0s2a
> > 
> > The most interesting thing is that I had no such problem before
> > using my DVD burner!
> > 
> > Is there a way to fix it?
> 
> I've been searching mailing-lists and PR-database for my problem
> solution and found that setting hw.ata.atapi_dma to zero from loader
> and turning it on back using atacontrol can help. I tried it, but this
> one doesn't work for me.
> 
> Any ideas?

OK, this is not the atapicam problem (I think), my apologies!
I have turned my DVD drive off, but the hang was still there.

I have compiled the kernel with DDB and debugging information in order
to find the place where the hang happens. This is my first try to look
inside the kernel, so don't blame me, please :)

start_init -> vfs_mountroot -> root_mount_wait -> g_waitidle:

void
g_waitidle(void)
{

        g_topology_assert_not();
        mtx_assert(&Giant, MA_NOTOWNED);

        mtx_lock(&g_eventlock);
        while (!TAILQ_EMPTY(&g_events))
                msleep(&g_pending_events, &g_eventlock, PPAUSE,
                    "g_waitidle", hz/5);
        mtx_unlock(&g_eventlock);
        curthread->td_pflags &= ~TDP_GEOM;
}

The kernel hangs in that `while'. As far as I can judge, it is waiting
for completion of GEOM events handling.

Why is it happening and how can I solve this annoying problem?

-- 
Sergey Lungu

Washing your car to make it rain doesn't work.


More information about the freebsd-stable mailing list