Bug 3753 - xfce-mcs-manager recieves SIGABRT on startup due to mouse_plugin.so from xfce-mcs-plugins
: xfce-mcs-manager recieves SIGABRT on startup due to mouse_plugin.so from xfce...
Status: VERIFIED FIXED
Product: Xfce-mcs
Plugins
: 4.2.x
: PC (x86) Linux
: Medium critical
: ---
Assigned To: Xfce Bug Triage
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-12-16 11:34 UTC by Jan Hruban
Modified: 2009-07-14 08:31 UTC (History)
2 users (show)

See Also:


Attachments
Console output from xfce-mcs-manager --no-daemon-debug (16.98 KB, text/plain)
2007-12-16 11:35 UTC, Jan Hruban
Details
backtrace (18.12 KB, text/plain)
2007-12-16 14:50 UTC, Jan Hruban
Details
more meaningful bt with debugging info (959 bytes, text/plain)
2007-12-17 17:41 UTC, Jan Hruban
Details
fix-bad-alloca.diff (652 bytes, patch)
2007-12-17 19:47 UTC, Brian J. Tarricone
Details | Diff
fix-bad-alloca-and-size.diff (966 bytes, patch)
2007-12-17 22:42 UTC, Brian J. Tarricone
Details | Diff
fix-bad-alloca-and-size-v2.diff (1.30 KB, patch)
2007-12-17 22:47 UTC, Brian J. Tarricone
Details | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description Jan Hruban 2007-12-16 11:34:09 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en; rv:1.8.1.11)
Gecko/20071208 Epiphany/2.20 Firefox/2.0.0.11
Build Identifier: 

When starting xfce-mcs-manager daemon, it comes up for a while - loads gtk
theme etc, but then upon loading mouse mcs plugin it recieves SIGABRT.

Reproducible: Always

Steps to Reproduce:
1. Compile xfce-mcs-plugins and dependant software
2. Start xfce-mcs-manager
3. xfce-mcs-manager crashes

Actual Results:  
xfce-mcs-manager recieved SIGABRT on startup most likely because of
/usr/lib/xfce4/mcs-plugins/mouse_plugin.so from xfce-mcs-plugins package. 
See attachment for details.

Expected Results:  
xfce-mcs-manager starts

glib version: 1.2.10
gtk+ version: 1.2.10

While in 4.4.1 this worked ok, in 4.4.2 I can't get xfce-mcs-manager running.
I've tried to recompile every package which is this dependant on (gentoo here),
but with no luck.

Also when removing /usr/lib/xfce4/mcs-plugins/mouse_plugin.so, mcs-manager
starts with no problems.

Bad thing is that I didn't find anyone to reproduce (asked some gentooists and
it just runs fine for them), but for me it's always reproducible.

Tell me if you need some further info, I will gladly try to provide it.
Comment 1 Jan Hruban 2007-12-16 11:35:09 UTC
Created an attachment (id=1469) [details]
Console output from xfce-mcs-manager --no-daemon-debug
Comment 2 Olivier Fourdan editbugs 2007-12-16 13:57:18 UTC
Can you run in gdb and provide a backtrace?
Comment 3 Jan Hruban 2007-12-16 14:50:48 UTC
Created an attachment (id=1470) [details]
backtrace

xfce-mcs-manager xfce-mcs-plugins and libxfce4mcs were compiled with
--enable-debug configure option, -g CFLAG and were not stripped.

If I need to compile more packages with some debugging options please let me
know.
Comment 4 Jan Hruban 2007-12-16 15:00:03 UTC
Sorry, this bt was with -fomit-frame-pointer
I'll provide a new one in a minute
Comment 5 Kevin Fenzi 2007-12-17 16:52:17 UTC
Jan: Do you use a tablet device? 

I have a report against the fedora packages that looks very much like this
report. In that case disabling the wacom tablet they use gets things working. 
See: https://bugzilla.redhat.com/show_bug.cgi?id=425925

I've asked the reporter for a more detailed backtrace.
Comment 6 Jan Hruban 2007-12-17 17:41:18 UTC
Created an attachment (id=1475) [details]
more meaningful bt with debugging info
Comment 7 Jan Hruban 2007-12-17 17:42:36 UTC
(In reply to comment #5)
> Jan: Do you use a tablet device? 

I don't use tablet device at all, just common usb mouse.
Comment 8 Jan Hruban 2007-12-17 18:08:43 UTC
One thing which comes on my mind:

I use dual seat config, so I wonder if this mouse plugin doesn't touch
something which it should not. I mean it touches something related to the mouse
on the other seat.
Comment 9 Brian J. Tarricone editbugs 2007-12-17 19:47:16 UTC
Created an attachment (id=1477) [details]
fix-bad-alloca.diff

No, it's a bad use of g_alloca() which should be g_realloc()  (current code
both leaks memory and causes a crash if the device reports more than a certain
number of buttons).

Can you try this patch?  Apply to the root of xfce-mcs-plugins with 'patch -p0
<fix-bad-alloca.diff' and rebuild and reinstall.
Comment 10 Jan Hruban 2007-12-17 22:15:05 UTC
(In reply to comment #9)

> Can you try this patch?  Apply to the root of xfce-mcs-plugins with 'patch -p0
> <fix-bad-alloca.diff' and rebuild and reinstall.

I've tried the patch, but I still recieve the same results (crash and same
backtrace) as before.
Comment 11 Brian J. Tarricone editbugs 2007-12-17 22:42:18 UTC
Created an attachment (id=1478) [details]
fix-bad-alloca-and-size.diff

First of all: make sure you're installing your self-built package in the right
location.  By default, tarball installs go to /usr/local, while your distro's
packages are probably set up to install to /usr.

Anyhow, try this patch too (need to remove first patch with 'patch -p0 -R
<fix-bad-alloc.diff' first).  Looks like there's another potential problem with
that function...
Comment 12 Brian J. Tarricone editbugs 2007-12-17 22:44:06 UTC
Wait, that patch isn't completely good either.  Just a sec...
Comment 13 Brian J. Tarricone editbugs 2007-12-17 22:47:55 UTC
Created an attachment (id=1479) [details]
fix-bad-alloca-and-size-v2.diff

Ok, give this one a try.  Applies to a clean 4.4.x tree.
Comment 14 Jan Hruban 2007-12-17 23:22:44 UTC
Great, the second patch works. 
mcs-manager comes up and seems like everything is ok so far.
Comment 15 Brian J. Tarricone editbugs 2007-12-18 00:30:34 UTC
Great!
Comment 16 Kevin Fenzi 2007-12-18 16:45:54 UTC
This patch fixes the aforementioned fedora bug as well. 
Thanks for the speedy patch! :)
Comment 17 Brian J. Tarricone editbugs 2007-12-18 18:04:51 UTC
Excellent, good to hear.