After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 393396 - GDM crashed?
GDM crashed?
Status: RESOLVED NOTABUG
Product: gdm
Classification: Core
Component: general
2.16.x
Other All
: Normal critical
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2007-01-06 04:23 UTC by John Pye
Modified: 2007-04-10 05:27 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16



Description John Pye 2007-01-06 04:23:26 UTC
Steps to reproduce:
Not sure if this is a bug with GDM or something else.

I was using firefox when suddenly everything froze (including mouse pointer). Then about 6 seconds later, the Ubuntu login screen reappeared.

I check the system logs and saw the following

Jan  6 15:12:05 roadwork gdm[4277]: Error reinitilizing server
Jan  6 15:12:13 roadwork gdm[24917]: gdm_auth_user_add: /home/john/.Xauthority is not owned by uid 1000.

There were not other error messages in any of the other system logs for the previous 3 minutes up til that point.

Is this really an error with the .Xauthority file?



Stack trace:


Other information:
Comment 1 Brian Cameron 2007-01-12 07:32:16 UTC
Could you please provide more information.  The user should have an .Xauthority file in their $HOME directory.  What is the ownership and permissions of this file (ls -l $HOME/.Xauthority output)?  Is the file owned by the user who is logging in?  If not, then this is a security issue.  Since the .Xauthority file allows anybody who can read it to snoop on the user's X session, you don't want other users to be able to read this file.

Does deleting this file and retrying to login via GDM help?  It will get recreated the next time the Xserver starts for the user.  Perhaps the file was created with the wrong ownership or permissions?
Comment 2 John Pye 2007-01-12 23:31:56 UTC
When I look at my .Xauthority file, I see that it is owned by me and its chmod value is 600.

On the occasion of this error it wasn't owned by me though. I wonder if it can be possible for this arise in strange cases where 'startx' is run by root on Ubuntu 6.10?
Comment 3 Brian Cameron 2007-01-15 01:08:27 UTC
By the nature of the error message, it seems that GDM thinks the file is not owned by you at some point in the login process.  Either GDM has a bug which causes it to get confused in some situations, or the file is really not owned by you.  If the file is not owned by you, then this would be a fairly serious security issue.  Since if other people can read this file, this would allow other users to access anything that goes on in your session (such as username/password information you might enter to any program).

I think some investigation is needed to determine if the file somehow changes ownership during the login process you are seeing this error.  Might be worth filing a bug with Ubuntu, since I suspect that if this file is changing ownership/permissions this is probably happening outside of the GDM process (e.g. perhaps in the startup scripts).
Comment 4 John Pye 2007-01-15 11:31:36 UTC
The file was owned root.root at the time. Doesn't sound to me like a big security problem, but I'll file it on launchpad anyway as you suggest.
Comment 5 Brian Cameron 2007-01-15 11:40:47 UTC
What are the permissions of the file?  For you (as your non-root user) to be able to read the file, it would need to have read-group or read-all permissions, which would make it a security risk.  If the file is setup without you having read permissions, then it is strange for root to provide you with an .Xauthority file that you can't actually read.

I'm not sure what is putting the file in your $HOME directory, but whatever program is doing so seems to be doing so inappropriately.  It should really be owned by you and only readable by you.  If other users can read the file, this is a security problem.  If you can't read the file, then it makes no sense to put the file in your $HOME directory as your .Xauthority file.

Could you share "ls -l $HOME/.Xauthority" output of the file when the problem happens and it is owned by root:root?
Comment 6 John Pye 2007-01-15 12:59:03 UTC
Ok, will do next time (if) it happens.

Cheers
JP
Comment 7 John Pye 2007-01-15 13:15:32 UTC
I've just had a similar thing happen. X silently drops, I get a flashng text cursor on black, then the Ubuntu login screen reappears. It's actually happened 3 times today now.

Nothing funning happened to my .Xauthority file:

-rw------- 1 john john 130 2007-01-16 00:08 /home/john/.Xauthority

But see the timestamp on it? The time of the crash.

And I found this in system log (GNOME app):

