LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-20-2007, 01:05 PM   #1
SpelledJ
Member
 
Registered: Jun 2006
Location: Birmingham, AL
Distribution: Slackware64-13.1, 12.1
Posts: 119

Rep: Reputation: 20
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 2.6.21.5 kernel. Yes, I also checked with generic-smp-2.6.21.5 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.
 
Old 10-20-2007, 02:23 PM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
Quote:
/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.
 
Old 10-20-2007, 11:34 PM   #3
SpelledJ
Member
 
Registered: Jun 2006
Location: Birmingham, AL
Distribution: Slackware64-13.1, 12.1
Posts: 119

Original Poster
Rep: Reputation: 20
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.
 
Old 10-21-2007, 10:58 PM   #4
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
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
 
Old 10-21-2007, 11:01 PM   #5
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
BTW, Justin, have you considered joining the Birmingham Area Linux User Group (BALU)? It would be nice to have another Slackware guy in it... :-)
 
Old 10-22-2007, 10:12 PM   #6
SpelledJ
Member
 
Registered: Jun 2006
Location: Birmingham, AL
Distribution: Slackware64-13.1, 12.1
Posts: 119

Original Poster
Rep: Reputation: 20
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:
Quote:
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.
 
Old 10-25-2007, 01:51 PM   #7
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 2,559

Rep: Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351Reputation: 1351
Quote:
Originally Posted by SpelledJ View Post
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. :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Race condition in /etc/rc.d/ with latest -current ? Yalla-One Slackware 1 08-06-2006 02:23 PM
what is kded.....? Veteq Linux - Software 2 12-24-2005 10:58 AM
race condition in close socket?? jwstric2 Programming 3 03-18-2005 05:01 PM
Kernel race condition exploit solution jlangelier Slackware 12 01-14-2005 10:15 AM
P-thread+race condition+mutex+Peterson's algorithm bangla_linux Programming 3 10-29-2003 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration