/srv/irclogs.ubuntu.com/2012/03/05/#ubuntu-x.txt

FernandoMiguelnite00:00
apwRAOF, hey i have just had another of those X lockups, triggered by touching the edge of teh screen to pull out the launcher08:45
apwany suggested triage, before i start restarting bits?08:46
RAOFapw: Still there?08:47
apwRAOF, yep08:47
RAOFapw: Has X crashed, or frozen?08:47
RAOFIf it's frozen, could you ssh in, attach gdb, and nab a backtrace?08:47
apwxserver still there, its in a futex wait08:47
apwRAOF, no idea if its X or compiz, or another08:48
RAOFOh, really.08:48
RAOFIs compiz in D state by any chance?08:48
apwcompiz is Sl08:48
RAOFHm.08:50
apwRAOF, X appears to be in an intel_drv.so thingy, called out of _CallCallbacks08:50
RAOFAh.  Could you pastebin a backtrace please?08:50
apwRAOF, http://paste.ubuntu.com/869540/08:52
* RAOF is confused.08:53
RAOFCould you do the same, with debugging symbols installed?08:53
apwRAOF, this is a relativly recent behaviour, and i am pretty sure bjf has also hinted at similar behaviour -- cirtainly this is the third of this behaviour i've seen08:53
apwRAOF, where doth i get those08:53
RAOFapt-get install xserver-xorg-core-dbg xserver-xorg-video-intel-dbg xserver-xorg-input-evdev-dbgsym08:54
RAOFAnd let's throw in libdrm2-dbg libdrm-intel1-dbg08:54
RAOFThat looks an *awful* lot like a deadlock caused by a signal handler, doesn't it.08:54
apwE: Unable to locate package xserver-xorg-input-evdev-dbgsym08:55
RAOFOh, *ARSE*08:55
RAOFIgnore evdev, then.08:55
* RAOF has a sneaking suspicion that he knows what the problem is.08:56
apwsomething i can type to get confirmation for you08:56
RAOFNo, I don't think so.08:57
RAOFBut a backtrace with function names would help me to check.08:57
apwhttp://paste.ubuntu.com/869546/08:58
apwRAOF, ^08:58
RAOFHad you closed a window shortly before this happened?09:00
apwRAOF, i had just touched the left edge about to reel out the launcher09:00
apwthe odd shadow thing is still there i think09:00
jcristausending events from the sigio handler sounds wrong.09:01
RAOFevdev... with a mouse, right?09:01
RAOFjcristau: Yeah, I just noticed thatc.09:01
apwRAOF, indeed mouse in motion09:01
jcristauno wonder it deadlocks09:01
RAOFjcristau: Hence my *ARSE* :/.09:01
RAOFThe wonder is that it deadlocks so infrequently.09:01
apware you allowed to do _anything_ in a signal handler?09:02
jcristauapw: not much.09:02
jcristauyou're supposed to read the input event, queue it, and get the hell out.09:02
apwi am supprised reading input is allowed, let alone any of the other milarki09:02
RAOFYou can write()09:02
apwso you can send yourself a hint09:03
jcristausignal(7) has a list of functions you're allowed to call09:03
RAOF*much* of writing events qualifies; probably something mallocs in a certain case.09:03
RAOFI was just incautious and wasn't thinking that ConstrainCursorHarder was called from a signal context.09:04
jcristauwell in X sending events is not allowed from the sighandler, because it does more than write()09:04
RAOFYeah.09:04
* apw would be supprised if malloc was safe most of the time09:04
jcristauapw: it's not09:04
jcristaumalloc takes a lock09:05
jcristauso if malloc gets interrupted by the signal and you call it again from the handler, it goes boom09:05
RAOFIndeed.09:05
apwRAOF, its a good job Intel graphics arn't common ... sigh09:06
RAOFIn this case, probably not malloc; looks like drmIoctl takes out a lock.09:06
apwRAOF, yeah you'd hope wouldn't you09:07
RAOFAnyway, time to rework this sucker.09:07
apwRAOF, need anything mroe from this hang, or shall i kill it off09:07
RAOFKill it with extreme prejudice.09:07
jcristauRAOF: is that bug upstream too?09:08
RAOFjcristau: No; it's in my code (a prototype of which is languishing on the list)09:08
jcristauok09:08
RAOFWould have been nice for someone to point out that CursorConstrainCursor is called in a signal context, though :)09:09
RAOFThe input code does a scary amount of work in that context.09:09
jcristauhaving annotations in the code about it could be helpful..09:10
jcristaubut i guess it'd easily get stale09:10
RAOFMaybe09:10
jcristaumaybe sparse could handle that09:11
RAOFWell, easily get stale, but the flow of the sigio handler shouldn't change *that* much between releases.09:11
RAOFHow well does sparse handle calls chained through function pointers?09:11
jcristauno idea09:11
jcristaui should try and play with it some time09:12
RAOFIt would seem to be something amenable to static analysis, but as I say, there's a surprising amount of code there.  Fun fact!  It calls into the nvidia blob now.09:12
jcristauread input calls into nvidia??09:12
RAOFYes.09:12
apwRAOF, i hope you don't mean the intel driver :)09:13
jcristaufor hw cursor, or something else?09:13
RAOFBecause read input wraps into ConstrainCursorHarder, and nvidia now has a ConstrainCursorHarder hook.09:13
jcristauah.09:13
RAOFTo handle the same thing as xrandr's ConstrainCursorHarder hook.09:13
RAOFOne might think that the xrandr/ subdirectory would be free of the sigio context; you'd be mistaken.09:14
apwRAOF, ok just in case i took a gcore of it09:14
RAOFapw: Well, I now know of at least one critical bug in my code.09:15
apwRAOF, heh well something came out of my hang :)09:16
RAOFAnd with that, dinner.09:16
=== yofel_ is now known as yofel
ossguyis this the right place to discuss regressions in X between Ubuntu 12.04 Alpha and Beta?16:05
ossguyI did a dist-upgrade this morning (last one was a week ago, before Beta was released) and now it will only start in low graphics mode16:06
tjaaltonwhich driver do you use?16:09
ossguysorry, it's radeon16:09
tjaaltonso no fglrx?16:10
tjaaltoninstalled16:10
ossguycorrect16:10
ossguynever installed16:10
tjaaltonpastebin /var/log/Xorg.0.log16:10
ossguyyep, just a sec16:10
tjaalton(pastebinit $foo)16:13
ossguysorry, I'm otherwise distracted currently :)16:13
ossguyit's at http://ossguy.com/xorg/20120305/1010/Xorg.0.log now16:14
ossguyand http://ossguy.com/xorg/20120305/1010/Xorg.0.log.old16:14
ossguy(running 2 different kernel versions; I got the same issue with all of them (including -18, which I tried before these))16:14
tjaaltondualscreen?16:15
ossguyyes16:16
ossguyidentical model screens16:16
tjaaltonso which version was the last working one?16:17
ossguyneither of the 2 I posted are from working X sessions16:18
ossguyI will try to find you a log from a working session16:18
tjaaltonjust try an older kernel abi version16:18
tjaaltonif you have those installed16:18
ossguyhow much older do you mean?16:18
tjaaltonone that works16:19
ossguyI have 3.2.0-12, -15, -17, and -1816:19
tjaaltonso try -1216:19
ossguyI've tried the last 316:19
ossguyok16:19
ossguyI will once I'm in a state where I can reboot the system I'm on16:19
tjaaltonactually, the logfile says it's using 19x1216:23
ossguylog from working sessions is here: http://ossguy.com/xorg/20120216/1628/Xorg.1.log16:23
ossguys/sessions/session/16:23
tjaalton[    73.483] (II) RADEON(0): Output DisplayPort-0 using initial mode 1920x120016:23
tjaalton[    73.483] (II) RADEON(0): Output HDMI-0 using initial mode 1920x120016:23
ossguyyes, I noticed the screen was the usual res16:24
ossguybut I got the box saying it was running in low graphics mode16:24
ossguyand there didn't seem to be an easy way to get around it16:24
tjaaltonhuh?16:24
ossguyafter I did the dist-upgrade this morning, I rebooted the system and X started up with the "you're running in low graphics mode" message16:26
ossguybut as far as I could tell, it was running at 19x12 (and the logs confirm this)16:26
tjaaltonahah, so xdiagnose fired up for some reason16:26
ossguyright (I guess :) )16:27
tjaaltonwell you didn't say it looked normal16:27
ossguyalso, the screens were in mirroring mode16:27
ossguynot side-by-side, as I had configured16:27
tjaaltonit's a per-user setting16:28
ossguyah, right16:28
ossguyok, so we didn't even get there16:28
ossguyany ideas why xdiagnose might have decided to run?16:28
tjaaltonno..16:28
ossguyor how to get it to not run?16:28
tjaaltonit runs on every boot?16:28
ossguyyes16:28
tjaaltonbryceh: ^ :)16:28
ossguy(or maybe a different venue where it's more appropriate to ask this question?)16:29
tjaaltonno this is fine16:29
ossguyok16:29
tjaaltonbasically it would mean that lightdm had failed to start16:30
tjaaltoncheck /var/log/lightdm/*16:30
tjaaltonoh, dist-upgrade.. check that you have lightdm _installed_16:31
ossguylightdm produced logfiles the last time I started Ubuntu16:31
ossguyso I presume it is installed16:31
tjaaltonok, check what's in them16:31
ossguy[+0.67s] DEBUG: Failed to load session file /usr/share/xgreeters/.desktop: No such file or directory:16:32
ossguy[+0.67s] DEBUG: Failed to start greeter16:32
ossguyperhaps that is an issue?16:32
ossguyI will post the full log; just a sec16:32
tjaaltonis unity-greeter installed?16:33
tjaaltonapt-cache policy unity-greeter16:33
ossguysorry, I'm not booted into Ubuntu right now (I'm in a different distro on the same machine)16:33
ossguyI can check some apt-related files, though16:34
tjaaltoncheck the upgrade log16:34
tjaaltondpkg.log16:34
ossguyok16:34
tjaaltonand you can always chroot into the partition :)16:35
ossguylightdm log here: http://ossguy.com/xorg/20120305/1010/lightdm.log16:35
ossguytrue; I'd rather not do anything funny there, though :)16:35
tjaaltondo you have /usr/share/xgreeters/unity-greeter.desktop16:36
ossguyno, /usr/share/xgreeters does not exist16:36
tjaaltonso no /usr/sbin/unity-greeter either?16:36
tjaaltongrep unity-greeter /var/log/dpkg.log ?16:37
ossguyit suggests unity-greeter was removed16:37
tjaaltonthere you go16:37
tjaaltonnever blindly run dist-upgrade16:38
ossguyI presume something was unexpected here16:38
ossguyah, ok, good lesson I suppose :)16:38
ossguywhat's the best/easiest way to get back to working?16:38
tjaaltonbut first upgrade and then see if dist-upgrade would remove stuff16:38
tjaaltonubuntu-desktop got removed as well I guess, so install it16:39
ossguyyep, looks like it was removed, too16:39
ossguyso what was the way I should have done this upgrade?16:39
ossguyI mean eventually I want to run "dist-upgrade"16:39
tjaaltononly when it's not doing silly things16:40
ossguyso how should I determine when is the right time to do so?16:40
ossguyok16:40
ossguyso in alpha/beta I should expect silly things16:40
tjaaltona good indicator is when it's removing *-desktop..16:40
tjaaltonyes16:40
ossguyright :P16:40
tjaaltontransitions etc16:41
ossguytjaalton: thanks very much for all your help16:43
ossguyand for bearing with a dumb user ;)16:43
tjaaltonyw16:45
=== Sinnerman is now known as Cobalt
=== FernandoMiguel is now known as FM_fewd
=== FM_fewd is now known as FernandoMiguel
Sarvatthmm, haven't seen this input related crash come up before, just hit it http://paste.ubuntu.com/870647/22:45
brycehRAOF, thoughts on bug 931967?22:52
ubottuLaunchpad bug 931967 in OEM Priority Project "Corrupted graphics after the login until the unity launcher appears" [Critical,Triaged] https://launchpad.net/bugs/93196722:52
brycehI'm assuming it's just that when lightdm hands off to X, the framebuffer isn't zero'd out.  something lightdm should be doing?22:53
RAOFI started looking at that, then got pulled into more pressing issues.22:54
RAOFWhat I had was: lightdm draws to the root window.22:54
RAOFOr, rather *unity-greeter* draws to the root window.22:55
RAOFThis should mean that whatever unity-greeter leaves on the display stays there until something else draws; that something else should be compiz.22:55
RAOFHowever, on *some* drivers that isn't happening; it doesn't happen on intel, it does on radeon and nouveau.22:56
RAOFWhich suggests it might be an EXA issue, or something.22:57
brycehfglrx and -nvidia too aiui22:57
brycehyep, just repro'd on -nvidia22:57
RAOFI wonder if RetainPermanent is horribly unimplemented.23:04
RAOFWhat I was going to try is to replace unity-greeter's cairo render-to-root-pixmap code with a straight X11 CopyArea from a pixmap to the root window.23:05
brycehhmm, wonder if unity-greeter has some better debugging output...23:07
RAOFbryceh: Hey, you know those xlib-xcb asserts we've been seeing?  Think http://article.gmane.org/gmane.comp.freedesktop.xorg.devel/29102 might have something to do with it?23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!