Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2007 18:07:08 +0100
From:      Michael Nottebrock <lofi@freebsd.org>
To:        kde@freebsd.org
Cc:        Andrei Kolu <antik@bsd.ee>, gnome@freebsd.org
Subject:   Re: [kde-freebsd] Re: HAL related system crash
Message-ID:  <200701101807.12436.lofi@freebsd.org>
In-Reply-To: <200701101156.55261.antik@bsd.ee>
References:  <20070109080137.GA92419@dose.local.invalid> <45A3E5A0.4020305@FreeBSD.org> <200701101156.55261.antik@bsd.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart5218008.r5XLyZ76i6
Content-Type: text/plain;
  charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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=
@.

> 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 th=
at

Yes, this is known (and mentioned in UPDATING). My guess is that it is a=20
simple timing issue, maybe a simple QTimer:singleShot in the right place=20
would already fix it. I'll look into it eventually, but if someone feels he=
=20
can beat me to it (which is very likely, given my lack of free time as of=20
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=20
similar to just unplugging USB-storage devices, FreeBSD doesn't cope. I am =
a=20
bit surprised the drives aren't getting locked at all, but even if they wer=
e,=20
it wouldn't really solve the problem for a number of laptop drives, which=20
often don't have a lockable tray.=20

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

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

=46or me, the eject context menu entry (in the media:/ view) doesn't work a=
t all=20
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", t=
his=20
again points to an issue rooted deeper than KDE or HAL/DBus. Also - do you=
=20
mean HAL turned off at compile time (in the kdebase3 port) or turned on at=
=20
compile time but hald not running?

> Damn hald filled=20
> 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 defaul=
t=20
output (or at least an option to quiten it down).


Cheers,
=2D-=20
   ,_,   | Michael Nottebrock               | lofi@freebsd.org
 (/^ ^\) | FreeBSD - The Power to Serve     | http://www.freebsd.org
   \u/   | K Desktop Environment on FreeBSD | http://freebsd.kde.org

--nextPart5218008.r5XLyZ76i6
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQBFpR1AXhc68WspdLARAqhLAJ4hqYDW8I2In2wtCVHASJPCdKQ0uACfUGh+
Sidv/nWM7JJoEsTEY4dWVV8=
=QD/p
-----END PGP SIGNATURE-----

--nextPart5218008.r5XLyZ76i6--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701101807.12436.lofi>