Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142600 - gnome-session-2.14.2 hangs (often) after a fresh boot
Summary: gnome-session-2.14.2 hangs (often) after a fresh boot
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-02 18:57 UTC by Francois Chenier
Modified: 2006-08-10 07:02 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
content of .xessions-errors (bug,862 bytes, text/plain)
2006-08-03 12:53 UTC, Fab
Details
emerge --info (bug,2.44 KB, text/plain)
2006-08-03 12:55 UTC, Fab
Details
emerge --info (info,2.51 KB, text/plain)
2006-08-03 13:39 UTC, Francois Chenier
Details
gnome-session backtrace (gnome-session.out,8.85 KB, text/plain)
2006-08-03 16:49 UTC, Francois Chenier
Details
esd backtrace (esd.out,2.08 KB, text/plain)
2006-08-03 19:07 UTC, Francois Chenier
Details
two parallel esd process : backtrace from gdb (gdb_esd_process,6.62 KB, text/plain)
2006-08-04 07:58 UTC, Fab
Details
gnome-session backtrace from gdb (gdb_gnome_session_process,9.35 KB, text/plain)
2006-08-04 08:01 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Chenier 2006-08-02 18:57:42 UTC
I don't know if I'm alone having this bug but it seems I found a race condition leading to a hang of gnome-session when system is heavily loaded and generally after a fresh reboot of my laptop. I don't sure if problem is in media-sound/esound-0.2.36 and/or gnome-base/gnome-session-2.14.2 but to fix this issue I must either ...

1) kill the running 'esd' process when gnome-session hangs after a login (the session continues normally after that)

or to fix the problem permanently

2) apply the following patch to 'gsm-sound.c' requesting to gnome-session to start esound server as a background process

+++ gnome-session/gsm-sound.c	2006-08-03 10:45:02.000000000 +0930
@@ -57,7 +57,7 @@
   GError *err = NULL;
   time_t starttime;
 
-  if (!g_spawn_command_line_async (ESD_SERVER" -nobeeps", &err))
+  if (!g_spawn_command_line_async (ESD_SERVER" -nobeeps &", &err))
     {
       g_warning ("Could not start esd: %s\n", err->message);
       g_error_free (err);

The patch works fine w/o any side effect.
Comment 1 foser (RETIRED) gentoo-dev 2006-08-03 10:19:24 UTC
g_spawn_*_async should not block, the '&' is strictly speaking redundant.

Does the message "Could not start esd:" show up in your ~/.xsession-errors file before or after killing esd (without the patch of course) ?
Comment 2 Fab 2006-08-03 12:50:58 UTC
Bug confirmed here on x86 since one month.
I just killed esd after fresh reboot, and the gnome desktop appear.

When the desktop hangs :
# ps aux | grep esd
fab     8018  0.0  1.2   3784  2336 ?        SL   21:41   0:00 /usr/bin/esd -nobeeps
fab     8025  0.0  0.2   2924   508 ?        Ss   21:41   0:00 /usr/bin/esd -nobeeps

Comment 3 Fab 2006-08-03 12:53:12 UTC
Created attachment 93373 [details]
content of .xessions-errors

content of .xsession-errors when the desktop hangs
Comment 4 Fab 2006-08-03 12:55:58 UTC
Created attachment 93374 [details]
emerge --info

emerge --info
Comment 5 Francois Chenier 2006-08-03 13:39:23 UTC
Created attachment 93376 [details]
emerge --info

Exactly the same as above for the my .x-session file. Here is my emerge --info.
Comment 6 foser (RETIRED) gentoo-dev 2006-08-03 15:27:00 UTC
Can you run gnome-session in gdb and create a backtrace when it hangs (with debugging info) ?
Comment 7 Francois Chenier 2006-08-03 16:49:14 UTC
Created attachment 93385 [details]
gnome-session backtrace

Not very familiar with gdb but this should be OK. Repeated twice to be sure. When I start 'bt' I receive a warning from gdb (Previous frame inner to this frame (corrupt stack?)) but it's possibly because I compile with the -fomit-frame-pointer flag.
Comment 8 Francois Chenier 2006-08-03 19:07:12 UTC
Created attachment 93395 [details]
esd backtrace

Backtrace for the 'locking' esd process. Hope this help to find the bug.
Comment 9 Francois Chenier 2006-08-04 06:00:41 UTC
I found something *very* weird and now we can change the Summary of the bug from
  "gnome-session-2.14.2 hangs (often) after a fresh boot"
to
  "gnome-session-2.14.2 hangs (less often) after a fresh boot"

For same laptop (of coarse)
-Occurence of the bug with vanilla-sources-2.6.17.7 : 50% to 60%
-Occurence of the bug with vanilla-sources-2.6.18-rc3 : ~10%

Hopefully when gnome-session hangs backtraces provided are the same for both kernels (fiou!) but with kernel 2.6.18-rc3 I saw only once instance of esd daemon instead of two which seems typical of 2.6.17 kernels.

Patrice - don't upgrade your kernel if you have the problem !!!

Time to invite another party to join us ?
Comment 10 Fab 2006-08-04 07:58:34 UTC
Created attachment 93419 [details]
two parallel esd process : backtrace from gdb

Too late. Unfortunately, I upgraded my kernel last week to 2.6.17-r4 (gentoo-sources), and, I made a clean up of old kernels with their config files. I tried to boot on a 2.6.16-r12, same issue. Bug's occurence with both kernels : 100%.

On my second computer which is full ~x86, this bug appeared two months ago, but disappeared itself a few weeks later.
But, bad luck : it happened once this morning on it :)

