indicator-datetime-service crashed with SIGSEGV in g_date_time_to_instant()

Bug #1216263 reported by rolmops
96
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Indicator Date and Time
Fix Released
Medium
Ted Gould
indicator-datetime (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

indicator-datetime-service crashed with SIGSEGV in g_date_time_to_unix()

ProblemType: Crash
DistroRelease: Ubuntu 13.10
Package: indicator-datetime 12.10.3+13.10.20130731-0ubuntu1
ProcVersionSignature: Ubuntu 3.11.0-3.7-generic 3.11.0-rc6
Uname: Linux 3.11.0-3-generic i686
ApportVersion: 2.12.1-0ubuntu2
Architecture: i386
CrashCounter: 1
Date: Wed Aug 21 23:41:40 2013
ExecutablePath: /usr/lib/i386-linux-gnu/indicator-datetime-service
ExecutableTimestamp: 1375236948
InstallationDate: Installed on 2013-06-07 (75 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha i386 (20130607)
MarkForUpload: True
ProcCmdline: /usr/lib/i386-linux-gnu/indicator-datetime-service
ProcCwd: /home/ub1310
ProcEnviron:
 LANGUAGE=ru
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=ru_RU.UTF-8
 SHELL=/bin/bash
SegvAnalysis:
 Segfault happened at: 0xb735e6d9: mov 0xc(%eax),%eax
 PC (0xb735e6d9) ok
 source "0xc(%eax)" (0x0000000c) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: indicator-datetime
StacktraceTop:
 ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
 g_date_time_to_unix () from /lib/i386-linux-gnu/libglib-2.0.so.0
 ?? ()
 indicator_datetime_planner_get_appointments ()
 ?? ()
Title: indicator-datetime-service crashed with SIGSEGV in g_date_time_to_unix()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
rolmops (dr150259) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_date_time_to_instant (datetime=datetime@entry=0x0) at /build/buildd/glib2.0-2.37.6/./glib/gdatetime.c:503
 g_date_time_to_unix (datetime=datetime@entry=0x0) at /build/buildd/glib2.0-2.37.6/./glib/gdatetime.c:1899
 my_get_appointments (planner=0x9dfbc10, begin_datetime=0x0, end_datetime=0xb5005e78) at planner-eds.c:152
 indicator_datetime_planner_get_appointments (self=0x9dfbc10, begin=begin@entry=0x0, end=end@entry=0xb5005e78) at planner.c:188
 get_all_appointments_this_month (self=0x9df98c8) at service.c:592

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in indicator-datetime (Ubuntu):
importance: Undecided → Medium
summary: - indicator-datetime-service crashed with SIGSEGV in g_date_time_to_unix()
+ indicator-datetime-service crashed with SIGSEGV in
+ g_date_time_to_instant()
tags: removed: need-i386-retrace
Charles Kerr (charlesk)
information type: Private → Public
Changed in indicator-datetime:
status: New → In Progress
assignee: nobody → Charles Kerr (charlesk)
importance: Undecided → Medium
Revision history for this message
Charles Kerr (charlesk) wrote :

> #3 0x0804c0ce in indicator_datetime_planner_get_appointments (self=0x9dfbc10,
> begin=begin@entry=0x0, end=end@entry=0xb5005e78) at planner.c:188
> appointments = <optimized out>
> __PRETTY_FUNCTION__ = "indicator_datetime_planner_get_appointments"
> #4 0x0804d5d2 in get_all_appointments_this_month (self=0x9df98c8) at service.c:592
> calendar_date = 0xb5005ca8
> begin = <optimized out>
> end = 0xb5005e78
> y = 2013
> m = 8
> d = 21
> appointments = 0x0
> p = 0x9df9850

Here's the code in indicator-datetime:

> calendar_date = get_calendar_date (self);
> g_date_time_get_ymd (calendar_date, &y, &m, &d);
> begin = g_date_time_new_local (y, m, 1,
> 0, 0, 0);
> end = g_date_time_new_local (y, m, g_date_get_days_in_month(m,y),
> 23, 59, 0);
>
> appointments = indicator_datetime_planner_get_appointments (p->planner,
> begin,
> end);

So calendar_date is non-NULL and get_all_appointments_this_month() got a ymd of 2013/8/21 out of it, then created 'begin' with g_date_time_new_local (2013, 8, 1, 0, 0, 0), and passes it to indicator_datetime_planner_get_appointments(), which sees it as NULL.

So it looks like g_date_time_new_local() is returning NULL. It's a wrapper func that gets the local timezone and calls g_date_time_new(), which returns NULL if it's fed invalid arguments. 2013, 8, 1, 0, 0, 0 seem valid.

The sanity check in g_date_time_new() looks like this:

> if (year < 1 || year > 9999 ||
> month < 1 || month > 12 ||
> day < 1 || day > 31 ||
> hour < 0 || hour > 23 ||
> minute < 0 || minute > 59 ||
> seconds < 0.0 || seconds >= 60.0)
> return NULL;

seconds is a gdouble, so maybe this is a floating point accuracy issue with testing "0.0 < 0.0"?

Charles Kerr (charlesk)
Changed in indicator-datetime:
assignee: Charles Kerr (charlesk) → Ted Gould (ted)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:indicator-datetime at revision 252, scheduled for release in indicator-datetime, milestone Unknown

Changed in indicator-datetime:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-datetime - 13.10.0+13.10.20130913-0ubuntu1

---------------
indicator-datetime (13.10.0+13.10.20130913-0ubuntu1) saucy; urgency=low

  [ Charles Kerr ]
  * Make the EDS planner nonblocking. (LP: #1204532)
  * Minor changes that eliminate unnecessary temporary strings.
  * This change adds a GSettings* arg to the utils functions so that
    they don't have to churn through temporary GSettings objects. These
    functions are usually called in a loop, causing a lot of GSettings
    temporaries, even though the calling code already has an instance
    for that GSettings schema.
  * name says it all; this branch is for improving indicator-datetime
    test coverage.
  * Remove code duplication between timezone-file and timezone-geoclue.
  * Adds a title in the header's action state. (LP: #1223635)

  [ Ted Gould ]
  * Fix GeoClue signal handler to have proper prototype. (LP: #1195874)
  * Protect against invalid begin or end dates. (LP: #1216263)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 256
 -- Ubuntu daily release <email address hidden> Fri, 13 Sep 2013 15:16:38 +0000

Changed in indicator-datetime (Ubuntu):
status: New → Fix Released
Ted Gould (ted)
Changed in indicator-datetime:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.