Bug 679629

Summary: Fast userswitch and glxgears in comibination with Nouveau X.org driver causes glxgears to crash...
Product: [Fedora] Fedora Reporter: Sebastian Rasmussen <sebras>
Component: xorg-x11-drv-nouveauAssignee: Ben Skeggs <bskeggs>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: airlied, ajax, bskeggs, mcepl, travneff
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 15:32:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
glxgears crash log
none
glxinfo crash log
none
xorg log while glxgears crashing
none
dmesg output
none
/var/log/messages file
none
[2]: dmesg output
none
[2]: xorg log
none
[2]: /var/log/messages
none
[2]: strace for glxinfo none

Description Sebastian Rasmussen 2011-02-23 02:42:32 UTC
Description of problem:

I participated in Nouveau Testing Day (see additional info below).
When attempting to run glxgears on both X.orgs as described in the fastuserswitch testcase I managed to get glxgears to crash.

Quote from dmesg:
[ 1746.004485] [drm] nouveau 0000:05:00.0: Error allocating channel PRAMIN: -12
[ 1746.004491] [drm] nouveau 0000:05:00.0: init pramin
[ 1746.004494] [drm] nouveau 0000:05:00.0: gpuobj -12
[ 1746.004555] glxgears[2970] segfault t 18 ip 00007f9db3442839 sp 00007fffef9fec20 error 4 in libdrm_nouveau.so.1.0.0[7f9db3440000+5000]

Version-Release number of selected component (if applicable):
xorg-x11-drv-nouveau 0.0.16-19.20110216git42c16ff.fc15

How reproducible:
Often to every time.

Steps to Reproduce:
1. Login, open a terminal create a new user.
2. Fastswitch to new user.
3. Start new terminal and start glxgears.
4. Close glxgears
5. Switch back to user liveuser.
6. Attempt to run glxgears and see it segfault!
  
Actual results:
glxgears segfaults

Expected results:
That it doesn't segfault but rather renders its cogs.

Additional info:
The following livecdimage was used:
http://adamwill.fedorapeople.org/gfx_test_week_201102/gfx_test_week_20110221_x86-64.iso
SHA256SUM: e59d1886f7b766011b89d88369d09a4dd46bd7ba8a25664e9de0430d0f8725d7

Smolt:
http://smolts.org/client/show/pub_6833947c-d3ee-4790-ab43-fc7431c36dd9

Comment 1 Andrew 2011-03-08 14:18:23 UTC
Have same issue. Also glxinfo is crashed with same error. Launched both utils under strace if it may help, logs attached.

Comment 2 Andrew 2011-03-08 14:19:17 UTC
Created attachment 482907 [details]
glxgears crash log

Comment 3 Andrew 2011-03-08 14:20:13 UTC
Created attachment 482908 [details]
glxinfo crash log

Comment 4 Matěj Cepl 2011-03-08 15:10:49 UTC
Thanks for the bug report.  We have reviewed the information you have provided above, and there is some additional information we require that will be helpful in our diagnosis of this issue.

Please add drm.debug=0x04 to the kernel command line, restart computer, and attach

* your X server config file (/etc/X11/xorg.conf, if available),
* X server log file (/var/log/Xorg.*.log)
* output of the dmesg command, and
* system log (/var/log/messages)

to the bug report as individual uncompressed file attachments using the bugzilla file attachment link above.

We will review this issue again once you've had a chance to attach this information.

Thanks in advance.

Comment 5 Andrew 2011-03-12 09:40:21 UTC
Created attachment 483878 [details]
xorg log while glxgears crashing

Comment 6 Andrew 2011-03-12 09:41:26 UTC
Created attachment 483879 [details]
dmesg output

Comment 7 Andrew 2011-03-12 09:42:58 UTC
Created attachment 483880 [details]
/var/log/messages file

Comment 8 Andrew 2011-03-12 09:44:19 UTC
X server config doesn't exist for my case. Rest of files attached.

