redshift crashed with SIGSEGV in geoclue_master_client_set_requirements() when started outside of a X session

Bug #888661 reported by Daniel Hahler
136
This bug affects 22 people
Affects Status Importance Assigned to Milestone
Redshift
Invalid
Undecided
Unassigned
redshift (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I am using redshift since yesterday (again), and it crashed now during boot.

I have added it to /etc/rc.local like so:

    sudo -u myuser redshift &

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: redshift 1.7-0ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-13.22-generic-pae 3.0.6
Uname: Linux 3.0.0-13-generic-pae i686
ApportVersion: 1.23-0ubuntu4
Architecture: i386
Date: Thu Nov 10 19:08:27 2011
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/redshift
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
ProcCmdline: redshift
ProcEnviron:
 PATH=(custom, no user)
 SHELL=/usr/bin/zsh
SegvAnalysis:
 Segfault happened at: 0xb74073b6 <geoclue_master_client_set_requirements+134>: mov (%eax),%eax
 PC (0xb74073b6) ok
 source "(%eax)" (0x00000000) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: redshift
StacktraceTop:
 geoclue_master_client_set_requirements () from /usr/lib/libgeoclue.so.0
 ?? ()
 ?? ()
 ?? ()
 __libc_start_main () from /lib/i386-linux-gnu/libc.so.6
Title: redshift crashed with SIGSEGV in geoclue_master_client_set_requirements()
UpgradeStatus: Upgraded to oneiric on 2011-09-29 (41 days ago)
UserGroups: adm admin cdrom dialout libvirtd lpadmin plugdev sambashare vboxusers
XsessionErrors:
 (nautilus:3213): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed
 (nautilus:3213): Gtk-CRITICAL **: gtk_action_set_visible: assertion `GTK_IS_ACTION (action)' failed
 (gwibber-service:3606): libindicate-WARNING **: Menu being changed when the indicator is visible. Listeners will NOT be notified of this change.
 (gnome-settings-daemon:3163): libappindicator-WARNING **: Unable to connect to the Notification Watcher: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.80 was not provided by any .service files

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 org_freedesktop_Geoclue_MasterClient_set_requirements (error=0xbfec0298, IN_allowed_resources=1, IN_require_updates=0, IN_time=0, IN_accuracy_level=2, proxy=Cannot access memory at address 0x0
 geoclue_master_client_set_requirements (client=0x0, min_accuracy=GEOCLUE_ACCURACY_LEVEL_REGION, min_time=0, require_updates=0, allowed_resources=GEOCLUE_RESOURCE_NETWORK, error=0xbfec0298) at geoclue-master-client.c:357
 location_geoclue_start (state=0xbfec04cc) at location-geoclue.c:62
 provider_try_start (provider=0x804f320, state=0xbfec04cc, config=<optimized out>, args=<optimized out>) at redshift.c:453
 main (argc=1, argv=0xbfec05a4) at redshift.c:886

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 redshift (Ubuntu):
importance: Undecided → Medium
tags: removed: need-i386-retrace
Daniel Hahler (blueyed)
visibility: private → public
description: updated
Revision history for this message
Jon Lund Steffensen (jonls) wrote : Re: redshift crashed with SIGSEGV in geoclue_master_client_set_requirements()

You'll need to run redshift in an X session. I don't think it is possible to start it from /etc/rc.local.

Changed in redshift:
status: New → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redshift (Ubuntu):
status: New → Confirmed
Revision history for this message
José Lou Chang (obake) wrote :

Running Xubuntu Precise 64 bit Live USB and I encoutered the same problem.

Redshift crashed upon changing the Time Zone with "sudo dpkg-reconfigure tzdata" and initiating RedSfhit within the menu.

The Xubuntu image is from the Daily Iso downloaded today at March 8, 2012.

Revision history for this message
José Lou Chang (obake) wrote :

I get the following when running in the Terminal:

xubuntu@xubuntu:~$ redshift

GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
Segmentation fault (core dumped)

----------------------------------------------------------------------------------------------

Second output:

xubuntu@xubuntu:~$ gtk-redshift

** WARNING **: Trying to register gtype 'GMountMountFlags' as enum when in fact it is of type 'GFlags'

** WARNING **: Trying to register gtype 'GDriveStartFlags' as enum when in fact it is of type 'GFlags'

GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed

tags: added: precise
Revision history for this message
Nuno Sucena Almeida (slug-debian) wrote :

See attachment for back trace running on (x)ubuntu 12.10 64bit.

tags: added: raring
Revision history for this message
Mélodie (meets) wrote :

Hi,

Why after 3 years this bug report was started, (and the other ones affecting redshift) it has not yet been solved? I also use Archlinux daily and there redshift gtk has worked each day without ever failing, so there must be something wrong with the compiling, or the packaging, or the source?

I tried to install it again today after several months not trying. Here are the relevant information:

$ uname -a
Linux peluche 3.8.0-37-generic #53~precise1-Ubuntu SMP Wed Feb 19 21:39:14 UTC 2014 i686 i686 i386 GNU/Linux

$ gdb redshift
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /usr/bin/redshift...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/redshift
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".

(process:5221): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
0xb7fc93a6 in geoclue_master_client_set_requirements ()
   from /usr/lib/libgeoclue.so.0
(gdb) continue
Continuing.

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb)

and I am adding an strace invoked against /usr/bin/redshift as a txt file as attachment. Indeed it crashes very nicely. :/

Please sir devs and packagers, try to fix it! This program is very good for the sake of the sight.

Regards,
Mélodie

Daniel Hahler (blueyed)
Changed in redshift (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Daniel Hahler (blueyed) wrote :

FWIW, I am using redshift from Ubuntu Trusty on a Saucy system (13.10), and it runs fine most of the time for me.
It happened that it wasn't running (after suspend or reboot, I do not remember exactly).

@Mélodie: you might have better luck reporting this problem upstream directly: https://github.com/jonls/redshift
You could also try building the upstream source directly.
Also make sure to test/use the latest version - there is 1.8-0ubuntu6 in Ubuntu Trusty (development / beta version).

Revision history for this message
Daniel Hahler (blueyed) wrote :

@Mélodie: you are probably only missing the geoclue-hostip package.
See e.g. https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/1188961 .

Revision history for this message
Mélodie (meets) wrote :

Hi Daniel,

I have checked and it was not pulled in when installing gtk-redshift, so I installed it. This time it is in a fresh install, same kernel and so on but in a 64bits system.

Here is the output of the console:
******************************
$ LANG=C gtk-redshift

** (process:5148): WARNING **: Metadata for error domain "geoclue-error-quark" already registered

Started Geoclue provider `Geoclue Master'.
Using provider `geoclue'.

** (process:5148): WARNING **: Could not get location, 3 retries left.

** (process:5148): WARNING **: Could not get location, 2 retries left.

** (process:5148): WARNING **: Could not get location, 1 retries left.

** (process:5148): WARNING **: Provider does not have a valid location available.
Unable to get location from provider.

$ apt-cache policy geoclue-hostip
geoclue-hostip:
  Installé : 0.12.0-1ubuntu12
  Candidat : 0.12.0-1ubuntu12
 Table de version :
 *** 0.12.0-1ubuntu12 0
        500 http://fr.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status
$

******************************

Then what could I try next?

Revision history for this message
Mélodie (meets) wrote :

Daniel, about your answer #11 I'll keep the idea of compiling it myself from the upstream sources. About trying a version from Trusty or Saucy in a *Precise edition*, I am not so sure… the glib-dev and other tools from the compiling chain are probably of a different version?

Revision history for this message
Mélodie (meets) wrote :

PS: Daniel, I forgot to repeat myself : I don't think upstream can do something. In Archlinux the actual version is redshift 1.8 and has never failed so far. (Several years).

Revision history for this message
Daniel Hahler (blueyed) wrote :

@Mélodie:
Then installing the missing dependency fixed the segfault for you, didn't it?

You could try another provider (see `redshift -l list`) or add your location manually `redshift -l LAT:LON`, see `man redshift`).

You can try installing the .deb (`sudo dpkg -i ...deb`) directly: https://launchpad.net/ubuntu/+source/redshift/1.8-0ubuntu6

About 1.8 in ArchLinux: it probably does not have the missing dependency issue, and is the latest upstream version.
Ubuntu only carries a single patch, which tries to get the geolocation 3 times.

summary: redshift crashed with SIGSEGV in
- geoclue_master_client_set_requirements()
+ geoclue_master_client_set_requirements() when started outside of a X
+ session
Revision history for this message
Daniel Hahler (blueyed) wrote :

Reported the initial issue (crashing via geoclue provider when started outside of an X session) upstream at: https://github.com/jonls/redshift/issues/58

While it should not crash / segfault, it would not work anyway, and is to be considered a user error.

Closing the bug report.

Revision history for this message
Mélodie (meets) wrote :

Hello Daniel,

This is NOT a user error, and your upstream bug report at github https:/ /github. com/jonls/ redshift/ issues/ 58 title states "Out of a X session", which is completely FALSE. How could it be out of an X session when starting Redshift-gtk from the menus before try_ing in console because hitting the menu entry will not trigger any event?

Closing this bug report is a mistake isn't it ? Could it be that the bug comes from the other's fault? No it does not.

I seriously think that something is wrong with the way it is compiled for the package : at least and until you tell me how it works fine in other distributions and not in Ubuntu Precise, we can consider that something is not done right with the packaging.

Here a screenshot I just took in my Archlinux box, to show you it really works! Of course it also comes from the upstream sources...
http://meets.free.fr/images/Redshift-Archlinux.png

Precise Pangolin, being a LTS supported until 2017 should benefit of some efforts in the quality which would be one more reason to not give up on a Reshift-gtk working in Precise. This is not an unimportant program, this is a program which all should know about, because Redshift, with it's handy GTK gui is of a great help to prevent the eyes from being hurt when using the computer a lot. I consider it being a VERY desirable program to have in the system.

As packages are taken from Debian sid before being ported to Ubuntu, I want to ask Debian users who I know if Redshift-gtk works correctly in Wheezy and in Jessie. Would you please be kind enough to reopen it until I can take the time for a hand compilation in Precise? I need to check if I have all the devel packages needed and take the time at some chosen moment for that. I would check in both 32 and 64bits.

Regards,
Mélodie

Revision history for this message
Daniel Hahler (blueyed) wrote :

@Mélodie,

I am referring to this particular bug/issue, which I had reported in 2011 and which _is_ about starting redshift outside of an X session.

> Would you please be kind enough to reopen it until I can take the time for a hand compilation in Precise?

I have not closed the bug.

But this bug is really just about that redshift should not segfault, if started outside of X.

As stated earlier, your main problem appears to be the missing dependency (which is another bug), which you have worked around already.

Your current problem might be that it just does not show up in Ubuntu's app indicator (see https://bugs.launchpad.net/ubuntu/+source/redshift/+bug/1188961).

Instead of building the upstream source, please just try to use the latest .deb from Ubuntu. It works at least for me in Ubuntu Saucy.

Also, please try to find existing bug reports for your remaining issue(s) and provide additional information there.

Revision history for this message
Mélodie (meets) wrote :

Hi Daniel,

Ok, I go to the other threads, thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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