Crash at login

Bug #72814 reported by Jerome Haltom
104
This bug affects 1 person
Affects Status Importance Assigned to Milestone
liboil
Fix Released
Medium
Ubuntu
Medium
Unassigned
liboil (Ubuntu)
Low
Unassigned
libvisual (Debian)
New
Unknown

Bug Description

Simple login. Up-to-date feist as of Nov 21 9:20 PM CST

Revision history for this message
Jerome Haltom (wasabi) wrote :
Revision history for this message
Jerome Haltom (wasabi) wrote :

wasabi@osaka:~$ gnome-settings-daemon
+/2�[1164172721,000,xklavier.c:xkl_engine_start_listen/] The backend does not require manual layout management - but it is provided by the applicationCould not initialize GStreamer: unknown error occurred

crash occurs after that

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for the bug. The crash happens to libvisual, reassigning

Changed in control-center:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Jerome Haltom (wasabi) wrote :

It seems a bit odd that something in a visualization library can crash gnome-settings-daemon, thus causing my entire desktop to function incorrectly.

Perhaps this is a bit of overzealous linking?

I am guessing libvisual is touched by gstreamer which is touched by gnome-settings-daemon. Why?

Revision history for this message
Jerome Haltom (wasabi) wrote :

Another point: GStreamer is something which is designed to incorporate arbitrary third party plugins. Thus it's stability can never be guaranteed on all systems. Linking to it then should be done with prejudice as to it's effects on overall system stability.

Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in libvisual:
status: Unknown → Unconfirmed
Changed in libvisual:
status: Unconfirmed → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Fixed version synced from Debian:

 libvisual (0.4.0-1.1) unstable; urgency=high
 .
   * NMU
   * Disable altivec detection code, it breaks gstreamer on machines without
     altivec.

Changed in libvisual:
status: Confirmed → Fix Released
Changed in libvisual:
status: Fix Released → Unconfirmed
Revision history for this message
didier (did447-deactivatedaccount) wrote :

Sebastien Is it possible to discard this one an actually fix the real culprit? ie. liboil which doesn't use sigsetjmp and blocks SIGILL for everybody else.

Revision history for this message
Sebastien Bacher (seb128) wrote :

didier, have you read the Debian bug? why do you say that's a liboild bug? do you have a code change to fix it, in which case could you attach it to launchpad?

Revision history for this message
didier (did447-deactivatedaccount) wrote : Re: [Bug 72814] Re: Crash at login

Hi

On 3/9/07, Sebastien Bacher <email address hidden> wrote:
> didier, have you read the Debian bug? why do you say that's a liboild
> bug? do you have a code change to fix it, in which case could you attach
> it to launchpad?
Yes I did read it and I have a G3 around too :)

From man setjmp page:

      POSIX does not specify whether setjmp() will save the signal
context. (In System V it will not. In 4.3BSD it will, and there is
a function _setjmp that will not.) If you want to save signal masks,
use sigsetjmp().

From man signal

       According to POSIX, the behaviour of a process is undefined
after it ignores a SIGFPE, SIGILL, or SIGSEGV signal that was
not generated by the kill(2) or the raise(3) functions.

output of strace -f gnome-sound-properties without a ~/.gstreamer-0.10
directory.
...
32021 open("/usr/lib/liboil-0.3.so.0", O_RDONLY) = 5
32021 rt_sigaction(SIGILL, {0xe0a3120, [], 0}, {SIG_DFL}, 8) = 0
...
32021 --- SIGILL (Illegal instruction) @ 0 (0) ---
32021 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
32021 rt_sigaction(SIGILL, {0xe0a3120, [], 0}, {SIG_DFL}, 8) = 0
32021 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
32021 rt_sigaction(SIGSEGV, {SIG_DFL}, NULL, 8) = 0
...
32021 open("/usr/lib/libvisual-0.4.so.0", O_RDONLY) = 5
....
32021 rt_sigaction(SIGILL, {0xe03b884, [ILL], SA_RESTART}, {SIG_DFL}, 8) = 0
                      SIGILL is now blocked...
32021 rt_sigprocmask(SIG_BLOCK, NULL, [ILL], 8) = 0
32021 --- SIGILL (Illegal instruction) @ 0 (0) ---
                 undefined behaviour...