When it happens, the xrdb process is marqued as defunct with the ps aux command.
I also noticed that a restart of the xdm init script fix the issue until next reboot (my hack since one month).

The attached file contains the two esd process's backtrace from gdb.
I'll attach another file containing the gnome-session backtrace.

I don't know if debug infos are suffisant, maybe I should rebuild my world with the debug useflag, but in this case, it will take time.
Comment 11 Fab 2006-08-04 08:01:26 UTC
Created attachment 93420 [details]
gnome-session backtrace from gdb
Comment 12 John N. Laliberte (RETIRED) gentoo-dev 2006-08-07 06:49:01 UTC
please comment on the duped bug.

*** This bug has been marked as a duplicate of 133599 ***
Comment 13 Fab 2006-08-07 08:00:34 UTC
(In reply to comment #12)
> please comment on the duped bug.
> 
> *** This bug has been marked as a duplicate of 133599 ***
> 

bug #133599 is not duplicate of this bug (I had it also, but now it's fixed)

On my systems, g-v-m is not launched on startup : I don't want it.
(and I think bug #133599 has been fixed : it is duplicate of bug #140040)
Comment 14 Fab 2006-08-07 08:42:02 UTC
I forgot most important : please reopen this bug.

Definitively not duplicate : splashscreen disappear, the two panel appear in top and bottom of the screen, but they are empty, and nothing else.

Then, I login to a tty, and :
 $ killall esd

Switch back to X, and the gnome desktop is here.

Thanks.
Comment 15 Fab 2006-08-07 12:46:37 UTC
I think I found a workaround, from the gnome menu :

Desktop --> Preferences --> Sound

In the Sounds tab :

 [x] Enable software sound mixing (ESD)
 [ ] Play system sounds

And gnome start without this bug.
If I check 'Play system sounds' ==> bug after a reboot.
Comment 16 Fab 2006-08-07 12:53:13 UTC
I forgot to tell that I recently did a fresh installation of gentoo on a toshiba laptop, with gnome-light, and unfortunately, this bug is also here.
Comment 17 Francois Chenier 2006-08-07 15:36:46 UTC
(In reply to comment #15)
> I think I found a workaround, from the gnome menu :
> 
> In the Sounds tab :
> 
>  [x] Enable software sound mixing (ESD)
>  [ ] Play system sounds

Not working for me. I don't remember the last time I unchecked this feature so it's not a fix for this bug.

Patrice seems right about bug 133599 not being a duplicate of this bug. Problems described in bug 133599 are classified FIXED for me (& I insist *for me*) :-)
Comment 18 Francois Chenier 2006-08-07 16:52:26 UTC
> Not working for me. I don't remember the last time I unchecked this feature so
> it's not a fix for this bug.

> If I check 'Play system sounds' ==> bug after a reboot.

It's quite logical because gnome-session is waiting something from esd & there is no need to launch esd when you are not playing system sound. I noticed that too.

Killing esd to restore desktop just confirms bug is somewhere in gnome-session/esd (compatibility issue ?) or deeper in the system (beyond esd ?).
Comment 19 Francois Chenier 2006-08-07 22:21:47 UTC
(In reply to comment #12)
> 
> *** This bug has been marked as a duplicate of 133599 ***
> 

John, finally if you're right just do the following thing to fix bug 133599. It should work too if it's the same bug as this one (15 successful fresh reboot in a row - initially it was 50% chances to hang the first time I filled the bug)!

1) Upgrade your kernel to 2.16.8-rc3 (not sure it's really important),
2) Dump/build-in alsa sound drivers in your kernel (not as modules) !!!

My fix probably hide the real problem which is likely in media-sound/esound and/or media-libs/alsa-lib packages (probably something like gnome-session starting esd daemon when alsa has not finished to load). This bug just show a weakness (& not a bug) in gnome-session which seems not being able to cope with an unexpected behavior/bug/whatever of esd daemon.

Like Patrice, I thing this bug should be reopened and reassigned to someone else than /dev/null party.
Comment 20 Francois Chenier 2006-08-08 04:11:42 UTC
Look at this guys. Same problem with FC5 ...

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=189744
Comment 21 Fab 2006-08-09 02:17:23 UTC
Mayber related :
http://bugzilla.gnome.org/show_bug.cgi?id=345187

And look at this one :
http://bugzilla.gnome.org/show_bug.cgi?id=311240

[quote]

You could just run esound as a daemon instead of having applications spawn one.
 The latter use pattern is strongly discouraged.
|...]
I'm no longer willing to support autospawning, since it's fundamentally broken.

[/quote]




==> on my buggy gentoo, I re-activate system sounds, and I ran :

  # rc-update add esound default

==> works well now.
Comment 22 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-08-09 20:19:51 UTC
It's apparent to me this is not a duplicate
Comment 23 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-08-10 06:42:05 UTC
It seems upstream isn't willing to support esd in non-daemon mode.  I'm willing to go with that.  Gstreamer is the future of sound in gnome anyway, so esd will eventually die.

Thanks for finding this, we'll start recommending anyone using esd run it at system startup.
Comment 24 Francois Chenier 2006-08-10 07:02:21 UTC
(In reply to comment #23)
>
> Thanks for finding this, we'll start recommending anyone using esd run it at
> system startup.
> 

Please, can you add this info in the ebuild to inform all users ?