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 673640 - gnome-settings-daemon crashes in get_slide() when time goes back
gnome-settings-daemon crashes in get_slide() when time goes back
Status: RESOLVED DUPLICATE of bug 673551
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
3.4.x
Other Linux
: Normal critical
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-04-06 12:57 UTC by Milan Bouchet-Valat
Modified: 2012-04-06 13:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Milan Bouchet-Valat 2012-04-06 12:57:06 UTC
This is a problem I experience every time my laptop shuts down because of lack of battery. On the next start, for a silly reason, my clock is wrong, and often is in the future. Then, gnome-settings-daemon crashes on login, which makes it impossible to use the machine unless you know you to close the fail whale, etc. I did not test 3.4, but the assert is still there, so it probably still happens.

Even several successive attempts are not enough to fix it. But simply connecting to the network so that ntpd fixes the clock fixes everything.

The stack trace is below, but it's actually "just" an assertion failure in gnome-bg.c. I find is very dangerous to make gnome-settings-daemon abort just because something unexpected happened. If possible, libgnome-desktop should recover as well as possible instead. The relevant code is:

	/* this should never happen since we have slides and we should always
	 * find a current slide for the elapsed time since beginning -- we're
	 * looping with fmod() */
	g_assert_not_reached ();

http://git.gnome.org/browse/gnome-desktop/tree/libgnome-desktop/gnome-bg.c#n1656


I don't exactly understand what's the problem with time being in the future as long as it doesn't change while gnome-settings-daemon is running. g-s-d crashes before the network is up, and before the logs show that ntpd was able to connect to the time servers. So maybe it gets some old timestamp from a file? I can run tests if needed.

/var/log/messages says:
Apr  7 12:21:14 milan ntpd_intres[1584]: host name not found: 0.fedora.pool.ntp.
org
Apr  7 12:21:14 milan ntpd_intres[1584]: host name not found: 1.fedora.pool.ntp.
org
Apr  7 12:21:14 milan ntpd_intres[1584]: host name not found: 2.fedora.pool.ntp.
org
Apr  7 12:21:14 milan ntpd_intres[1584]: host name not found: 3.fedora.pool.ntp.
org
[...]
Apr  7 12:21:17 milan abrtd: Directory 'ccpp-2003-04-07-12:21:16-1597' creation detected
Apr  7 12:21:17 milan abrt[1671]: Saved core dump of pid 1597 (/usr/libexec/gnome-settings-daemon) to /var/spool/abrt/ccpp-2003-04-07-12:21:16-1597 (43352064 bytes)
Apr  7 12:21:17 milan gnome-session[1430]: WARNING: Application 'gnome-settings-daemon.desktop' killed by signal
Apr  7 12:21:18 milan abrt[1776]: Not dumping repeating crash in '/usr/libexec/gnome-settings-daemon'
[Time changes later to April 6]




Thread 1 (Thread 0x7fe7b71c4940 (LWP 1617))

  • #0 __GI_raise
    at ../nptl/sysdeps/unix/sysv/linux/raise.c line 64
  • #1 __GI_abort
    at abort.c line 91
  • #2 g_assertion_message
    at gtestutils.c line 1425
  • #3 get_current_slide
    at gnome-bg.c line 1618
  • #4 get_pixbuf_for_size
    at gnome-bg.c line 2223
  • #5 draw_each_monitor
    at gnome-bg.c line 967
  • #6 gnome_bg_draw
    at gnome-bg.c line 990
  • #7 gnome_bg_create_surface
    at gnome-bg.c line 1108
  • #8 draw_background
    at gsd-background-manager.c line 211
  • #9 draw_background
    at gsd-background-manager.c line 184
  • #10 g_closure_invoke
    at gclosure.c line 774
  • #11 signal_emit_unlocked_R
    at gsignal.c line 3272
  • #12 g_signal_emit_valist
    at gsignal.c line 3003
  • #13 g_signal_emit
    at gsignal.c line 3060
  • #14 do_changed
    at gnome-bg.c line 233
  • #15 do_changed
    at gnome-bg.c line 223
  • #16 g_timeout_dispatch
    at gmain.c line 3907
  • #17 g_main_dispatch
    at gmain.c line 2441
  • #18 g_main_context_dispatch
    at gmain.c line 3011
  • #19 g_main_context_iterate
    at gmain.c line 3089
  • #20 g_main_loop_run
    at gmain.c line 3297
  • #21 gtk_main
    at gtkmain.c line 1362
  • #22 main
    at main.c line 459

https://bugzilla.redhat.com/show_bug.cgi?id=737298
Comment 1 Milan Bouchet-Valat 2012-04-06 13:00:57 UTC
OK, just understood something: clock is not in the future, it's in the past, but by a few years. So g-s-d must be using a timestamp loaded from a file, and of course no slide exists between the last timestamp and a timestamp that occurred much before it.

Apr  6 13:22:14 milan ntpd[1575]: 0.0.0.0 c61c 0c clock_step +284000401.457757 s
(this is about 9 years back)
Comment 2 Olav Vitters 2012-04-06 13:36:44 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 673551 ***