n2liquid's sandbox

GNU Drama: Xorg crashes → GNU brought to its knees

Posted on: October 9, 2013

Um não simplesmente chama GNU de estável

I clicked on Icecat’s “+” button to open up a new tab and Xorg became irresponsive. I hit Ctrl-Alt-F2 to see tty2 and `killall X` like I usually do (I had to do this a bazillion times since I installed this system already), but tty2 just wouldn’t show up.

Eventually, after a couple (many?) minutes passed (I’m not sure how long it took since I was afk having dinner), tty2 was there. I typed my login and pressed Enter. It took a couple more minutes to ask me for a password (CPU was likely still hogged). A entered the password and got into the shell.

Inside the shell I killed X and checked /var/log/Xorg.0.log. It had something along those lines:

[157712.954] (II) evdev: MLK Nortek Activo WL Laser 2.4G: initialized for relative axes.
[157712.954] (WW) evdev: MLK Nortek Activo WL Laser 2.4G: ignoring absolute axes.
[157712.954] (**) MLK Nortek Activo WL Laser 2.4G: (accel) keeping acceleration scheme 1
[157712.954] (**) MLK Nortek Activo WL Laser 2.4G: (accel) acceleration profile 0
[157712.954] (**) MLK Nortek Activo WL Laser 2.4G: (accel) acceleration factor: 2.000
[157712.954] (**) MLK Nortek Activo WL Laser 2.4G: (accel) acceleration threshold: 4
(EE) [mi] EQ overflowing.  Additional events will be discarded until existing events are processed.
(EE)
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x3d) [0x57f67d]
(EE) 1: /usr/bin/X (mieqEnqueue+0x22b) [0x5615bb]
(EE) 2: /usr/bin/X (QueuePointerEvents+0x52) [0x44da82]
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f7d11ddf000+0x57ed) [0x7f7d11de47ed]
(EE) 4: /usr/bin/X (0x400000+0x73da8) [0x473da8]
(EE) 5: /usr/bin/X (0x400000+0x9c330) [0x49c330]
(EE) 6: /usr/lib/libpthread.so.0 (0x7f7d16238000+0xf870) [0x7f7d16247870]
(EE) 7: /usr/lib/libc.so.6 (0x7f7d1529a000+0x7a04e) [0x7f7d1531404e]
(EE) 8: /usr/lib/libc.so.6 (__libc_calloc+0xaa) [0x7f7d1531660a]
(EE) 9: /usr/bin/X (EventToXI2+0x6ab) [0x44867b]
(EE) 10: /usr/bin/X (DeliverRawEvent+0x27) [0x4478c7]
(EE) 11: /usr/bin/X (0x400000+0x11325b) [0x51325b]
(EE) 12: /usr/bin/X (0x400000+0x1340b6) [0x5340b6]
(EE) 13: /usr/bin/X (mieqProcessDeviceEvent+0x1cd) [0x56199d]
(EE) 14: /usr/bin/X (mieqProcessInputEvents+0xf7) [0x561ab7]
(EE) 15: /usr/bin/X (ProcessInputEvents+0x9) [0x473f09]
(EE) 16: /usr/bin/X (0x400000+0x37102) [0x437102]
(EE) 17: /usr/bin/X (0x400000+0x2693a) [0x42693a]
(EE) 18: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7f7d152bbbc5]
(EE) 19: /usr/bin/X (0x400000+0x26c81) [0x426c81]
(EE)
(EE) [mi] These backtraces from mieqEnqueue may point to a culprit higher up the stack.
(EE) [mi] mieq is *NOT* the cause.  It is a victim.
(EE) [mi] EQ overflow continuing.  100 events have been dropped.
(EE)
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x3d) [0x57f67d]
(EE) 1: /usr/bin/X (QueueKeyboardEvents+0x52) [0x44d452]
(EE) 2: /usr/bin/X (xf86PostKeyboardEvent+0x44) [0x483e84]
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f7d11ddf000+0x5571) [0x7f7d11de4571]
(EE) 4: /usr/bin/X (0x400000+0x73da8) [0x473da8]
(EE) 5: /usr/bin/X (0x400000+0x9c330) [0x49c330]
(EE) 6: /usr/lib/libpthread.so.0 (0x7f7d16238000+0xf870) [0x7f7d16247870]
(EE) 7: /usr/lib/libc.so.6 (0x7f7d1529a000+0x7a04e) [0x7f7d1531404e]
(EE) 8: /usr/lib/libc.so.6 (__libc_calloc+0xaa) [0x7f7d1531660a]
(EE) 9: /usr/bin/X (EventToXI2+0x6ab) [0x44867b]
(EE) 10: /usr/bin/X (DeliverRawEvent+0x27) [0x4478c7]
(EE) 11: /usr/bin/X (0x400000+0x11325b) [0x51325b]
(EE) 12: /usr/bin/X (0x400000+0x1340b6) [0x5340b6]
(EE) 13: /usr/bin/X (mieqProcessDeviceEvent+0x1cd) [0x56199d]
(EE) 14: /usr/bin/X (mieqProcessInputEvents+0xf7) [0x561ab7]
(EE) 15: /usr/bin/X (ProcessInputEvents+0x9) [0x473f09]
(EE) 16: /usr/bin/X (0x400000+0x37102) [0x437102]
(EE) 17: /usr/bin/X (0x400000+0x2693a) [0x42693a]
(EE) 18: /usr/lib/libc.so.6 (__libc_start_main+0xf5) [0x7f7d152bbbc5]
(EE) 19: /usr/bin/X (0x400000+0x26c81) [0x426c81]
(EE)
[168867.313] [mi] EQ processing has resumed after 103 dropped events.
[168870.925] [mi] This may be caused my a misbehaving driver monopolizing the server’s resources.

So it looks like it was probably my mouse driver’s fault. Yes, that mouse driver.

I copied the logs over to my home directory to use in this post later. Then I tried to switch to tty1 in order to `startx` again, but tty1 never popped up and tty2 was frozen (or the framebuffer was frozen, or something). Pressing Ctrl-Alt-F* again did nothing. I had to force a shutdown by holding down the power button.

Now, maybe I could have recovered my computer from this crash by logging in via SSH and seeing what was still messed up. Probably X wasn’t killed because killall’s default signal is SIGTERM and I haven’t passed the –wait option, so it probably had no effect and I had just jumped to X again.

In any case, none of the above is the point of this blogpost. The point is that a system that can be brought down by a userland program can’t be called stable.

So, GNU on desktops is, by default, simply not stable.

Update (10/11/2013): This happened again yesterday when I left the computer unattended (so it wasn’t even triggered by a user action, it just happened). This time around I ran `killall -9 -w X`, then I looked for an X process and it wasn’t found. Running `killall -9 -w X` again resulted in a “no process found message.”

`top` revealed nothing: all processes were using a normal (close to 0%) amount of CPU. Still, switching to tty1 crashed the whole machine. After a couple minutes tty1 appeared, but as I typed nothing appeared… I could run commands and clear the screen, but I saw neither the output nor what I typed, just the bash prompt. I started X again just to see what happened and it ran OK. tty2 also looked OK. Go figure!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Cute bouncing pixels

un.ma.i!

Twitter (technical)

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Twitter (personal)

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

Get messaged when I post something new!
Just enter your e-mail and hit Follow:

Join 171 other followers

%d bloggers like this: