[kde-freebsd] Re: HAL related system crash

Michael Nottebrock lofi at freebsd.org
Wed Jan 10 09:07:27 PST 2007


On Wednesday, 10. January 2007 10:56, Andrei Kolu wrote:
> On Tuesday, 9. January 2007 20:57, Joe Marcus Clarke wrote:
> > Pav Lucistnik wrote:
> > > I'm no expert but isn't hal supposed to prevent you from ejecting the
> > > media before unmount is completed?
> >
> > We removed forced-unmounting functionality due to FreeBSD bugs.  We
> > document that on the list of GNOME known issues.  That said, unmounting
> > CD-ROMs via Nautilus in GNOME has never triggered a panic for me.  Maybe
> > KDE is doing something illegal.

Andrei - you need to keep the right people cc'd. HAL is maintained by gnome at .

> I can reproduce this bug with almost 100% success rate on any computer
> within one minute.
>
> 1. Insert any cd/dvd into drive
> 2. Press refresh, because you can't see any file on drive until you do that

Yes, this is known (and mentioned in UPDATING). My guess is that it is a 
simple timing issue, maybe a simple QTimer:singleShot in the right place 
would already fix it. I'll look into it eventually, but if someone feels he 
can beat me to it (which is very likely, given my lack of free time as of 
late), by all means they should go ahead and submit patches if they succeed.

> 3. Press eject button on cdrom/dvd drive
> 4. Insert another cd/dvd media
> 5. You won't see new files- you'll see previous cd/dvd files and when you
> doubleklick on some file to open it- you'll experience kernel panic and
> reboot.

I suppose this really is, for now, a case of "don't do that". It's pretty 
similar to just unplugging USB-storage devices, FreeBSD doesn't cope. I am a 
bit surprised the drives aren't getting locked at all, but even if they were, 
it wouldn't really solve the problem for a number of laptop drives, which 
often don't have a lockable tray. 

That said, I think an on-eject event does trickle back up from dbus, so maybe 
the drives are actually locked, but unlocked as soon as someone presses the 
eject button. For me (on 5.5), pressing the eject button on the drive just 
crashes kded, regardless whether the volume is mounted or not. I haven't 
heard that reported from anyone else yet, so I suspect it might be a 
5.x-specific issue.

I'm not sure this can really be fixed on any higher level than in the kernel 
itself. FreeBSD probably will have to bite the bullet and just do like 
Windows does - if a mounted drive goes missing, discard all open files hard 
and somehow cope with it (i.e. don't panic, don't hang). HAL/DBus can then 
detect this and berate the user for not "safely removing" the medium and 
remind them to better remember next time. IMO it wouldn't be so bad overall - 
the unix userland is usually pretty good in handling suddenly disappearing 
files and devices, especially if they were read-only in the first place.

> Same problem happens if you select Eject menu from drive icon without
> unmounting it first.

For me, the eject context menu entry (in the media:/ view) doesn't work at all 
before unmounting the volume.

> Can't access any  fixed disk with kioslave from Konqueror without crashing
> whole operating system when HAL is turned off.

If "crashing whole operating system" means "kernel panic" or "hard hang", this 
again points to an issue rooted deeper than KDE or HAL/DBus. Also - do you 
mean HAL turned off at compile time (in the kdebase3 port) or turned on at 
compile time but hald not running?

> Damn hald filled 
> my /var/log/messages with megabytes  of error messages about my usb flash
> drive adapter.

Actually, the kernel did. CAM really could do with some less verbose default 
output (or at least an option to quiten it down).


Cheers,
-- 
   ,_,   | Michael Nottebrock               | lofi at freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-gnome/attachments/20070110/819732f6/attachment.pgp


More information about the freebsd-gnome mailing list