Bug 21147

Summary: Using gnome-weather causes gnome-shell to segfault and exit
Product: Mageia Reporter: Martin Whitaker <mageia>
Component: RPM PackagesAssignee: GNOME maintainers <gnome>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: release_blocker CC: lewyssmith, marja11, olav
Version: Cauldron   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: libgweather-3.24.0-1.mga6.src.rpm CVE:
Status comment: Fixed package available
Attachments: stacktrace from gnome-shell segfault

Description Martin Whitaker 2017-06-26 09:55:19 CEST
Created attachment 9446 [details]
stacktrace from gnome-shell segfault

For me, this is reliably reproducible using the latest Mageia-6-LiveDVD-GNOME-x86_64-DVD ISO running in VirtualBox by:

  - booting to Live desktop
  - starting gnome-weather from the top panel
  - selecting a location
  - starting the file manager from the Applications menu
  - opening a terminal from the Applications menu

(the segfault may occur in either of the last two steps).

When running on Wayland (the default), this kills the entire desktop and takes you back to the GDM login screen. When running on Xorg, gnome-shell just restarts, leaving other applications running.

I've got a stack trace from the segfault (attached), which shows a memory allocation fault in libgweather. There are a few likely looking fixes upstream:

  location: Don't release libxml-allocated memory with g_free()
  Fix refcounting bug in GWeatherInfo
  weather: Guard against segfault

I've tried applying theses patches in a local build of the libgweather package, but I can't install the resulting RPMs due to some weird dependency failure, so can't test them.
Marja Van Waes 2017-06-26 19:30:42 CEST

Assignee: bugsquad => gnome
CC: (none) => marja11

Comment 1 Martin Whitaker 2017-06-26 21:40:49 CEST
Two more similar bugs:

1) Boot to Live desktop, open the Settings pane (from the tools icon in the top-right drop-down menu), select Privacy, and change the Location Services setting. This will immediately cause a segfault in gnome-shell, with the following messages in the journal:

gnome-shell[2826]: gweather_location_unref: assertion 'loc->level != GWEATHER_LOCATION_WORLD' failed
kernel: gnome-shell[2826]: segfault at 38 ip 00007fa2065f0be4 sp 00007ffc0cd6d900 error 4 in libgweather-3.so.6.6.0[7fa2065da000+23000]

This happens every time you try it.

2) Boot to Live desktop, open a terminal, and type

  gsettings set org.gnome.Weather.Application automatic-location false

This will immediately cause a segfault in gnome-shell, with the following message in the journal:

kernel: gnome-shell[2812]: segfault at 38 ip 00007fe5125f0be4 sp 00007ffebec0b340 error 4 in libgweather-3.so.6.6.0[7fe5125da000+23000]

This only happens the first time you try it.
Comment 2 Martin Whitaker 2017-06-26 22:43:39 CEST
I've tested a rebuilt version of lib64gweather3_6-3.24.0-1.mga6.x86_64.rpm with the three patches mentioned above applied (plus the "Fix memory leak" patch for good measure) and it appears to fix all three of the problems described here.

Setting to release blocker, as these bugs prevent one of the highlighted new features of GNOME 3.24 being used on the Live DVD.

Olav, can you deal with this, as I see you have already got a newer version in the subversion repository.

Priority: High => release_blocker

Comment 3 Olav Vitters 2017-06-26 23:08:23 CEST
Requested freeze push

CC: (none) => olav

Comment 4 Martin Whitaker 2017-06-27 09:48:26 CEST
Sorry Olav, but one of the patches is not in 3.24.1:

https://git.gnome.org/browse/libgweather/commit/?id=9b08eeadf215580358d0f53ac0f54c9acdde7384

Could you apply this too.
Comment 5 Olav Vitters 2017-06-27 11:07:23 CEST
Hi Martin, it might take me a while so if you have time then appreciate assistance. Do we need freeze push for releases as well?
Olav Vitters 2017-06-27 11:07:57 CEST

Status comment: (none) => Latest release still lacks one required patch.

Comment 6 Rémi Verschelde 2017-06-27 11:22:31 CEST
> Do we need freeze push for releases as well?

Yes, the release freeze is in place.
Comment 7 Olav Vitters 2017-06-27 17:11:59 CEST
Suddenly had some free time. Requested freeze exception on IRC and @dev ml.
Comment 8 Olav Vitters 2017-06-27 18:11:03 CEST
Package now available. Please test.

Status comment: Latest release still lacks one required patch. => Fixed package available

Comment 9 Martin Whitaker 2017-06-27 23:15:29 CEST
Thanks Olav. I've rebuilt the GNOME Live ISO with this update, and no longer see any gnome-shell crashes, so I think this is fixed. I've released the new ISO to QA, to allow the person who originally found the problem to confirm it.

The GNOME Live DVD is looking very solid now.
Comment 10 Martin Whitaker 2017-06-28 09:29:38 CEST
Fix confirmed.

Resolution: (none) => FIXED
Status: NEW => RESOLVED

Comment 11 Lewis Smith 2017-06-28 12:32:30 CEST
Trying the 64-bit Gnome ISO of 27 June, just to see...
Running Live, real EFI hardware, from DVD; AMD/ATI/Radeon graphics. Presume Wayland.
4.9.34-desktop-4.mga6 kernel.

Re Comment 0 test:
  - booting to Live desktop
  - starting gnome-weather from the top panel    [search 'weather']
  - selecting a location
  - starting the file manager from the Applications menu  [sidebar]
  - opening a terminal from the Applications menu  [all applications]
Done all that, everything running OK.

Re Comment 1.1
 Boot to Live desktop, open the Settings pane (from the tools icon in the top- right drop-down menu), select Privacy, and change the Location Services setting.

Did that, no crash. [But changing the setting, although evident in the pop-up window, does *not* reflect in the host window when you close the latter. The change *does* show correctly next time round. Trivial].

Re Comment 1.2
 $ gsettings set org.gnome.Weather.Application automatic-location false
 $
No crash, also OK.

3/3 OKs!

CC: (none) => lewyssmith