Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 435424 - [gnome-overlay] gnome-base/gdm-3.5.91: daemonize patch should daemonize before calling anything else in main()
Summary: [gnome-overlay] gnome-base/gdm-3.5.91: daemonize patch should daemonize befor...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: All Linux
: Normal major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://bugzilla.gnome.org/show_bug.c...
Whiteboard:
Keywords:
Depends on:
Blocks: gnome3.6
  Show dependency tree
 
Reported: 2012-09-18 15:18 UTC by Tom Wijsman (TomWij) (RETIRED)
Modified: 2012-10-28 18:20 UTC (History)
0 users

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


Attachments
gdm-3.5.91-fix-daemonize-regression.patch manually adjusted to fix the dbus thread exiting to soon due to daemonization. (file_435424.txt,3.83 KB, text/plain)
2012-09-18 15:20 UTC, Tom Wijsman (TomWij) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-09-18 15:18:42 UTC
See https://bugzilla.gnome.org/show_bug.cgi?id=683755#c20

Reproducible: Always

Steps to Reproduce:
1. Install gdm-3.5.91-r1
2. Reboot, log in as root, run `gdm` or `/etc/init.d/xdm start` (with gdm).
Actual Results:  
DEBUG(+): Lost GDM name on bus

Expected Results:  
Gdm starting just fine.

Because daemonize happens around the bus_reconnect call , the dbus thread waiting for the NameAcquired response gets killed way to soon so it doesn't know it acquired the name. This is evidenced in the attached strace to that upstream bug.

Putting the deamonize before g_type_init solves this particular bug.
Comment 1 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-09-18 15:20:49 UTC
Created attachment 324210 [details]
gdm-3.5.91-fix-daemonize-regression.patch manually adjusted to fix the dbus thread exiting to soon due to daemonization.
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2012-09-18 15:22:57 UTC
An alternative to this is getting rid of the patch and instead patching /usr/sbin/gdm (which is a shell script)
to do exec setsid /usr/sbin/gdm-binary "$@"

Adding that setsid will result in the same behavior as the corrected C patch.
Comment 3 Alexandre Rostovtsev (RETIRED) gentoo-dev 2012-10-28 18:20:34 UTC
I believe this was fixed in >=gdm-3.6.0, which has a rewritten daemonize patch.

Please reopen if the bug still occurs with the current gdm from the gnome overlay.