Bug 4887 - gdm errors upon shutdown or restart
: gdm errors upon shutdown or restart
Status: RESOLVED FIXED
Product: opensolaris
desktop
: 200811
: i86pc/amd64 OpenSolaris
: P3 normal with 1 vote (vote)
: ---
Assigned To: Watcher account for desktop bugs
: Watcher account for desktop bugs
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2008-11-11 15:57 UTC by Asim Salam
Modified: 2009-03-16 03:20 UTC (History)
15 users (show)

See Also:


Attachments
gdm log file pointed to by svcs -x -v (4.17 KB, text/plain)
2008-11-11 15:57 UTC, Asim Salam
no flags Details
gdm log file pointed to by svcs -x -v (5.05 KB, application/octet-stream)
2008-11-11 16:00 UTC, Asim Salam
no flags Details
gdm.xml file (2.54 KB, text/plain)
2008-12-08 14:23 UTC, Brian Cameron
no flags Details
svc-gdm file (953 bytes, text/plain)
2008-12-08 14:23 UTC, Brian Cameron
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description Asim Salam 2008-11-11 15:57:39 UTC
Created an attachment (id=834) [details]
gdm log file pointed to be svcs -x -v

Each time the machine is shutdown, it hangs displaying a white screen
immediately after the display manager stops. After a few minutes the following
message prints on the console:
svc.startd[7]: application/graphical-login/gdm:default failed. Transitioned to
maintenance. See svcs -x -v

svcs -x -v displays:
Reason: Method failed
http://sun.com/msg/SMF-8000-8Q
see: /var/svc/log/application-graphical-login-gdm:default.log

The above mentioned log files from 2 instances of this failure are attached.

This failure can also be easily reproduced by restarting gdm with svcadm like:
svcadm restart gdm

Also after 6th or 7th shutdown, display settings on this machine go messed upon
subsequent boot-up. Fonts, Icons and panel bar all became larger in size.
Perhaps some configuration file got corrupted. 

Here is some basic information about this machine. It is a macbook pro with
dual boot setup for Leopard and OpenSolaris.

  Model Name:    MacBook Pro
  Model Identifier:    MacBookPro4,1
  Processor Name:    Intel Core 2 Duo
  Processor Speed:    2.5 GHz
  Number Of Processors:    1
  Total Number Of Cores:    2
  L2 Cache:    6 MB
  Memory:    2 GB
  Bus Speed:    800 MHz
  Boot ROM Version:    MBP41.00C1.B03
  SMC Version:    1.28f1
  Serial Number:    W88131QCYP3
  Sudden Motion Sensor:
  State:    Enabled

GeForce 8600M GT:

  Chipset Model:    GeForce 8600M GT
  Type:    Display
  Bus:    PCIe
  PCIe Lane Width:    x16
  VRAM (Total):    512 MB
  Vendor:    NVIDIA (0x10de)
  Device ID:    0x0407
  Revision ID:    0x00a1
  ROM Revision:    3212
  Displays:
Color LCD:
  Display Type:    LCD
  Resolution:    1680 x 1050
  Depth:    32-bit Color
  Built-In:    Yes
  Core Image:    Hardware Accelerated
  Mirror:    Off
  Online:    Yes
  Quartz Extreme:    Supported
Comment 1 Asim Salam 2008-11-11 16:00:48 UTC
Created an attachment (id=835) [details]
gdm log file pointed to by svcs -x -v
Comment 2 Alan Coopersmith 2008-11-11 16:27:02 UTC
*** Bug 4834 has been marked as a duplicate of this bug. ***
Comment 3 Alan Coopersmith 2008-11-11 16:29:50 UTC
See also bug report 4834 for more info, and 4810 for what is probably the
same root cause.
Comment 4 Brian Cameron 2008-11-21 13:26:19 UTC
I just fixed this bug in vermillion, and am asking for permission to put it
into stable for the 09.04 release.
Comment 5 Alan Coopersmith 2008-11-24 18:45:04 UTC
*** Bug 5367 has been marked as a duplicate of this bug. ***
Comment 6 Brian Cameron 2008-11-25 02:41:05 UTC
I got permission, so this fix is going into build 105, and will make the 09.04
release.
Comment 7 Bryce Lin 2008-12-08 14:14:33 UTC
Currently (the 08.11 release), is there any workaround solution to solve this
issue?
Comment 8 Brian Cameron 2008-12-08 14:23:08 UTC
Created an attachment (id=1127) [details]
gdm.xml file
Comment 9 Brian Cameron 2008-12-08 14:23:48 UTC
Created an attachment (id=1128) [details]
svc-gdm file
Comment 10 Brian Cameron 2008-12-08 14:29:40 UTC
Replace /var/svc/manifest/application/graphical-login/gdm.xml with the
attached.
Make sure it has the same ownership (root:sys) and 444 permissions.