Also I tried to launch X server as "startx -- -logverbose 6" from runlevel 3, but something went wrong and fast user switching wasn't available in this case (some error about desktop .service file was thrown by Gnome).

Used environment: same as Sebastian.
Kernel command line: "BOOT_IMAGE=/gfx_20110221/isolinux/vmlinuz0 root=LABEL=wdmp_e3 rootfstype=auto ro liveimg rd.luks=0 rd.md=0 rd.dm=0 drm.debug=0x04"
Video adapter: Sparkle / nVidia Corporation NV43 [GeForce 6600] [10de:0141] (rev a2).
Smolt: http://www.smolts.org/client/show/pub_ea9d7586-9e38-47aa-8c35-0ac599e86a66

Comment 9 Ben Skeggs 2011-03-13 22:34:45 UTC
Can you update to http://koji.fedoraproject.org/koji/buildinfo?buildID=232757 (kernel-2.6.38-0.rc8.git0.2.fc15) and retry?

Nouveau was artificially limiting the number of possible GPU clients to preserve VRAM.  For a number of complicated reasons, we have no choice but to reserve VRAM for each and nouveau was erring on the stingy side.  I've fixed this now, and the maximum possible number of clients (32) supported by the GPU is now allowed.

Just for future reference if anyone cares, the DRM will use 1 of these, every X server will use 2 (for 2D rendering, another for AIGLX) and each 3D client will use at least one depending on how the client is written.

Comment 10 Sebastian Rasmussen 2011-03-14 01:43:56 UTC
Sorry for the delay, I've been caught up in work in the real world. :-/
I've bought a USB stick to use for testing though so I hope to retest this and return to you with answers during the coming week.

 / Sebastian

Comment 11 Andrew 2011-03-16 08:40:44 UTC
> Can you update to http://koji.fedoraproject.org/koji/buildinfo?buildID=232757
(kernel-2.6.38-0.rc8.git0.2.fc15) and retry?

Sorry, I used live image for testing. Is it suitable to use image from the following link?

http://alt.fedoraproject.org/pub/alt/nightly-composes/desktop/

Comment 12 Andrew 2011-03-27 07:17:45 UTC
Fixed, as for me. However, just one instance of glxgears or glxinfo is working at one time. If you launch second one, it waits for completion of the first.

Used image: http://koji.fedoraproject.org/koji/taskinfo?taskID=2947116 (Fedora-15-Nightly-20110325.20-x86_64-Live-desktop.iso)

Comment 13 Andrew 2011-03-27 09:53:53 UTC
Is it an expected behaviour or some logs should be attached?

Comment 14 Ben Skeggs 2011-03-27 22:16:50 UTC
That's very odd.  There's nothing in nouveau itself which'd do such a wait.

However, can you run glxinfo in gdb and get a backtrace of where it's stuck waiting, just to be sure.

Comment 15 Andrew 2011-04-03 08:04:50 UTC
Sorry, I didn't found how to make gdb output more informative than simple case like "gdb glxinfo" -> "run". There are nothing interesting even with debuginfo package installed.

I've run glxinfo under strace -ir and the wait can be noticed there. Used environment is same, other logs is attached too.

Also it isn't a stable issue. The best way to observe it is a simple default login and launching terminal to reproducing  — no more windows, user sessions or other actions.

Comment 16 Andrew 2011-04-03 08:06:20 UTC
Created attachment 489626 [details]
[2]: dmesg output

Comment 17 Andrew 2011-04-03 08:07:26 UTC
Created attachment 489627 [details]
[2]: xorg log

Comment 18 Andrew 2011-04-03 08:08:37 UTC
Created attachment 489628 [details]
[2]: /var/log/messages

Comment 19 Andrew 2011-04-03 08:09:27 UTC
Created attachment 489629 [details]
[2]: strace for glxinfo

Comment 20 Fedora End Of Life 2012-08-07 15:32:47 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping