compiz crashed with SIGSEGV in g_bit_lock()

Bug #1495173 reported by Walter Ribeiro
112
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Unity
Fix Released
High
Lars Karlitski
glib2.0 (Ubuntu)
Invalid
High
Unassigned
unity (Ubuntu)
Fix Released
High
Lars Karlitski

Bug Description

Error occurred while trying to unlock from launcher disk volume icon using context menu.
The error can be reproduced.

ProblemType: Crash
DistroRelease: Ubuntu 15.10
Package: unity 7.3.2+15.10.20150910.1-0ubuntu1
ProcVersionSignature: Ubuntu 4.2.0-7.7-generic 4.2.0
Uname: Linux 4.2.0-7-generic x86_64
ApportVersion: 2.18.1-0ubuntu1
Architecture: amd64
CrashCounter: 1
CurrentDesktop: Unity
Date: Sun Sep 13 01:10:59 2015
ExecutablePath: /usr/bin/compiz
InstallationDate: Installed on 2015-09-13 (0 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150911)
ProcCmdline: compiz
SegvAnalysis:
 Segfault happened at: 0x7f33bc884338 <g_bit_lock+72>: lock bts %r12d,(%rbx)
 PC (0x7f33bc884338) ok
 source "%r12d" ok
 destination "(%rbx)" (0x00000020) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: unity
StacktraceTop:
 g_bit_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 g_variant_serialiser_needed_size () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
 ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
Title: compiz crashed with SIGSEGV in g_bit_lock()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Related branches

Revision history for this message
Walter Ribeiro (wribeirojr) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 g_bit_lock (address=address@entry=0x20, lock_bit=lock_bit@entry=0) at /build/glib2.0-hcw3A1/glib2.0-2.45.7/./glib/gbitlock.c:214
 g_variant_lock (value=0x0) at /build/glib2.0-hcw3A1/glib2.0-2.45.7/./glib/gvariant-core.c:221
 g_variant_fill_gvs (serialised=0x7ffe529046f0, data=0x0) at /build/glib2.0-hcw3A1/glib2.0-2.45.7/./glib/gvariant-core.c:399
 gvs_variable_sized_array_needed_size (n_children=2, children=0x1b916e0, gvs_filler=0x7f33bc8e9700 <g_variant_fill_gvs>, type_info=<optimized out>) at /build/glib2.0-hcw3A1/glib2.0-2.45.7/./glib/gvariant-serialiser.c:709
 g_variant_serialiser_needed_size (type_info=<optimized out>, gvs_filler=gvs_filler@entry=0x7f33bc8e9700 <g_variant_fill_gvs>, children=0x1b916e0, n_children=2) at /build/glib2.0-hcw3A1/glib2.0-2.45.7/./glib/gvariant-serialiser.c:1434

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in unity (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in unity (Ubuntu):
status: New → Confirmed
Changed in unity (Ubuntu):
status: Confirmed → Invalid
information type: Private → Public
Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Changed in glib2.0 (Ubuntu):
importance: Undecided → High
Revision history for this message
Lars Karlitski (larsu) wrote :

This is not a bug in glib. UploadBlacklist() loops through a list of strings with

  for (auto item : blacklist_)
    // do something with item.c_str()

which makes a copy of each string in every iteration. This means that item.c_str() is not valid anymore after the loop finishes. g_settings_set_strv() then rightly complains about invalid utf8 from whatever is lying around at those memory addresses then.

The attached branch fixes this by using a const reference in the loop.

Changed in unity (Ubuntu):
status: Invalid → In Progress
Changed in glib2.0 (Ubuntu):
status: Confirmed → Invalid
Changed in unity (Ubuntu):
importance: Medium → High
Andrea Azzarone (azzar1)
Changed in unity:
status: New → Incomplete
status: Incomplete → In Progress
assignee: nobody → Lars Uebernickel (larsu)
Changed in unity (Ubuntu):
assignee: nobody → Lars Uebernickel (larsu)
Changed in unity:
importance: Undecided → High
milestone: none → 7.3.3
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity - 7.3.2+15.10.20150921-0ubuntu1

---------------
unity (7.3.2+15.10.20150921-0ubuntu1) wily; urgency=medium

  [ Andrea Azzarone ]
  * Avoid to open adjacent menu when moving from an indicator icon to
    its dropdown menu. (LP: #552920)
  * Make sure to restore the state before the call to
    glDisable(GL_SCISSOR_TEST). (LP: #1485727)

  [ Iain Lane ]
  * launcher: Always make sure we check the right file when seeing if
    .desktop files have been deleted. Fixes disappearing launcher icons
    when applications are upgraded when we are using glib > 2.44. (LP:
    #1498106)

  [ Lars Uebernickel ]
  * DevicesSettingsImp: dont't feed garbage to gsettings (LP: #1495173)

  [ Luke Yelavich ]
  * Make a copy of a quicklist menu item plain text label
  * Make a copy of a quicklist menu item plain text label

  [ Marco Trevisan (Treviño) ]
  * MenuManager: add a new setting to control the show-now delay (LP:
    #1497915)

 -- Marco Trevisan (Treviño) <mail@3v1n0.net> Mon, 21 Sep 2015 17:44:10 +0000

Changed in unity (Ubuntu):
status: In Progress → Fix Released
Changed in unity:
status: In Progress → Fix Committed
Changed in unity:
status: Fix Committed → Fix Released
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.