strace locks up Xorg?

Bug #373121 reported by Юрий Чудновский
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
strace (Ubuntu)
Confirmed
Undecided
Unassigned
xserver-xorg-video-openchrome (Ubuntu)
Expired
Low
Unassigned

Bug Description

I notified in some condition segfaulting of system-config-printer and tryed to strace it. But after adding -v option, I get locked desktop on some point of system-config-printer starting up. This point is not static. Nothing is working in GUI except mouse moving, keyboard LEDs react on *Lock keys pressed, and I cat switch to console to kill strace. And 'kill -9 `pidof strace`' is needed to terminate it. After kill, desktop back to functional, and system-config-printer show up and runs. While lockup, programs seems to continue its work (for example, vlc still playing a radio), CPU load is low as normal.

Example of console output on strace after kill:

read(4, "\1\1\245\1\0\0\0\0\374\0\0\0\323\0`\1\200\1\266\2\200\1\235\2\20\0\0\0\20\252\327\t"..., 4096) = 32
read(4, 0x90e2cc0, 4096) = -1 EAGAIN (Resource temporarily unavailable)
select(5, [4], [4], NULL, NULL) = 1 (out [4])
writev(4, [{"&\0\2\0\323\0`\1"..., 8}, {NULL, 0}, {""..., 0}], 3) = 8
select(5, [4], [], NULL, NULL) = 1 (in [4])
read(4, "\1\1\246\1\0\0\0\0\374\0\0\0\330\0`\1\200\1\266\2\200\1\205\2\20\0\0\0\20\2Killed

Videocard: VGA compatible controller: VIA Technologies, Inc. CN896/VN896/P4M900 [Chrome 9 HC] (rev 01) (no kernel module driver used), Xorg.log for video:

(--) PCI:*(0@1:0:0) VIA Technologies, Inc. CN896/VN896/P4M900 [Chrome 9 HC] rev 1, Mem @ 0xf4000000/67108864, 0xfb000000/16777216, BIOS @ 0x????????/65536
...
(II) Module openchrome: vendor="http://openchrome.org/"
        compiled for 1.5.99.902, module version = 0.2.903
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 5.0
(II) OPENCHROME: Driver for VIA Chrome chipsets: CLE266, KM400/KN400,
        K8M800/K8N800, PM800/PM880/CN400, P4M800Pro/VN800/CN700,
        K8M890/K8N890, P4M900/VN896/CN896, CX700/VX700, P4M890, VX800
(II) Primary Device is: PCI 01@00:00:0
(!!) VIA Technologies does not support this driver in any way.

I can't determine, is OpenChrome driver in use or not. Attaching full log.

How can I determine a bug? Any suggestions?

Revision history for this message
Юрий Чудновский (fqc) wrote :
Revision history for this message
Юрий Чудновский (fqc) wrote :

Attaching lspci -vvnn output.

description: updated
Revision history for this message
Martin Olsson (mnemo) wrote :

I've seen this before but I'm not sure where the bug is. I guess there has to be a bug in the kernel or in xorg because a userspace program is not supposed to be able to crash the system like that.

If I run it just now on my machine with intel G45 chipset I get this:
lseek(3, 73728, SEEK_SET) = 73728
close(3) = 0
munmap(0x7f7bcbd23000, 4096) = 0
*** glibc detected *** strace: malloc(): memory corruption (fast): 0x0000000000e46460 ***
======= Backtrace: =========
/lib/libc.so.6[0x7f1807d80cb/lib/libc.so.6(__libc_start_main+0xe6)[0x7f1807d275a6]
strace[0x402119]
======= Memory map: ========
00400000-00447000 r-xp 00000000 08:02 2065537 /usr/bin/strace
00646000-00647000 r--p 00046000 08:02 2065537 /usr/bin/strace
00647000-00648000 rw-p 00047000 08:02 2065537 /usr/bin/strace
00648000-00656000 rw-p 00648000 00:00 0
00e46000-00e67000 rw-p 00e46000 00:00 0 [heap]
7f1800000000-7f1800021000 rw-p 7f1800000000 00:00 0
7f1800021000-7f1804000000 ---p 7f1800021000 00:00 0
7f1807af1000-7f1807b07000 r-xp 00000000 08:02 10534973 /lib/libgcc_s.so.1
7f1807b07000-7f1807d07000 ---p 00016000 08:02 10534973 /lib/libgcc_s.so.1
7f1807d07000-7f1807d08000 r--p 00016000 08:02 10534973 /lib/libgcc_s.so.1
7f1807d08000-7f1807d09000 rw-p 00017000 08:02 10534973 /lib/libgcc_s.so.1
7f1807d09000-7f1807e71000 r-xp 00000000 08:02 10534951 /lib/libc-2.9.so
7f1807e71000-7f1808071000 ---p 00168000 08:02 10534951 /lib/libc-2.9.so
7f1808071000-7f1808075000 r--p 00168000 08:02 10534951 /lib/libc-2.9.so
7f1808075000-7f1808076000 rw-p 0016c000 08:02 10534951 /lib/libc-2.9.so
7f1808076000-7f180807b000 rw-p 7f1808076000 00:00 0
7f180807b000-7f180809b000 r-xp 00000000 08:02 10534931 /lib/ld-2.9.so
7f1808278000-7f180827a000 rw-p 7f1808278000 00:00 0
7f1808297000-7f180829a000 rw-p 7f1808297000 00:00 0
7f180829a000-7f180829b000 r--p 0001f000 08:02 10534931 /lib/ld-2.9.so
7f180829b000-7f180829c000 rw-p 00020000 08:02 10534931 /lib/ld-2.9.so
7fff10286000-7fff1029b000 rw-p 7ffffffea000 00:00 0 [stack]
7fff103fe000-7fff103ff000 r-xp 7fff103fe000 00:00 0 [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
select(Aborted

Revision history for this message
Martin Olsson (mnemo) wrote :

I searched through my bugs and I found that I reported this issue in LP even:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/336771

However, it was closed as a dupe of bug 316762:
https://bugs.launchpad.net/ubuntu/+source/strace/+bug/316762

Now, I'm not entirely sure I agree with it being marked as a duplicate because strace is a normal non-root program and it should not be able to take down the X server.

What else is interesting to mention here? I think it can be repro'd with gdmsetup dialog as well and I suppose both printer and gdmsetup does something special with hardware that makes them vulnerable to this effect because I can strace a lot other stuff on this box with no problems.

---

It would be very interesting to see if the strace patch proposed by red hat also makes the Xorg lockup go away. The memory corruption might after all be completely unrelated to the X lockup.

Revision history for this message
Юрий Чудновский (fqc) wrote :

It is very interesting, but looks like strace don't lock it, if I minimizing terminal emulator window right after launching command line.

Revision history for this message
Bryce Harrington (bryce) wrote :

We've seen several instances where strace of something led to freezes. See bug 316240 as an example.

Maybe there's a common root cause to all these problems, but for now we can treat it as a driver bug.

This bug should probably go upstream.

affects: xorg (Ubuntu) → xserver-xorg-video-openchrome (Ubuntu)
Changed in xserver-xorg-video-openchrome (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Bryce Harrington (bryce)
tags: added: hardy
Bryce Harrington (bryce)
tags: added: jaunty
Revision history for this message
Ortwin Glück (odi-odi) wrote :

Not a bug but expected behaviour:
https://lkml.org/lkml/2010/6/9/333

Revision history for this message
bugbot (bugbot) wrote :

This bug report was filed against an old version of Ubuntu.
Can you confirm whether this is still an issue in natty?

If you don't mind, it would be very helpful if you could update the bug
report in launchpad to 'Fix Released' if it is no longer an issue for
you, or if it is still occurring under natty, please tag the bug 'natty'
so it's easier for us to track.

Changed in xserver-xorg-video-openchrome (Ubuntu):
status: Triaged → New
status: New → Incomplete
Revision history for this message
bugbot (bugbot) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in xserver-xorg-video-openchrome (Ubuntu):
status: Incomplete → Expired
Changed in strace (Ubuntu):
status: New → Confirmed
tags: added: natty
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.