Skip to contentSkip to conversation

New: crash with RandR12 on server restart

Bug 13864 [email protected] 1 participant 23 messages Dec 30, 2007 – Jan 13, 2009 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

http://bugs.freedesktop.org/show_bug.cgi?id=13864

Summary: crash with RandR12 on server restart
Product: xorg
Version: 7.3
Platform: Other
OS/Version: All
Status: NEW
Severity: major
Priority: medium
Component: Driver/nouveau
AssignedTo: [email protected]
ReportedBy: [email protected]
QAContact: [email protected]

When the X server automatically restarts after the last client disconnects, nouveau will crash if RandR 1.2 is enabled.

I know the RandR 1.2 stuff still is a bit sketchy, so this might be known. But if not, I'll be happy to provide info and test code.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

A message that is not in the archive (sent off-list or not yet received): bug-13864-8800-V0hAGp6uBxMKqLRl/[email protected]/

#2 lore raw

[Bug 13864] crash with RandR12 on server restart

http://bugs.freedesktop.org/show_bug.cgi?id=13864

------- Comment #1 from [email protected] 2007-12-30 11:13 PST ------- A xlog or a backtrace, anything to indicate what went wrong is needed.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#3 lore raw

[Bug 13864] crash with RandR12 on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

------- Comment #2 from [email protected] 2007-12-30 11:21 PST ------- These are the final lines from X:

nv_output_restore is called
nv_output_restore is called
nv_output_restore is called
pre-Owner: 0x0
post-Owner: 0x0
pre-Owner: 0x0
post-Owner: 0x0
(EE) NOUVEAU(0): [DRI] Locking deadlock.
Already locked with context 157577356,
trying to lock with context 2.
(EE) NOUVEAU(0): Error creating device

Fatal server error:
AddScreen/ScreenInit failed for driver 0

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#4 lore raw

[Bug 13864] crash with RandR12 on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