Put the attached svc-gdm in /lib/svc/method and make sure it has root:bin
ownership and 555 permissions.

Make sure these lines are removed from /usr/sbin/gdm.  If they don't exist in
the file, don't worry about doing this step.

----

# GConf now needs D-Bus, so to launch AT programs it is necessary for D-Bus to
# be started with gdm.  We start D-Bus as the "gdm" user.  We do not do not
# need root privilege for this since the GUI and AT programs all run as the
# "gdm" user.
#
eval `/usr/bin/su - gdm -c /usr/bin/dbus-launch --sh-syntax
--exit-with-session`
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID

----

Once you do this, it should work.
Comment 11 Brian Cameron 2008-12-08 14:30:08 UTC
Oh, you need to either reload and restart the GDM service after doing this, or
simply reboot.
Comment 12 Bryce Lin 2008-12-09 22:11:29 UTC
After apply the suggested changes and reboot, I started to experience issue
with opensolaris startup. I am using VMWare Fusion on Macbook Pro. The
opensolaris vm hangs for long time and cannot start up. I have to power off the
vm and start it again. The issue does not happen every time, but quite
frequently. Not sure if it relates to the changes.
Comment 13 Brian Cameron 2008-12-10 00:09:38 UTC
It is hard for me to imagine how this change could affect login in the way you 
describe.

It would be good to check the following SMF log file to see if there are any
error messages which might indicate some problem with the SMF integration
files.

/var/svc/log/application-graphical-login-gdm:default.log 

You could also try editing /usr/share/gdm/defaults.conf and set enable=true in
the "[debug]" section, then reboot.  GDM will then send debug messages to the
/var/adm/messages file.

Then please recreate the situation where GDM hangs, and then email me
(Brian.Cameron@sun.com) the GDM-related messages from your syslog, and I'll see
if I can help figure out what might be happening here.
Comment 14 Brian Leonard 2008-12-10 06:22:47 UTC
Would there be any consideration to making a 2008.11 update available for this
bug. I know it's harmless, but it's also very unprofessional.
Comment 15 Anthony Maslowski 2009-01-16 09:01:44 UTC
I've hit the same issue as the gentleman in comment #12.

I'll follow the recommendations to turn on debug in comment #13 and provide the
info when I have time, but wanted to post here now with confirmation of that
issue.

I am also using VM Fusion on a MacBook Pro.

One small variation is that I hang on startup (at the blue opensolaris window
with the scrolling red bar directly after the GRUB menu) EVERY time.  The only
way I've found to boot after applying the changes recommended in comment #10 is
to either go to a previous boot image, or boot in text mode, take out the
changes and restart.  That also resolves the issue, but does not correct the
missing shutdown option...
Comment 16 Yoon Chung 2009-01-24 01:50:18 UTC
Same problem as reported by Comments #12 and #15.  Using VMWare Workstation
6.5.1 build 126130. Powering down the VM and powering up will work
occasionally, but will hang more often than not, as described in the above
comments.

Perhaps it's an issue with VMWare?
Comment 17 Brian Cameron 2009-01-26 12:18:11 UTC
I suspect that the startup errors you are experiencing are not related to this
change.  The only change made was to use the /lib/svc/method/svc-gdm script for
startup and shutdown, and the shutdown now ignores a non-zero return code from
gdm-stop.  

It might be helpful if you were able to boot to single-user mode, turn on debug
in the GDM configuration, and provide any "gdm" related debug messages in your
syslog (/var/adm/messages).  If GDM is having a problem starting up, there may
be useful debug messages here.  Also, checking the Xorg logs in /var/log might
show something useful.
Comment 18 Rudy Vissers 2009-02-25 03:50:11 UTC
I followed the steps described in comment #10 and OpenSolaris did not boot
anymore !
I had to rollback the changes and then OpenSolaris can boot.