Jan 16 00:08:08 roadwork gdm[20348]: Error reinitilizing server
Jan 16 00:08:15 roadwork gconfd (john-4780): GConf server is not in use, shutting down.
Jan 16 00:08:15 roadwork gconfd (john-4780): Exiting
Jan 16 00:08:16 roadwork gconfd (john-29155): starting (version 2.16.0), pid 29155 user 'john'
Jan 16 00:08:16 roadwork gconfd (john-29155): Resolved address "xml:readonly:/etc/gconf/gconf.xml.mandatory" to a read-only configuration source at position 0
Jan 16 00:08:16 roadwork gconfd (john-29155): Resolved address "xml:readwrite:/home/john/.gconf" to a writable configuration source at position 1
Jan 16 00:08:16 roadwork gconfd (john-29155): Resolved address "xml:readonly:/etc/gconf/gconf.xml.defaults" to a read-only configuration source at position 2
Jan 16 00:08:16 roadwork gconfd (john-29155): Resolved address "xml:readonly:/var/lib/gconf/debian.defaults" to a read-only configuration source at position 3
Jan 16 00:08:16 roadwork gconfd (john-29155): Resolved address "xml:readonly:/var/lib/gconf/defaults" to a read-only configuration source at position 4
Jan 16 00:08:19 roadwork gconfd (john-29155): Resolved address "xml:readwrite:/home/john/.gconf" to a writable configuration source at position 0
Jan 16 00:08:22 roadwork bonobo-activation-server (john-29189): Passing command-line arguments in .server files is deprecated: "/usr/bin/tomboy --panel-applet"
Comment 8 Brian Cameron 2007-01-16 01:44:20 UTC
This seems like a different problem to me.  Doesn't seem that your .Xauthority file has weird permissions or ownership and aside from the "Error reinitilizing server" message, I don't see any error messages.

Note that the "Error reinitilizing server" message happens only when the AlwaysRestartServer key in your configuration is set to FALSE.  When this is set to FALSE, GDM tries to reuse the Xserver for every login session so when you logout and log back in, the same Xserver is used.

Perhaps your Xserver doesn't work well with this feature.  Some of the error messages you report seem to indicate you are having flaky behavior with your Xserver.  Does setting this key to TRUE fix your problem?  This will force GDM to restart GDM every time it restarts the GDM GUI.  This will be slightly slower (you probably won't notice the difference, though - it's not really significant).

Comment 9 John Pye 2007-01-16 02:52:00 UTC
Hi again,

I realise we might be getting off-topic a little bit here, but the problem with this 'error restarting server' is happening out of the blue: I am not logging in/out or changing my session in any way. I'm just in the middle of working when the screen goes black. Then the login screen appears, and all I see in the logs is that message "Jan 16 00:08:08 roadwork gdm[20348]: Error reinitilizing server".

So: could it be that X is crashing for some reason, then GDM is failing to reinitialize because it *hasn't* crashed and is still running but is somehow inconsistent because the X session it was related to has vanished?

Excuse my very tenuous understanding of how all these bits and pieces fit together. I only know as much about this stuff as one learns from being a regular user as well as coding GTK apps.

Cheers
JP
Comment 10 Brian Cameron 2007-01-16 04:36:31 UTC
Yes, it sounds like your problem may really be with the Xserver.  You might try changing your AlwaysRestartServer value in the GDM configuration and see if that
makes the crashing problem go away.  GDM plays games with the xauth files to allow the same Xserver to be used for multiple sessions, and if you are having problems with your Xauth file, this feature may be causing issues for you.  Turning it off might help.

If not, then my guess is that your problem is with the Xserver and not with GDM.  
You might take a look at your xorg.log file which is probably located in /var/log and see if there are any useful error messages there.  Also your $HOME/.xsession-errors file may contain useful error messages.

If this is an Xserver problem, then you probably need to get help via a forum that helps people with Xserver problems.  You might try upgrading/downgrading
your Xserver to a more stable version?

Comment 11 Brian Cameron 2007-02-09 06:26:06 UTC
Any update?
Comment 12 Brian Cameron 2007-04-10 05:27:44 UTC
I'm closing this bug.  It seems pretty clear that this isn't a GDM problem but with the user's Xserver configuration.  Please reopen if this is, in fact, a GDM issue.