------- Comment #3 from [email protected] 2007-12-30 11:22 PST ------- Created an attachment (id=13418)
--> (http://bugs.freedesktop.org/attachment.cgi?id=13418&action=view)
Xorg.0.log

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#5 lore raw

[Bug 13864] crash with RandR12 on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

  Attachment #13418|application/octet-stream    |text/plain
          mime type|                            |
Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#6 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

[email protected] changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|crash with RandR12 on server|crash on server restart
                   |restart                     |

------- Comment #4 from [email protected] 2007-12-30 11:44 PST ------- The crash is also present without RandR 1.2 on this card. A case of bad testing
on my part. Sorry.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#7 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

------- Comment #5 from [email protected] 2008-01-01 17:10 PST ------- Same problem with Gentoo ~amd64, nVidia 7600 GS. Lastest x11-drm, libdrm and xf86-video-nouveau. If is server restarted with CTRL-ALT-BACKSPACE, not crash.
If is ended with exit in failsafe mode, or Logout in KDE, then crash with same
error in X.Org.0.log

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
#8 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #6 from Tomasz Sałaciński <[email protected]> 2008-04-14 15:00:36 PST --- Created an attachment (id=15916)
--> (http://bugs.freedesktop.org/attachment.cgi?id=15916)
DMesg log

This file is quite long, but in the middle you can see some traces of nouveau driver doing some nasty things. I haven't cut the file because I think you prefer the whole message log.

Signature · 7 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#9 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #7 from Tomasz Sałaciński <[email protected]> 2008-04-14 15:04:57 PST --- I have the same issue, but I must admit that I am running Fedora 9 Beta and I am using the nouveau driver packaged for the distro:

xorg-x11-drv-nouveau-0.0.10-2.20080408git0991281.fc9.i386

X server crashes and won't run again (actually, I have to do a hard reboot because the console is not showing up, only some error messages on the screen and ALT+Fx doesn't work).

I've created an attachment with dmesg log, you can look for "nouveau" phrase and you will find a backtrace.

It shows something like this:

Apr 13 10:13:41 Tommy-PC kernel: Fixing recursive fault but reboot is needed!

And unfortunately it tells the truth:( I had to disable RHGB (Red Hat Graphical Boot, it starts X server to show the boot progress graphically and then restarts it and starts GDM). Because RHGB starts the X server, it won't run again and it won't show GDM.

Packages:

xorg-x11-server-Xorg-1.4.99.901-21.20080407.fc9.i386 [root@Tommy-PC tommy]# uname -r 2.6.25-0.218.rc8.git7.fc9.i686

Signature · 7 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#10 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

Tomasz Sałaciński <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #8 from Tomasz Sałaciński <[email protected]> 2008-04-14 15:06:01 PST --- And, arr, my card: GeForce 7100 GS. I have GeForce 8600GT laying on my desk, but haven't tested it yet.

Signature · 7 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau
#11 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #9 from Maarten Maathuis <[email protected]> 2008-04-15 03:58:56 PST --- I've seen this before, for someone reason it partially restarts while X is
still running, i wonder if that is valid beheaviour.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#13 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #11 from Maarten Maathuis <[email protected]> 2008-04-15 10:22:33 PST --- Created an attachment (id=15930)
--> (http://bugs.freedesktop.org/attachment.cgi?id=15930)
This is a very crude attempt, but it may work.

Please test this.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#15 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #13 from Pierre Ossman <[email protected]> 2008-04-25 11:55:49 PST --- I'm afraid the patch is insufficient. I get this now:

(EE) [drm] Could not set DRM device bus ID.
(EE) NOUVEAU(0): [dri] DRIScreenInit failed. Disabling DRI.

Fatal server error:
AddScreen/ScreenInit failed for driver 0

I'm in #nouveau if you have a quick update for me to test.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#16 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #14 from Maarten Maathuis <[email protected]> 2008-04-25 13:10:21 PST --- ossman has unusual and unexplainable problems, anyone else that can test?

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#17 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

Paulo R. Zanoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #15 from Paulo R. Zanoni <[email protected]> 2008-06-06 05:47:12 PST --- I have the same problem.

I have tested the patch, and whenever the server restarts, it crashes, giving me the same message Ossman was getting, instead of the "deadlock" message.

(EE) [drm] Could not set DRM device bus ID.
(EE) NOUVEAU(0): [dri] DRIScreenInit failed. Disabling DRI.

Fatal server error:
AddScreen/ScreenInit failed for driver 0

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#18 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #16 from Maarten Maathuis <[email protected]> 2008-06-06 09:22:14 PST --- It would really help if someone who actually had the issue look at it, because
this is not easy to do blindly.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#19 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #17 from Maarten Maathuis <[email protected]> 2008-06-25 10:54:17 PST --- I committed a few changes that might help, please try again.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#20 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #18 from Paulo R. Zanoni <[email protected]> 2008-07-03 06:23:29 PST --- Created an attachment (id=17495)
--> (http://bugs.freedesktop.org/attachment.cgi?id=17495)
Syslog with "debug=1" in drm.ko

Tested with July 02 2008 drm/nouveau.
Loaded drm.ko with debug=1.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#21 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #19 from Paulo R. Zanoni <[email protected]> 2008-07-03 06:26:23 PST --- Created an attachment (id=17496)
--> (http://bugs.freedesktop.org/attachment.cgi?id=17496)
Xorg log

Tested with July 02 2008 drm/nouveau
The problem still happens with me.

How I reproduced the bug:

Open X
DISPLAY=:0.0 xterm
"ctrl+c" to kill xterm.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#22 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

--- Comment #20 from Stuart Bennett <sb476-KWPb1pKIrIJaa/[email protected]> 2008-10-23 08:33:35 PST --- Using the repro method in comment 19, I've pushed some stuff which now lets me
regenerate without crashing, so anyone who was hitting this, please test.

The problem here is that for every mmap(2) (wrapped in the libdrm function drmMap), the kernel increases the refcount on the struct file associated with the drm file descriptor. While we can happily call drmClose (which wraps close(2)), this only decreases the filp->f_count refcount by one, and the count needs to hit zero before the fops->release function (drm_release) is called to free all kernel-side resources.
Calling the release function also means that next time the DRM is opened the opener becomes DRM master, which is necessary for privileged ioctls to work on the next xserver generation. The solution pushed is to drmUnmap (wrapping munmap(2)) all mappings made on the fd (i.e. the user channel, and all buffer objects).

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#23 lore raw

[Bug 13864] crash on server restart

In reply to a message not in the archive

http://bugs.freedesktop.org/show_bug.cgi?id=13864

Stuart Bennett <sb476-KWPb1pKIrIJaa/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #21 from Stuart Bennett <sb476-KWPb1pKIrIJaa/[email protected]> 2009-01-13 15:09:05 PST --- AFAIK the fixes described in comment 20 fixed this. Please reopen with
Xorg.0.log and dmesg logs and preferably details of how to reproduce if you
still hit this.

Signature · 3 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.