This is an excerpt from 

/var/svc/log/application-graphical-login-gdm:default.log

When it is OK

[ Feb 25 10:16:22 Enabled. ]
[ Feb 25 10:16:42 Executing start method ("/usr/sbin/gdm"). ]
[ Feb 25 10:16:42 Method "start" exited with status 0. ]

After the changesand OpenSolaris does not boot anymore !

[ Feb 25 11:54:41 Enabled. ]
[ Feb 25 11:54:50 Rereading configuration. ]
[ Feb 25 11:55:00 Executing start method ("/lib/svc/method/svc-gdm start"). ]
[ Feb 25 11:55:00 Method "start" exited with status 0. ]
[ Feb 25 11:55:00 Stopping because all processes in service exited. ]
[ Feb 25 11:55:00 Executing stop method ("/lib/svc/method/svc-gdm stop"). ]
/var/run/gdm.pid doesn't exist, perhaps GDM isn't running
[ Feb 25 11:55:00 Method "stop" exited with status 0. ]
[ Feb 25 11:55:00 Executing start method ("/lib/svc/method/svc-gdm start"). ]
[ Feb 25 11:55:00 Method "start" exited with status 0. ]
[ Feb 25 11:55:00 Stopping because all processes in service exited. ]
[ Feb 25 11:55:00 Executing stop method ("/lib/svc/method/svc-gdm stop"). ]
/var/run/gdm.pid doesn't exist, perhaps GDM isn't running
[ Feb 25 11:55:00 Method "stop" exited with status 0. ]
[ Feb 25 11:55:00 Executing start method ("/lib/svc/method/svc-gdm start"). ]
[ Feb 25 11:55:00 Method "start" exited with status 0. ]
[ Feb 25 11:55:00 Stopping because all processes in service exited. ]
[ Feb 25 11:55:00 Executing stop method ("/lib/svc/method/svc-gdm stop"). ]
/var/run/gdm.pid doesn't exist, perhaps GDM isn't running

The operating system is entering a loop and nothing happens.

After I did the change back to the original files, Open Solaris booted again.

SunOS catalogne 5.11 snv_101b i86pc i386 i86pc
Comment 19 Rudy Vissers 2009-02-25 03:58:04 UTC
(In reply to comment #14)
> Would there be any consideration to making a 2008.11 update available for this
> bug. I know it's harmless, but it's also very unprofessional.

I do agree 100% with Brian, it is very unprofessional. As Sun consultant if I
want to demo Open Solaris to a customer I cannot show the shutdown procedure...
A blank screen, messages from the console... How is this possble ? :-(
Comment 20 Jeff Logullo 2009-03-02 09:52:14 UTC
(In reply to comment #18)
> I followed the steps described in comment #10 and OpenSolaris did not boot
> anymore !
> I had to rollback the changes and then OpenSolaris can boot.

Double-check your edit of /usr/sbin/gdm to be certain that you did *not* remove
the line following the section you were supposed to remove. That line is

  exec /usr/sbin/gdm-binary "$@"

and it needs to be there. If it's not, you'll experience the behavior you
describe.
Comment 21 Duncan Groenewald 2009-03-16 03:20:20 UTC
(In reply to comment #20)
> (In reply to comment #18)
> > I followed the steps described in comment #10 and OpenSolaris did not boot
> > anymore !
> > I had to rollback the changes and then OpenSolaris can boot.
> 
> Double-check your edit of /usr/sbin/gdm to be certain that you did *not* remove
> the line following the section you were supposed to remove. That line is
> 
>   exec /usr/sbin/gdm-binary "$@"
> 
> and it needs to be there. If it's not, you'll experience the behavior you
> describe.

I have the same white screen problem when shutting down, also I never get to
see the message saying the file system has shutdown (can't recall what the
usual message is anymore) and the server never powers off.

I tried applying the fix as described above and now I just get the white screen
with the initial shutdown message not the gdm error message.

svc.startd[7]: application/graphical-login/gdm:default failed. Transitioned to
maintenance. See svcs -x -v

Is there a bug against 2008.11 for the system not shutting down properly ?

How do I know when it is safe to manually power off the server ?