Summary: | segfault on server regen | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Fatih Aşıcı <fatih> | ||||||||||||||||||
Component: | Driver/intel | Assignee: | Keith Packard <keithp> | ||||||||||||||||||
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||||||||||||||
Severity: | critical | ||||||||||||||||||||
Priority: | high | CC: | arekm, bart.polot, eric225125, grey271, griffon26, joekowalski, maillist, martin, pachoramos1, rasasi78, remi, x11 | ||||||||||||||||||
Version: | unspecified | ||||||||||||||||||||
Hardware: | x86 (IA32) | ||||||||||||||||||||
OS: | Linux (All) | ||||||||||||||||||||
Whiteboard: | |||||||||||||||||||||
i915 platform: | i915 features: | ||||||||||||||||||||
Attachments: |
|
Created attachment 23599 [details]
dmesg output
Created attachment 23600 [details]
Xorg log
Does EXA work? Created attachment 23634 [details] Xorg log with EXA (In reply to comment #3) > Does EXA work? > No, it doesn't. But it seems different. Server resets, and mouse cursor appears; but before the kdm screen appears server crashes again. Created attachment 23817 [details]
gdb backtrace taken with EXA
Adjusting severity: crashes & hangs should be marked critical. *** Bug 21476 has been marked as a duplicate of this bug. *** *** Bug 20867 has been marked as a duplicate of this bug. *** *** Bug 21188 has been marked as a duplicate of this bug. *** *** Bug 22836 has been marked as a duplicate of this bug. *** Created attachment 28304 [details]
Another Xorg.log
I also get seg faults on server regeneration with the same backtrace, and in particular to a NULL bufmgr.
I'm using:
GM965
xf86-video-intel: 50e2a6734de43a135aa91cd6e6fb5147e15ce315
kernel: 2.6.30 (with UMS)
The place where i830_init_bufmgr should be called is in i830_allocator_init after DRM_IOCTL_I915_GEM_INIT, but it isn't because the ioctl fails. The clue here is "(EE) intel(0): Failed to initialize kernel memory manager" in the log.
(I'm not absolutely sure that I'm seeing the same bug here because neither this bug nor any of the duplicates have that in their log.)
Poking around in the kernel, this ioctl fails because it is called without the fd being master.
drmDropMaster was called in CloseScreen, via LeaveVT, but the matching call to EnterVT in ScreenInit comes long after i830_memory_init.
So I think it is necessary to call drmSetMaster somewhere in ScreenInit before calling i830_memory_init.
I have the same bug and its a total blocker for me. Without a fix I can't upgrade to 2.6.30. Common setup for all my cases: Chipset: 965GM Driver: 2.8.0 Server: 1.6.3 Libdrm: 2.4.12 The error happens when I log into KDE via kdm and then end the session. Insteast showing the kdm login dialog again the system becomes unusable. This is with KDE 3.5.10, no compiz only kwin, so it should not matter that my mesa is still at 7.3. What works is 2.6.29 without KMS. 2.6.29 with KMS, 2.6.30 with and without KMS and 2.6.30-rc5 with and without KMS are all broken. In the Not-KMS case after the logout the display turns black and I can't do anything lokal anymore. Neither VT-Switch nor a Server-Zap gets any reaction, but the rest of the system is still running (I can login via ssh and it turns off via the power button). In the KMS case the display also turns black, but I can see a cursor at the top left corner. But otherwise the system is in the same state: ssh + powerbutton works, but keyboard and screen seem dead. In all 5 failing cases the Xorg.0.log shows a callchain AddScreen -> unknown address in intel driver -> i830_allocate_2d_memory -> i830_allocate_memory -> drm_intel_bo_alloc. Looking at drm_intel_bo_alloc the only thing creating a sig11 there seems to be the case that the supplied bufmgr is NULL. I think the following is happening: When the KDE session is ended I830CloseScreen is called and that destroys the bufmgr and sets bufmgr to NULL. When the server wants to reopen the Screen it calls: I830ScreenInit \-i830_memory_init \-i830_allocator_init -> that only inits bufmgr in the !use_drm_mode case \-i830_try_memory_allocation \-i830_allocate_2d_memory \-i830_allocate_memory \-drm_intel_bo_alloc -> but bufmgr is still NULL -> Sig11 The first startup seems to work, because I830DrmModeInit always sets up the bufmgr, but this is not called again on server regeneration. I'm attaching a patch that I'm currently using. It fixes the Sig11 and the Xserver no longer dies, but instead of the kdm dialog the screen stays black. But the keyboard still works, so I can switch to a console VT or zap the server with Crtl-Alt-Backspace and get a new kdm dialog. I don't know what other initialisations might be missing, but at least it no longer "bricks" my notebook. From the Xorg.0.log during first startup: (II) intel(0): [DRI2] Setup complete (**) intel(0): Framebuffer compression disabled (**) intel(0): Tiling enabled (**) intel(0): SwapBuffers wait enabled (==) intel(0): VideoRam: 262144 KB (II) intel(0): Attempting memory allocation with tiled buffers. (II) intel(0): Tiled allocation successful. (II) UXA(0): Driver registered support for the following operations: (II) solid (II) copy (II) composite (RENDER acceleration) (==) intel(0): Backing store disabled (==) intel(0): Silken mouse enabled (II) intel(0): Initializing HW Cursor (II) intel(0): No memory allocations (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message. (II) intel(0): DPMS enabled (==) intel(0): Intel XvMC decoder disabled (II) intel(0): Set up textured video (II) intel(0): direct rendering: DRI2 Enabled (WW) intel(0): Option "AccelMethod" is not used (WW) intel(0): Option "PreferredMode" is not used (--) RandR disabled For the regeneration: (II) intel(0): [DRI2] Setup complete (**) intel(0): Framebuffer compression disabled (**) intel(0): Tiling enabled (**) intel(0): SwapBuffers wait enabled (EE) intel(0): BUFMGR is missing! (==) intel(0): VideoRam: 262144 KB (II) intel(0): Attempting memory allocation with tiled buffers. (II) intel(0): Tiled allocation successful. (II) UXA(0): Driver registered support for the following operations: (II) solid (II) copy (II) composite (RENDER acceleration) (II) intel(0): Initializing HW Cursor (II) intel(0): No memory allocations (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message. (II) intel(0): DPMS enabled (==) intel(0): Intel XvMC decoder disabled (II) intel(0): Set up textured video (II) intel(0): direct rendering: DRI2 Enabled (--) RandR disabled The lines "(==) intel(0): Backing store disabled" and "(==) intel(0): Silken mouse enabled" seem missing, but I don't see what might cause this. I also do not see any errors in the kernel-syslog or Xorg.0.log when the screen stays black. Created attachment 28456 [details] [review] Patch to fix the Sig11 because of missing bufmgr *** Bug 23124 has been marked as a duplicate of this bug. *** Still broken the same way with xf86-video-intel-2.8.1. (Using kernel 2.6.31-rc8, xserver 1.6.3, libdrm 2.4.12) The patch still applies and has the same result: The Xserver no longer crashes and can be killed with Ctrl+Alt+Backspace, without the patch display and keyboard are dead. Ugly workaround: Adding TerminateServer=true to kdmrc If kdm restarts the server instead only doing a regeneration the crash does not happens, because the server then does the complete initialization like one the first start. (In reply to comment #13) > Created an attachment (id=28456) [details] > Patch to fix the Sig11 because of missing bufmgr This patch didn't solve the issue for my Gentoo system (vanilla 2.6.30.5, xorg 1.6.3, intel 2.8.1, https://bugs.gentoo.org/show_bug.cgi?id=278473). Toralf, I'm also using a Gentoo system and saw the Gentoo Bug 278473 also, but I think that is something else. That looks more like a kdm bug, because one reporter was using the proprietary nvidia driver, so a bug in xf86-video-intel can't be the reason for that misbehavior. Also only one of the three Xorg.0.log that are attached to the Gentoo Bug have the backtrace that I am seeing (the same one that is in Martin Orr's Xorg.log that is attached to this bug). As to my patch not helping in your case: Did you see a backtrace like the one at the end in Martins Xorg.log before appling my patch? If not, it might be the Gentoo-KDM-Bug and not this issue of the intel driver. If you did have this backtrace you could do two things: a) Look for a line like "(EE) intel(0): BUFMGR is missing!". * If this is not in your Xorg.log, then the changes for my patch where never used. That might suggest there is another issue causing your kdm problems. * If it is there, then please note, that my patch fixes the "Sig11", but not the server regen. My use of this patch is, that instead of a dead Xserver == dead keyboard+display, I only have to deal with a black screen (hung intel driver or hung kdm? I don't know. No error messages in the syslog, kdm.log or Xorg.log.) that I can zap with Ctrl+Alt+Backspace to get a working kdm back. b) Try my "TerminateServer=true"-kdmrc-Workaround. * If this fixes your problem, it points to this X-Org-Bug about the server regeneration. * If this does not help, the server regeneration is not the cause of your problem. That would point more in the direction of the Gentoo-Kdm-Bug. Created attachment 29063 [details]
Xorg.0.log w/ backtrace from aGentoo system
Hello,
I attached the back trace for my system (T400, xorg 1.6.3, intel 2.8.1, i915 kernel module of 2.6.30.5, no KMS). The "ugly" workaround works for me.
BTW I tested today 2.6.31-rc8 + KMS, the issue differs a little bit, now that the mouse pointer is seen after logout, but the entire screen is empty (black). Ctrl-Alt-Backspace works and give a new kdm login.
Fixed in commit 33f98e4056706f4c30bb4327677ac49e82058231 by leaving GEM running across server reset. *** Bug 22941 has been marked as a duplicate of this bug. *** *** Bug 24229 has been marked as a duplicate of this bug. *** |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.
Created attachment 23598 [details] gdb backtrace Everytime I log out the server crashes. GM965 xorg-server: 1.6.0 xf86-video-intel: master c3a747cb54acc1b037b559313e6a2113ae2ac4c7 libdrm: master 391c92ae1799f0d1fddb2321c5713afc58575514 kernel 2.6.29-rc7 + 5ad8b7d12605e88d1e532061699102797fdefe08