-   Slackware (
-   -   Kded race condition during automounting (

SpelledJ 10-20-2007 01:05 PM

Kded race condition during automounting
I'm having a curious problem with HAL/DBUS and KDE on Slackware 12. I've read all of the major HAL threads here and don't think anyone else has run across this behavior.

The out of the box HAL/DBUS/KDE automounting works as it should. My non-root user is in the plugdev and cdrom groups, and with my cdrom line commented out in /etc/fstab, inserting a disk creates an icon on my desktop, and I can manipulate its mounting/application opening behavior with the KDE tools. All is good, except that it mounts the disk to /media/<volume name of disk> which I don't really like. For instances where I need to manipulate a disk at the command line (e.g. using installpkg from my Slackware DVD) I don't like having to go hunt the mount point under /media. I like a quick "cd /dvd" and I'm there.

So, I tried uncommenting my /etc/fstab entry, which from numerous posts made me think that should work with HAL and would make the mount point constant. I've tried two different lines (with one commented out, of course):

/dev/cdrom /dvd auto noauto,user 0 0
/dev/disk/by-path/pci-0000:00:1f.1-ide-0:1 /dvd auto noauto,user 0 0

The second was an attempt at using the udev-assigned name like Robby's /dev/cruzer1024 example in the HAL sticky. Robby mentions creating a custom udev rule, but the documentation I found here implies that a custom rule is not necessary for devices under /dev/disk. I just used the persistent name already available under by-path.

In either case, when I insert a disk, KDE pops up a progress dialog for mounting the disk. It hangs, and my CPU goes to 100% in gkrellm, the CPU temp skyrockets to about 70C, and all the fans kick on full blast. The first time the CPU stayed there pegged out indefinitely, until I ran top and found that kded was the problem. I can kill the kded process to get the CPU to go back to idle, but I have to restart KDE to get kded back. Note that the disk *does* mount properly to /dvd, it's just the kded runaway that's the problem.

So, if anyone can help - is this udev related? Have I just got the fstab entry wrong, and should I go through making a custom udev rule? Or is this a KDE bug that's causing the problem?

Background: My hardware is an HP Compaq nx6110 laptop (Intel 915GM w/ Pentium M), running a custom kernel. Yes, I also checked with generic-smp- to make sure my kernel wasn't the problem. I got the same results.

Sorry for the long post. I wanted to document this problem in case anyone else runs across it.

duryodhan 10-20-2007 02:23 PM


/dev/cdrom /dvd auto noauto,user 0 0
what was the problem with this solution?

I am afraid , I quite didn't get WHAT is your situation right now? I mean , you comp hangs.. but right now what have you done? Implemented a udev rule or written aforesaid lines in fstab, or added a /dev/disk/<disk path> to fstab .. etc. .. what exactly have you done?

If you want to mount only specific disks to /dvd then a HAL rule could be a simple and fast alternative.

And no need to apologise for long post .. the longer you post .. better for us.

SpelledJ 10-20-2007 11:34 PM

The situation is:

1. With no cdrom mount point in fstab - HAL/DBUS/KDE will automount a disk in my DVD drive with no problem, but not where I want it.
2. If I use either of the two lines indicated in fstab, the disk will automount to the location indicated (/dvd), but the KDE daemon (kded) runs away with my CPU and threatens to burn my laptop to a cinder unless I manually kill kded.

I have tried both of the lines I indicated above in fstab (one at a time). Currently I have them both commented out to avoid the kded runaway problem. I would like to have any disk I insert into my DVD drive to be mounted to /dvd, not /media/<volume name of disk>.

I haven't tried creating a udev rule, but from what I read about custom rules one didn't seem necessary for an optical drive listed under /dev/disk.

I would like to use my fstab entry without kded running away, and was wondering if anyone else had seen this problem, and if it was a KDE bug or a misconfiguration in my HAL, udev, or fstab setup.

rworkman 10-21-2007 10:58 PM

I've tried the equivalent of both of those lines in my /etc/fstab in Xfce, and it works exactly as expected. I've not tried it in kde yet, but I will. In the meantime, to isolate the problem to kded, please try it from within Xfce. If it works correctly, then kde's bugzilla will need to be explored :)

rworkman 10-21-2007 11:01 PM

BTW, Justin, have you considered joining the Birmingham Area Linux User Group (BALU)? It would be nice to have another Slackware guy in it... :-)

SpelledJ 10-22-2007 10:12 PM

Thanks for the suggestions, Robby. I tried both fstab options (/dev/cdrom, and /dev/disk/by-path/...) with Xfce and they worked fine. I first noticed this problem after I upgraded to Slackware 12 in July. I originally thought it had something to do with the line in CHANGES_AND_HINTS.TXT:

The /dev/cdrom line in /etc/fstab is commented out by default, as it interferes with HAL.
because it only occurred when I had an entry for my cdrom uncommented in fstab. I thought the problem with kded was just a symptom of HAL being "interfered with", so it didn't occur to me at first to search KDE's bugzilla. But, sure enough - KDE Bug #145126 sounds exactly like what I ran into. Unfortunately, it's marked "unconfirmed" and there's no other information. Hopefully my report will help to confirm the bug, although it appears rare and may be difficult to duplicate.

And no, I hadn't thought about looking for a LUG around here. I've checked out BALU's web page and I'll try to make their next meeting. Thanks for the info.

rworkman 10-25-2007 01:51 PM


Originally Posted by SpelledJ (Post 2933276)
And no, I hadn't thought about looking for a LUG around here. I've checked out BALU's web page and I'll try to make their next meeting. Thanks for the info.

It's going to be at the TechMixer 4.0 at Innovation Depot on Tuesday, November 6th at 5:30 p.m.
I'm planning to be there, but I can't make any promises. :-)

All times are GMT -5. The time now is 02:50 AM.