Red Hat Bugzilla – Bug 22034
wrong owner of /dev entries
Last modified: 2007-04-18 12:30:10 EDT
I'm running RedHat 7.0 with XFree86 4.0.1 as shipped on the CDs, and using
gdm for a gui login.
Earlier this week, Netscape had frozen up on a user, so I hit
CTRL-ALT-BACKSPACE to kill the X server and log the user out.
Then I logged in to the system, and when I attempted to play some music,
both the mixer program and XMMS complained that the soundcard wasn't
configured properly. I knew it was, and after hunting around for a bit, I
found that the user that was logged in when Netscape froze was still the
owner of /dev/mixer, /dev/dsp*, and a slew of other devices.
I su'd to root and changed the ownership to myself, and was able to play
However, the /dev entries' ownership is stuck now to whatever I chown them
to as root. Earlier, whenever a user logged in, they became the owner of
certain /dev entries for that session. Now that isn't happening anymore.
This is a usermode issue of some kind, reassigning.
Recently, I had to reboot into Windows 95 for a moment. I just noticed that the
ownership of the /dev entries appears to be working correctly again. It seems a
reboot fixed the problem... That's not supposed to happen with Unix. :)
In any case, it's working again.
I have the same problem. Can reproduce virtually every time by doing a
ctrl-alt-backspace in X (gnome) as one user, then logging back in as another...
Suggest REOPEN and assign this to the right person.
This sounds like a "gdm doesn't close the session if the X server exits
unexpectedly" problem, but I can't reproduce this either on a current release
(RHEL 4 or Fedora Core 4). Which release are you still seeing this with?
(Moving back to "gdm" for the sake of searching -- usermode isn't involved when
you log in or out.)
I'm seeing this on a FC2 box (perhaps it has been fixed in FC3 or 4). I'll try
to come up with some steps for reproducing.
In the past, this has usually happened as a result of one user's X session
freezing up (last time, via my 1-yr old nephew's random pounding on the keyboard
on the gnome desktop). Killing the X session with ctrl-alt-backspace gets back
to the login.
After not being able to get /dev to reassign automatically, I've tried
restarting gdm ('init 3') and even going all the way down to init 1 (checking to
make sure all non-essential procs went away) and then going back up to init
level 5. Still no good. The only way I've been able to get it to work again is
via reboot :( .
Yes, the mechanism is the pam_console module, and it keeps track of who the
"owner" of the devices should be, and how many times that user is logged in,
using a reference count file in /var/run/console (it was /var/lock/console on
earlier releases). The count is updated when the user in question logs in or
out (the logout seems to avoid detection here), the "owner" only changes when
the previous owner's count drops to 0, and the reference count is only reset at
I can confirm that this was still a problem in Fedora Core 2 -- the
Ctrl-Alt-Backspace after login method works on FC2 but not FC3, so my thinking
is that this was fixed somewhere between gdm 18.104.22.168 and 22.214.171.124.