← Back to team overview

unity-dev team mailing list archive

[Ayatana-dev] [Compiz] Help needed to fix SIGABRT on shutdown

 

Hi all,

With other fixes I've been working on, I've been trying to get compiz to shut
down cleanly.  It seems there is some weirdness in the way the PrivateScreen
is closing things.

The failure is intermittant, although tends to happen more often than not.
Stacktrace from gdb below [1].  Oh, in the debugger, the GMainContext that
is passed into  g_source_unref_internal is not a valid object (was 0x20).

The parts of interest I believe are the following members of PrivateScreen:

	Glib::RefPtr <Glib::MainLoop>  mainloop;
	Glib::RefPtr <CompEventSource> source;
	Glib::RefPtr <CompTimeoutSource> timeout;
	Glib::RefPtr <Glib::MainContext> ctx;

I changed the PrivateScreen destruct to make sure the source was released 
(using reset) before the main context is destroyed, but something is still 
screwy.

I need input from someone who knows glib.

Cheers,
Tim

[1]
Program received signal SIGABRT, Aborted.
0x00007ffff542fc55 in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/raise.c
(gdb) where
#0  0x00007ffff542fc55 in raise (sig=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007ffff5433a06 in abort () at abort.c:92
#2  0x00007ffff5428715 in __assert_fail (
    assertion=0x7ffff5ed55a0 "new_prio == -1 || (new_prio >= 
__sched_fifo_min_prio && new_prio <= __sched_fifo_max_prio)", file=<value 
optimized out>, 
    line=63, function=<value optimized out>) at assert.c:81
#3  0x00007ffff5ed39e9 in __pthread_tpp_change_priority (previous_prio=-1, 
new_prio=0) at tpp.c:61
#4  0x00007ffff5ecbeb4 in __pthread_mutex_lock_full (mutex=0x82c338) at 
pthread_mutex_lock.c:415
#5  0x00007ffff2cf6ea9 in g_source_unref_internal (source=0x19cf730, 
context=0x82c330, have_lock=0) at 
/build/buildd/glib2.0-2.29.14/./glib/gmain.c:1724
#6  0x00000000004930d1 in Glib::RefPtr<CompEventSource>::~RefPtr 
(this=0x7fffffffe290, __in_chrg=<value optimized out>)
    at /usr/include/glibmm-2.4/glibmm/refptr.h:208
#7  0x0000000000497075 in Glib::RefPtr<CompEventSource>::reset (this=0x7bf020) 
at /usr/include/glibmm-2.4/glibmm/refptr.h:322
#8  0x0000000000491222 in PrivateScreen::~PrivateScreen (this=0x7befd0, 
__in_chrg=<value optimized out>)
    at /home/tim/src/compiz-core/debug-dlopen/src/screen.cpp:4705
#9  0x0000000000491716 in PrivateScreen::~PrivateScreen (this=0x7befd0, 
__in_chrg=<value optimized out>)
    at /home/tim/src/compiz-core/debug-dlopen/src/screen.cpp:4706
#10 0x000000000048fdaa in CompScreen::~CompScreen (this=0x7bd050, 
__in_chrg=<value optimized out>)
    at /home/tim/src/compiz-core/debug-dlopen/src/screen.cpp:4604
#11 0x000000000048fe60 in CompScreen::~CompScreen (this=0x7bd050, 
__in_chrg=<value optimized out>)
    at /home/tim/src/compiz-core/debug-dlopen/src/screen.cpp:4607
#12 0x000000000047c090 in CompManager::fini (this=0x7fffffffe3a0) at 
/home/tim/src/compiz-core/debug-dlopen/src/main.cpp:261
#13 0x000000000047c195 in main (argc=2, argv=0x7fffffffe4c8) at 
/home/tim/src/compiz-core/debug-dlopen/src/main.cpp:291