32020 <... read resumed> "", 1) = 0
32020 --- SIGCHLD (Child exited) @ 0 (0) ---
32020 close(3) = 0

with the soon to be attached patch
4258 open("/usr/lib/liboil-0.3.so.0", O_RDONLY) = 5
4258 rt_sigaction(SIGILL, {0xe07f120, [], 0}, {SIG_DFL}, 8) = 0
4258 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
4258 --- SIGILL (Illegal instruction) @ 0 (0) ---
4258 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
4258 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
4258 rt_sigaction(SIGILL, {0xe07f120, [], 0}, {SIG_DFL}, 8) = 0
4258 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
(*) 4258 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
...
4258 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
4258 rt_sigaction(SIGSEGV, {SIG_DFL}, NULL, 8) = 0
...
4258 open("/usr/lib/libvisual-0.4.so.0", O_RDONLY) = 5
...
4258 rt_sigaction(SIGILL, {0xdfdfd30, [ILL], SA_RESTART}, {SIG_DFL}, 8) = 0
4258 rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
4258 --- SIGILL (Illegal instruction) @ 0 (0) ---
4258 rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
4258 rt_sigaction(SIGILL, {SIG_DFL}, {0xdfdfd30, [ILL], SA_RESTART}, 8) = 0
....

Notes:
- (*) got a lot of them maybe a glibc bug.
- libs should save,block SIGILL before using them and reset after.

Revision history for this message
didier (did447-deactivatedaccount) wrote :

 liboil patch
use sigsetjmp/siglongjmp rather than setjmp/longjmp when playing with SIGSEV SIGILL in cpu detection.

Revision history for this message
In , didier (did447-deactivatedaccount) wrote :

from setjmp manual:
POSIX does not specify whether setjmp() will save the signal context.

Example of strace output on a G3 running linux Ubuntu 2.6.20

strace -f gnome-sound-properties without a ~/.gstreamer-0.10
directory.
...
32021 open("/usr/lib/liboil-0.3.so.0", O_RDONLY) = 5
32021 rt_sigaction(SIGILL, {0xe0a3120, [], 0}, {SIG_DFL}, 8) = 0
...
32021 --- SIGILL (Illegal instruction) @ 0 (0) ---
           no altivec
32021 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
32021 rt_sigaction(SIGILL, {0xe0a3120, [], 0}, {SIG_DFL}, 8) = 0
32021 rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
32021 rt_sigaction(SIGSEGV, {SIG_DFL}, NULL, 8) = 0
...
32021 open("/usr/lib/libvisual-0.4.so.0", O_RDONLY) = 5
....
32021 rt_sigaction(SIGILL, {0xe03b884, [ILL], SA_RESTART}, {SIG_DFL}, 8) = 0
                     SIGILL is now blocked...
32021 rt_sigprocmask(SIG_BLOCK, NULL, [ILL], 8) = 0
32021 --- SIGILL (Illegal instruction) @ 0 (0) ---
                undefined behaviour...
32020 <... read resumed> "", 1) = 0
32020 --- SIGCHLD (Child exited) @ 0 (0) ---
32020 close(3) = 0

Sure it's also a bug in libvisual but IMO a library should change signal set if it doesn't need it.

Revision history for this message
In , didier (did447-deactivatedaccount) wrote :

Can't create an attachment but the patch is obvious

