Bug 109230 - [crash] Xorg is crashing on startup with enabled xinerama
Summary: [crash] Xorg is crashing on startup with enabled xinerama
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) All
: medium major
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-06 11:29 UTC by Mariusz Białończyk
Modified: 2019-01-10 15:59 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
full Xorg.log (56.08 KB, text/x-log)
2019-01-06 11:29 UTC, Mariusz Białończyk
no flags Details
xorg.conf (1.93 KB, text/plain)
2019-01-06 11:30 UTC, Mariusz Białończyk
no flags Details
startx - backtrace on console output (2.79 KB, text/x-log)
2019-01-07 07:42 UTC, Mariusz Białończyk
no flags Details
radeon backtrace (7.39 KB, text/plain)
2019-01-07 08:45 UTC, Mariusz Białończyk
no flags Details
Only call drmmode_validate_leases when RandR is enabled (1.29 KB, patch)
2019-01-07 17:41 UTC, Michel Dänzer
no flags Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Mariusz Białończyk 2019-01-06 11:29:09 UTC
Dual gpu configuration: radeon + nouveau.
When xinerama is enabled xorg is crashing with the following backtrace:

[1208755.149] (EE) Backtrace:
[1208755.159] (EE) 0: /usr/lib/xorg/Xorg (OsLookupColor+0x139) [0x55b646b6afc9]
[1208755.160] (EE) 1: /lib/x86_64-linux-gnu/libpthread.so.0 (funlockfile+0x50) [0x7f7d21b486ff]
[1208755.162] (EE) 2: /lib/x86_64-linux-gnu/libc.so.6 (gsignal+0x10b) [0x7f7d219aa85b]
[1208755.163] (EE) 3: /lib/x86_64-linux-gnu/libc.so.6 (abort+0x121) [0x7f7d21995535]
[1208755.164] (EE) unw_get_proc_name failed: no unwind info found [-10]
[1208755.164] (EE) 4: /lib/x86_64-linux-gnu/libc.so.6 (?+0x0) [0x7f7d21995400]
[1208755.165] (EE) 5: /lib/x86_64-linux-gnu/libc.so.6 (__assert_fail+0x42) [0x7f7d219a30a2]
[1208755.166] (EE) 6: /usr/lib/xorg/modules/drivers/nouveau_drv.so (_init+0x433b3) [0x7f7d1ff2e743]
[1208755.167] (EE) 7: /usr/lib/xorg/modules/drivers/nouveau_drv.so (_init+0x4430a) [0x7f7d1ff304ea]
[1208755.168] (EE) 8: /usr/lib/xorg/modules/drivers/nouveau_drv.so (_init+0x48b20) [0x7f7d1ff39480]
[1208755.169] (EE) 9: /usr/lib/xorg/modules/drivers/nouveau_drv.so (_init+0x3b581) [0x7f7d1ff1ea81]
[1208755.175] (EE) 10: /usr/lib/xorg/Xorg (InitExtensions+0x63e) [0x55b646a7affe]
[1208755.176] (EE) 11: /usr/lib/xorg/Xorg (InitFonts+0x279) [0x55b646a10839]
[1208755.178] (EE) 12: /lib/x86_64-linux-gnu/libc.so.6 (__libc_start_main+0xeb) [0x7f7d2199709b]
[1208755.178] (EE) 13: /usr/lib/xorg/Xorg (_start+0x2a) [0x55b6469fa68a]

Related with?
https://bugs.freedesktop.org/show_bug.cgi?id=108495
Comment 1 Mariusz Białończyk 2019-01-06 11:29:38 UTC
Created attachment 142983 [details]
full Xorg.log
Comment 2 Mariusz Białończyk 2019-01-06 11:30:04 UTC
Created attachment 142984 [details]
xorg.conf
Comment 3 Ilia Mirkin 2019-01-06 17:47:18 UTC
Looks like an assertion is failing in nouveau somewhere. I doubt it's related to the intel SNA bug.

Do you have a debug symbols package you could install? Or perhaps build xf86-video-nouveau yourself?

Also, to eliminate some potential complications -- try commenting out the RADEON bit and ensure that it keeps failing. (Not that that shouldn't work, but good to know for debugging purposes.)
Comment 4 Mariusz Białończyk 2019-01-07 07:42:07 UTC
Hi Ilia,
> Do you have a debug symbols package you could install? Or perhaps build
> xf86-video-nouveau yourself?
yes - I installed it, but the line:
"unw_get_proc_name failed: no unwind info found"
was still there, so I compiled nouveau myself and installed with debug symbols but it doesn't help to full unwind, so finally I compiled whole xorg+debug symbols and complete unwind still doesn't happen.
Isn't it that this unwind is for some libc calls which is irrelevant?
I am attaching new backtrace from console output.

> Also, to eliminate some potential complications -- try commenting out the
> RADEON bit and ensure that it keeps failing. (Not that that shouldn't work,
> but good to know for debugging purposes.)
No, it is not failing with nouveau alone (and commented radeon driver).

I was also trying to disable xinerama (with radeon+nouveau) - then it is also not failing. It seems this is triggering only with enabled xinerama and both radeon and nouveau drivers loaded.
Comment 5 Mariusz Białończyk 2019-01-07 07:42:43 UTC
Created attachment 142995 [details]
startx - backtrace on console output
Comment 6 Ilia Mirkin 2019-01-07 07:52:43 UTC
OK, that's helpful:

Xorg: /usr/include/xorg/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed.

Can you stick a "return false" at the top of nouveau_sync_init and see if that helps?
Comment 7 Mariusz Białończyk 2019-01-07 07:58:38 UTC
Added this and it doesn't help. Can I somehow disable all RandR calls?
Comment 8 Ilia Mirkin 2019-01-07 08:08:30 UTC
You could make drmmode_display.c:has_randr unconditionally return "false".

Getting a proper backtrace would be really nice though. Perhaps you can get it in gdb? (Although it would be easiest to do that from a different machine over ssh.)
Comment 9 Mariusz Białończyk 2019-01-07 08:45:26 UTC
I was able to collect proper backtrace with symbols. And it seems the problem is the radeon.
I am attaching full backtrace.
Comment 10 Mariusz Białończyk 2019-01-07 08:45:48 UTC
Created attachment 142996 [details]
radeon backtrace
Comment 11 Mariusz Białończyk 2019-01-07 08:55:44 UTC
update:
It seems that returning from drmmode_validate_leases() helped (at least it doesn't assert anymore), I'll check it at home because of limited access to the hardware.

Maybe a similar fix in radeon to this patch will be needed?
https://cgit.freedesktop.org/nouveau/xf86-video-nouveau/commit/?id=e9418e434311336e905b70553a5ed740838d90ad
Comment 12 Mariusz Białończyk 2019-01-07 13:55:51 UTC
update:
Just verified, my patch fixed the problem. Please create a proper solution :)
Comment 13 Michel Dänzer 2019-01-07 17:41:59 UTC
Created attachment 143002 [details] [review]
Only call drmmode_validate_leases when RandR is enabled

Does this patch fix the problem?
Comment 14 Mariusz Białończyk 2019-01-08 19:10:48 UTC
Michel,
Yes, the problem is fixed with your patch. Thank you! :)
Comment 15 Michel Dänzer 2019-01-10 15:59:26 UTC
Thanks for the report and testing, fixed in xf86-video-ati Git master:

commit b1c01698f577577e4a88bad0ae08fb5d998e7ebb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 9 11:26:14 2019 +0100

    Only call drmmode_validate_leases if RandR is enabled


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.