Bug 106772 - Xorg crashes with nouveau and dual screen setup
Summary: Xorg crashes with nouveau and dual screen setup
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-01 19:01 UTC by Andrew Savchenko
Modified: 2019-12-04 09:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
gdb.log (2.90 KB, text/plain)
2018-06-01 19:01 UTC, Andrew Savchenko
no flags Details
Full xorg.log (36.23 KB, text/plain)
2018-06-01 19:01 UTC, Andrew Savchenko
no flags Details
xorg.conf (941 bytes, text/plain)
2018-06-01 19:03 UTC, Andrew Savchenko
no flags Details
lspci (533 bytes, text/plain)
2018-06-01 19:04 UTC, Andrew Savchenko
no flags Details
xrandr output (969 bytes, text/plain)
2018-06-01 19:04 UTC, Andrew Savchenko
no flags Details
xfree86: Wrap RRCrtcIsLeased and RROutputIsLeased to check for DIX structures (4.20 KB, patch)
2018-06-01 20:56 UTC, Keith Packard
no flags Details | Splinter Review
backtrace before any patch (2.51 KB, text/plain)
2018-07-13 09:53 UTC, Mariusz Białończyk
no flags Details
full Xorg log after patching (72.03 KB, text/plain)
2018-07-13 09:53 UTC, Mariusz Białończyk
no flags Details

Description Andrew Savchenko 2018-06-01 19:01:21 UTC
Created attachment 139910 [details]
gdb.log

Hi!

I tried Nouveau (xorg-dri-nouveau-18.1.0 from mesa 18.1.0 and xorg-drv-nouveau-1.0.15) with the latest xorg-1.20 and dual monitors. With single screen and xinerama it works fine, with dual screens (w/o xinerama) it segfaults, see log below.

I want to use separate X screens, since monitors have sufficiently different DPI and color temp and Xinerama doesn't allow different DPI on different monitors.

Kernel in use is 4.6.13 with nouveau built as module.
Comment 1 Andrew Savchenko 2018-06-01 19:01:54 UTC
Created attachment 139913 [details]
Full xorg.log
Comment 2 Andrew Savchenko 2018-06-01 19:03:24 UTC
Created attachment 139918 [details]
xorg.conf

xorg.conf for dual head setup with screens, I tried to remove Option ZaphodHeads and to add Option DRI 3, all attempts results in the same failure as above.
Comment 3 Andrew Savchenko 2018-06-01 19:04:11 UTC
Created attachment 139922 [details]
lspci

lspci -v output for the VGA device
Comment 4 Andrew Savchenko 2018-06-01 19:04:54 UTC
Created attachment 139924 [details]
xrandr output
Comment 5 Keith Packard 2018-06-01 20:55:50 UTC
Looks like Nouveau still parties like it's 1999. I don't think more recent drivers do mode setting this early. However, it's easy enough to handle this case by simply skipping the RRCrtcIsLeased and RROutputIsLeased calls when the respective DIX objects haven't been created yet. Here's a patch which simply wraps those functions in xf86 code that checks for NULL pointers before calling the DIX code.
Comment 6 Keith Packard 2018-06-01 20:56:35 UTC
Created attachment 139958 [details] [review]
xfree86: Wrap RRCrtcIsLeased and RROutputIsLeased to check for DIX structures
Comment 7 Mariusz Białończyk 2018-07-13 09:52:13 UTC
Hello Keith,
I suffer from the same problem - crash on startup.
The backtrace is identical (attaching).
The circumstances are the same - I have four monitors with two nvidia cards using nouveau driver.
I am using xinerama.

After applying your patch the backtrace is different:

double free or corruption (!prev)
(EE)
(EE) Backtrace:
(EE) 0: /usr/lib/xorg/Xorg (xorg_backtrace+0x4a) [0x5637ad9347da]
(EE) 1: /usr/lib/xorg/Xorg (0x5637ad780000+0x1b8489) [0x5637ad938489]
(EE) 2: /lib/x86_64-linux-gnu/libpthread.so.0 (0x7efc039f4000+0x11f50) [0x7efc03a05f50]
(EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0x10b) [0x7efc0366ee7b]
(EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x151) [0x7efc03670231]
(EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (0x7efc0363a000+0x777b7) [0x7efc036b17b7]
(EE) 6: /lib/x86_64-linux-gnu/libc.so.6 (0x7efc0363a000+0x7dd5a) [0x7efc036b7d5a]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7efc0363a000+0x7f81c) [0x7efc036b981c]
(EE) 8: /usr/lib/xorg/Xorg (PanoramiXCreateConnectionBlock+0x20a) [0x5637ad87f98a]
(EE) 9: /usr/lib/xorg/Xorg (0x5637ad780000+0x609e1) [0x5637ad7e09e1]
(EE) 10: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xe7) [0x7efc0365ba87]
(EE) 11: /usr/lib/xorg/Xorg (_start+0x2a) [0x5637ad7ca6ca]

Attaching a full log.

regards,
manio
Comment 8 Mariusz Białończyk 2018-07-13 09:53:02 UTC
Created attachment 140621 [details]
backtrace before any patch
Comment 9 Mariusz Białończyk 2018-07-13 09:53:32 UTC
Created attachment 140622 [details]
full Xorg log after patching
Comment 10 Martin Peres 2019-12-04 09:40:00 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/436.


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.