Nvidia driver causing SIGSEGV in nvclock and smartdimmer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nvclock (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
nvidia-graphics-drivers-updates (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Changes by Nvidia in their proprietary driver have resulted in several reports of SIGSEGV on Precise and others using Nvidia driver version 295 and later.
Specifically, changes to external access to memory-mapped registers that previously provided the memory address of the video BIOS result in an invalid value being returned. The Pointer to RAMIN (RAM INstance memory) is no longer valid.
This value is treated as a memory address and used by nvclock/smartdimmer to do a memory copy into its own memory.
The SIGSEGV occurs when the glibc (C System Library) memcpy() is called.
(gdb) run
Starting program: /home/all/
Breakpoint 1, check_driver () at back_linux.c:43
43 {
(gdb) c
Continuing.
Breakpoint 1, check_driver () at back_linux.c:43
43 {
(gdb) c
Continuing.
Breakpoint 3, load_bios_pramin (data=0x61e270 "") at bios.c:918
918 uint32_t old_bar0_pramin = 0;
(gdb) n
921 if(!nv_card->arch)
(gdb) n
925 if (nv_card->arch & NV5X)
(gdb) n
937 bios = (char*)
(gdb) n
938 memmove(data, bios, NV_PROM_SIZE);
(gdb) print bios
$1 = 0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>
(gdb) print nv_card->PRAMIN
$2 = (volatile unsigned int *) 0xffffffffffffffff
(gdb) c
Continuing.
Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3 () at ../sysdeps/
91 ../sysdeps/
grep '01:00.0' /var/log/dmesg
[ 0.396479] pci 0000:01:00.0: [10de:0398] type 00 class 0x030000
[ 0.396503] pci 0000:01:00.0: reg 10: [mem 0xd1000000-
[ 0.396529] pci 0000:01:00.0: reg 14: [mem 0xb0000000-
[ 0.396554] pci 0000:01:00.0: reg 1c: [mem 0xd0000000-
[ 0.396571] pci 0000:01:00.0: reg 24: [io 0x2000-0x207f]
[ 0.396589] pci 0000:01:00.0: reg 30: [mem 0x00000000-
[ 0.396684] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device. You can enable it with 'pcie_aspm=force'
[ 0.410100] vgaarb: device added: PCI:0000:
[ 0.410100] vgaarb: bridge control possible 0000:01:00.0
[ 0.466741] pci 0000:01:00.0: BAR 6: can't assign mem pref (size 0x20000)
[ 0.473603] pci 0000:01:00.0: Boot video device
[ 33.246548] vgaarb: device changed decodes: PCI:0000:
lspci -vvvnn -s 01:00.0
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation G73 [GeForce Go 7600] [10de:0398] (rev a1) (prog-if 00 [VGA controller])
Subsystem: Sony Corporation Device [104d:81ef]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at d1000000 (32-bit, non-prefetchable) [size=16M]
Region 1: Memory at b0000000 (64-bit, prefetchable) [size=256M]
Region 3: Memory at d0000000 (64-bit, non-prefetchable) [size=16M]
Region 5: I/O ports at 2000 [size=128]
Expansion ROM at <unassigned> [disabled]
Capabilities: <access denied>
Kernel driver in use: nvidia
Kernel modules: nvidia_
The Nouveau (F/OSS nvidia driver) wiki[1] says:
"Video memory is split into normal memory and RAMIN, also known as instance memory. RAMIN is used to contain the card management objects (usually accessible only to the kernel), normal memory is for objects that normal applications access. "
According to the Nouveau wiki PRAMIN should be in PCI BAR 2[2]. The wiki may be out-of-date but the lspci output above shows the BAR2 isn't being used - I would think BAR3 is the location of PRAMIN.
[2] BAR is a PCI device's Base Address Register. PCI devices can have several of these, each defined in the device's PCI config space. In the lspci output above the BARs are the lines prefixed "Region".
Changed in nvclock (Ubuntu): | |
assignee: | nobody → TJ (tj) |
importance: | Undecided → Medium |
tags: | added: precise |
Changed in nvclock (Ubuntu): | |
assignee: | TJ (tj) → nobody |
Status changed to 'Confirmed' because the bug affects multiple users.