diff -Nru /tmp/f3RzZU4qya/liboil-0.3.10/liboil/liboilcpu.c /tmp/6RumtZJFBp/liboil-0.3.10/liboil/liboilcpu.c
--- /tmp/f3RzZU4qya/liboil-0.3.10/liboil/liboilcpu.c 2007-03-09 12:38:34.000000000 +0100
+++ /tmp/6RumtZJFBp/liboil-0.3.10/liboil/liboilcpu.c 2007-03-09 12:38:37.000000000 +0100
@@ -142,7 +142,7 @@
 illegal_instruction_handler (int num)
 {
   if (in_try_block) {
- longjmp (jump_env, 1);
+ siglongjmp (jump_env, 1);
   } else {
     abort ();
   }
@@ -196,7 +196,7 @@
   int ret;

   in_try_block = 1;
- ret = setjmp (jump_env);
+ ret = sigsetjmp (jump_env,1);
   if (!ret) {
     func (priv);
   }

Revision history for this message
didier (did447-deactivatedaccount) wrote :
Changed in liboil:
status: Unknown → Confirmed
Revision history for this message
In , David Schleef (dschleef) wrote :

What does this fix? Liboil code doesn't change any signal masks, so it's not really important to save them or not.

Revision history for this message
In , didier (did447-deactivatedaccount) wrote :

(In reply to comment #2)
> What does this fix? Liboil code doesn't change any signal masks, so it's not
> really important to save them or not.
>

Yes it does, SIGILL is blocked in the signal handler, and the longjmp doesn't unblock it. In the strace output there's no call to sigset.

Revision history for this message
In , David Schleef (dschleef) wrote :

That's not in liboil, it's in libvisual.

Changed in liboil:
status: Confirmed → In Progress
Revision history for this message
In , didier (did447-deactivatedaccount) wrote :

(In reply to comment #4)
> That's not in liboil, it's in libvisual.
>
If you compile the following code oil_cpu_test.c:

#include <stdio.h>
main()
{
_oil_cpu_init();
_oil_cpu_init();
printf("done\n");
}

gcc oil_cpu_test.c -o oil_cpu /usr/lib/liboil-0.3.a -lm

On a G3 for some systems (kernel/libc) it will dump core in the second _oil_cpu_init

Revision history for this message
In , David Schleef (dschleef) wrote :

Ok, I see what the problem is now. Both the kernel and liboil have changed subtlely since this was tested heavily.

Changed in liboil:
status: In Progress → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in liboil:
importance: Undecided → Low
status: Unconfirmed → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

This upload fixes the bug:

 liboil (0.3.10-1.1ubuntu1) feisty; urgency=low
 .
   * debian/control:
     - updated maintainer
   * debian/patches/01_from_cvs_fix_signal_handling.patch:
     - patch from CVS, fix signal handling (Ubuntu: #72814)
   * debian/rules:
     - use simple-patchsys rule

Changed in liboil:
status: Fix Committed → Fix Released
Revision history for this message
John Clemens (clemej) wrote :

It doesn't appear that this is fixed in gutsy. I just hit it after an upgrade to gutsy from feisty on my (non-altivec) iBook G3 900Mhz:

~$ gstreamer-properties
Error re-scanning registry , child terminated by signal
Run 'gstreamer-properties --help' to see a full list of available command line options.

an strace -f gstreamer-properties shows this, which appears similar to this bug:

...
[pid 13026] open("/usr/lib/liboil-0.3.so.0", O_RDONLY) = 15
[pid 13026] read(15, "\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\1\207"..., 512) = 512
[pid 13026] fstat64(15, {st_mode=S_IFREG|0644, st_size=408628, ...}) = 0
[pid 13026] mmap(0xdb4b000, 483044, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 15, 0) = 0xdb4b000
[pid 13026] mprotect(0xdba1000, 61440, PROT_NONE) = 0
[pid 13026] mmap(0xdbb0000, 61440, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 15, 0x55000) = 0xdbb0000
[pid 13026] mmap(0xdbbf000, 7908, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xdbbf000
[pid 13026] mprotect(0x3002e000, 1696, PROT_READ|PROT_WRITE) = 0
[pid 13026] mprotect(0x3002e000, 1696, PROT_READ) = 0
[pid 13026] mprotect(0x7fdc9000, 4096, PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) = 0
[pid 13026] close(15) = 0
[pid 13026] munmap(0x30161000, 117470) = 0
[pid 13026] rt_sigaction(SIGSEGV, {0xf055570, [], 0}, {SIG_DFL}, 8) = 0
[pid 13026] time(NULL) = 1183183457
[pid 13026] rt_sigaction(SIGILL, {0xdb63bb0, [], 0}, {SIG_DFL}, 8) = 0
[pid 13026] --- SIGILL (Illegal instruction) @ 0 (0) ---
[pid 13026] rt_sigprocmask(SIG_UNBLOCK, [ILL], NULL, 8) = 0
[pid 13026] rt_sigaction(SIGILL, {SIG_DFL}, NULL, 8) = 0
[pid 13026] rt_sigaction(SIGILL, {0xdb63bb0, [], 0}, {SIG_DFL}, 8) = 0
[pid 13026] --- SIGILL (Illegal instruction) @ 0 (0) ---
[pid 13026] rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
[pid 13026] tgkill(13026, 13026, SIGABRT) = 0
[pid 13026] --- SIGABRT (Aborted) @ 0 (0) ---
Process 13026 detached
<... read resumed> "", 1) = 0
--- SIGCHLD (Child exited) @ 0 (0) ---
close(3) = 0
waitpid(13026, NULL, 0) = 13026
...

~$ apt-cache showpkg liboil0.3
Package: liboil0.3
Versions:
0.3.12-1

Revision history for this message
Olafur Arason (olafra) wrote :

I downgraded from from 0.3.12-1 to 0.3.9-1.2 and it fixed it so I'm pinnin it until it's fixed.
The link is here:
http://archive.ubuntu.com/ubuntu/pool/main/libo/liboil/

Revision history for this message
will_in_wi (will-in-wi) wrote :

I have the same symptoms as the last poster, but patching liboil didn't fix it for me.

Revision history for this message
will_in_wi (will-in-wi) wrote :

Downgrading fixed it for me too.

Revision history for this message
John Clemens (clemej) wrote :

Should the status of this bug be changed from fixed, since it isn't for gutsy/ppc (on non-altivec machines)?

Backing out this change:

http://webcvs.freedesktop.org/liboil/liboil/configure.ac?r1=1.89&r2=1.90

I'm able to make liboil-0.3.12 (from upstream) work on my G3.
v0.3.9 - 0.9.10 also work, obviously, because they were released before this change.

I'm a little surprised that -Wa,-maltivec causes issues because i thought that just enabled the assembler to use altivec, but, err, I can't argue with the fact that removing that option makes everything work on my system.

Revision history for this message
will_in_wi (will-in-wi) wrote :

Confirming that backing out the above change fixes it for me.

Revision history for this message
In , Bastien Nocera (hadess) wrote :

*** Bug 11997 has been marked as a duplicate of this bug. ***

Revision history for this message
In , David Schleef (dschleef) wrote :

*** Bug 11997 has been marked as a duplicate of this bug. ***

Revision history for this message
In , David Schleef (dschleef) wrote :

Checked in, finally.

Revision history for this message
In , Bastien Nocera (hadess) wrote :

Doesn't compile:
liboilcpu.c:207:28: error: macro "sigsetjmp" requires 2 arguments, but only 1 given
liboilcpu.c: In function 'oil_cpu_fault_check_try':
liboilcpu.c:207: error: 'sigsetjmp' undeclared (first use in this function)
liboilcpu.c:207: error: (Each undeclared identifier is reported only once
liboilcpu.c:207: error: for each function it appears in.)
make[4]: *** [liboil_0.3_la-liboilcpu.lo] Error 1

That's on i686 with glibc-2.6.90-8 (Fedora Rawhide)

Revision history for this message
In , Bastien Nocera (hadess) wrote :

- ret = sigsetjmp (jump_env);
+ ret = sigsetjmp (jump_env, 1);

That should do.

Changed in liboil:
status: Fix Released → Confirmed
Revision history for this message
In , David Schleef (dschleef) wrote :

Er, I'm an idiot.

First of all, for checking in code that trivially doesn't compile.

Second, because I fixed the problem without using sigsetjmp/siglongjmp() by restoring the signal mask by hand. Restoring the mask by hand has the advantage of being slightly more thread-friendly, since it's an atomic unmasking of SIGILL. I think. Also, I think I was worried that siglongjmp() isn't supported on ${some_platform}.

Anyway, I'm leaving it as sigsetjmp/siglongjmp() because these function calls are designed to do exactly what we're doing.

Changed in liboil:
status: Confirmed → Fix Released
Revision history for this message
axa1981 (axa1981) wrote :

Downgrading to 0.3.9 fixed for me also. Looks like that after 0.3.9 altivec support is enabled by default on powerpc, and my g3 machine doesn't have altivec.

Revision history for this message
Joseph Fannin (jfannin) wrote :

I can confirm that backing out the above patch and rebuilding the package makes GNOME work again on my PowerPC G3.

Please re-open this bug.

The "open" bit of this bug refers to the need to figure out why Altivec detection is broken, so that it can be re-enabled without breaking G3s. Ubuntu's problem is that Altivec detection has somehow been re-enabled, and is still broken. It doesn't appear to me that Debian has this problem.

(just trying to be clear)

Changed in libvisual:
status: Fix Released → Confirmed
Revision history for this message
ulph (us-einsnull) wrote :

i am using an ibook g3. backing out the change above didn't help; the source code ended compiling with an error. but downgrading to 0.3.9 did. i hope a fixed package will be released soon. thank you very much!

Revision history for this message
Luis Bruno (lbruno) wrote :

I've downgraded to liboil0.3=0.3.10-1.1ubuntu1, recently provided in one of the feisty repositories. That downgrade fixes my gnome-settings-daemon, but.

Downgrading removed several gstreamer0.10 packages:
gstreamer0.10-plugins-base
gstreamer0.10-plugins-good

Would the problem be in those packages? Or would these packages need to change their versioned dependency on liboil0.3?

And downgrading also removed some almost-certainly-unrelated packages:
gnome-media
rhythmbox
serpentine
sound-juicer
totem
totem-gstreamer
totem-mozilla

Thanks,
--lbruno

Revision history for this message
Zizzle (mattpratt) wrote :

Just got bitten by this bug on an upgrade to Gutsy on my G3 ibook.
The downgrade to 0.3.9 got me working for now.

Revision history for this message
Bojan Rajkovic (bojanr) wrote :

This isn't a libvisual problem, it's a liboil problem. Using the patched .deb linked to about halfway down the page in the comments fixes the issue for me, as did downgrading liboil.

Changed in libvisual:
status: Confirmed → Invalid
Revision history for this message
rooijan (rrossouw) wrote :

Helping a friend on a Ubuntu gutsy ppc installation on a G3 Ibook. Dreaded gnome-settings-daemon dying problem.

rmoolman@rmoolman-laptop:~$ /usr/lib/gnome-control-center/gnome-settings-daemon
[1194579551,000,xklavier.c:xkl_engine_start_listen/] The backend does not require manual layout management - but it is provided by the application[1194579551,000,xklavier.c:xkl_engine_start_listen/] The backend does not require manual layout management - but it is provided by the applicationCould not initialize GStreamer: Error re-scanning registry , child terminated by signal

Downgrading liboil with this package worked for me:
http://archive.ubuntu.com/ubuntu/pool/main/libo/liboil/liboil0.3_0.3.9-1.2_powerpc.deb
More packages here:
http://archive.ubuntu.com/ubuntu/pool/main/libo/liboil/

Revision history for this message
rooijan (rrossouw) wrote :

I came across a seperate launhpad entry and the patches liboil mentioned there is newer and works better with Gutsy updates:
https://bugs.launchpad.net/ubuntu/+source/liboil/+bug/163255

Revision history for this message
Flabdablet (flabdablet) wrote :

The patched package I linked to in #163255 no longer fixes this issue for me. Plus, I got sick of having to uncheck liboil0.3 in the upgrade manager. So I've just now applied a filthy workaround: downgrade liboil to version 0.3.9-1.2, then copy the actual library /usr/lib/liboil-0.3.so.0.1.0 into /tmp, then upgrade back to 0.3.12-1, then overwrite /usr/lib/liboil-0.3.so.0.1.0 with the copy from /tmp.

Hopefully this will keep things working until a real upgrade comes down the pipe, and hopefully that upgrade will not be broken on pre-Altivec G3s.

Commands used:

cd /tmp
wget http://archive.ubuntu.com/ubuntu/pool/main/libo/liboil/liboil0.3_0.3.9-1.2_powerpc.deb
sudo dpkg -i liboil0.3_0.3.9-1.2_powerpc.deb
cp /usr/lib/liboil-0.3.so.0.1.0 .
sudo apt-get install liboil0.3
sudo cp liboil-0.3.so.0.1.0 /usr/lib/
sudo reboot

Revision history for this message
Christoph Luehr (chluehr) wrote :

I have the same problems as Flabdablet on my pre-altivec G3 PPC.
His "dirty" workaround "fixes" the situation for now... (for me)

Revision history for this message
Joseph Fannin (jfannin) wrote :

Can anyone verify is this bug is still present? My G3-based Mac has died of old age.

If not. yay! Please close this bug.

If so, then it's time to officially drop support for the G3, whatever the value of Ubuntu PPC "support" may be.

Maybe that's already been done; it so, I apologize. Please close this bug with the LP equivalent of "invalid" or something, then.

Changed in liboil:
importance: Unknown → Medium
Changed in liboil:
importance: Medium → Unknown
Changed in liboil:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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