Summary: | kernel BUG when using nouveau | ||
---|---|---|---|
Product: | xorg | Reporter: | Xavier <shiningxc> |
Component: | Driver/nouveau | Assignee: | Nouveau Project <nouveau> |
Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> |
Severity: | normal | ||
Priority: | medium | CC: | andyrtr |
Version: | 7.4 (2008.09) | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
Description
Xavier
2009-09-10 10:48:44 UTC
Created attachment 29389 [details]
xorg log
Created attachment 29390 [details]
kernel dmesg
Created attachment 29391 [details]
kernel config
After a git bisect and 10 reboot, I found the offending commit : http://cgit.freedesktop.org/nouveau/linux-2.6/commit/?id=9d8ae0c84726807c43b7230b8e6c2d079c33b81d reverting that line works perfectly here :) I just regret I first tried nouveau-git right after that commit went in. If I had tried just before, it would have been easy to find the regression. sorry, disregard the last information. The problem is that there is some randomness involved. The kernel booted fine twice in a row, and then everything worked fine. But rebooting another time triggered the same failure again. Same here. Same distribution. Different card. I have a gf6200TC. It happens to me only when I enable KMS. Then it took me 8 boots to get it up. 7times it crashed similar. With KMS disabled this never happened and Xorg starts fine. Then there are problems shutting down Xorg process but that's probably something different. How can we help to track this down? stable kernel 2.6.31, nouveau from master daily snapshot 20090909. gcc4.4.1 From what has been reported here, this looks like a race in a completely irrelevant (to nouveau) part of the kernel. It happens randomly, more often when nouveau.ko KMS is loaded early, and less often when nouveau.ko loads later. AFAIK no-one has yet managed to hit it completely without Nouveau, which is somewhat concerning. My guess is that nouveau alters the kernel code execution timings and makes a race elsewhere a lot more failure prone. Some suggestions: - search kernel mailing lists for CFQ bug reports (since it seems to happen in CFQ code) - try to reproduce it without nouveau, e.g., try an old FB driver - try enabling heavy debugging features in the kernel config, like kmemcheck or kmemleak I'm trying to steer this away from Nouveau first, because it looks very difficult to debug. In the future, please provide full kernel logs from boot, and set attachment type to text/plain. Some new information : * CONFIG_DEBUG_SPINLOCK (spinlock and rw lock debugging : basic checks) works around the problem (it leads to very stable nouveau kms) * maxcpus=1 does not workaround the problem * traces are not always in cfq code * traces only happen when nouveau is loaded * other framebuffer drivers work fine (vesafb, uvesafb, nvidiafb) * crash are (almost?) always with kms on * crash can happen both at boot or when reloading module * crash seem more frequent when nouveau is loaded by udev or in early boot, rather than loaded with X * happen both with 2.6.31-rc8 (nouveau-git) and 2.6.31 stable Created attachment 29577 [details]
crash when reloading the module (2.6.31 stable / master-compat 20090909)
Created attachment 29578 [details]
crash when reloading the module (nouveau-git kernel from today - 2.6.31-rc8)
* building a kernel without highmem does not help * booting with nosmp does not help Disabling PAT on latest nouveau git kernel does not help. 2.6.31.1 kernel (+ master-compat snapshopt from today) does not help. So still using nouveau kernel (2.6.31-rc9 now). When nouveau is loaded during boot, it seems to crash 100% of the times, with a trace similar to the one here : https://bugs.freedesktop.org/attachment.cgi?id=29578 That is : BUG: unable to handle kernel NULL pointer dereference at 00000003 IP: [<c027e452>] kmem_cache_alloc+0x62/0xda When I boot with noacpi, the first initialization does not crash for some reasons... But as soon as I reload the module, it crashes, in random places of the code. I will attach two dmesg showing that. Created attachment 29924 [details]
crash when reloading the module (nouveau-git 2.6.31-rc9 booted with noacpi)
Created attachment 29925 [details]
another crash when reloading the module (nouveau-git 2.6.31-rc9 booted with noacpi)
Created attachment 29949 [details] [review] replacement for DEBUG_SPINLOCK? Could you try if this patch has the same effect as enabling DEBUG_SPINLOCK? If it does, could you try to reduce the patch to a minimal set of changes that does the same. Created attachment 29950 [details]
ttm trace log
I have a x86_64 system and enabled DEBUG_SPINLOCK but it didn't solve anything for me. I enabled the debug option for the drm module and when udev starts it shows Sep 29 16:59:20 workstation64 kernel: BUG: unable to handle kernel NULL pointer dereference at 00000000000000cc Sep 29 16:59:20 workstation64 kernel: IP: [<ffffffff811f726b>] _raw_spin_lock+0x2b/0x190 Sep 29 16:59:20 workstation64 kernel: PGD 22e59f067 PUD 22e60a067 PMD 0 Sep 29 16:59:20 workstation64 kernel: Oops: 0000 [#1] PREEMPT SMP Sep 29 16:59:20 workstation64 kernel: last sysfs file: /sys/module/evdev/initstate Sep 29 16:59:20 workstation64 kernel: CPU 3 Sep 29 16:59:20 workstation64 kernel: Modules linked in: ttm(+) serio_raw drm_kms_helper thermal sg mii pcspkr soundcore snd_page_alloc evdev ehci_hcd(+) drm i2c_i801 button iTCO_wdt i2c_algo_bit iTCO_vendor_su pport i2c_core processor usbcore intel_agp rtc_cmos rtc_core rtc_lib ext4 mbcache jbd2 crc16 sd_mod ahci libata scsi_mod Sep 29 16:59:20 workstation64 kernel: Pid: 601, comm: modprobe Not tainted 2.6.31-ARCH #1 OEM Sep 29 16:59:20 workstation64 kernel: RIP: 0010:[<ffffffff811f726b>] [<ffffffff811f726b>] _raw_spin_lock+0x2b/0x190 more in the log Created attachment 29962 [details] [review] [PATCH] drm/nouveau: fix missized allocation for ttm_bo_global struct This patch from http://0x04.net/~mwk/0001-drm-nouveau-fix-missized-allocation-for-ttm_bo_glob.patch fixes it, right? Yes, it fixes it for Xavier (i686) and me (x86_64). Seems to work for everyone involved, fix has been commited to git. Closing. |
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.