** Changed in: nvclock (Ubuntu)
     Assignee: TJ (tj) => (unassigned)

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to nvidia-graphics-drivers-updates in
Ubuntu.
https://bugs.launchpad.net/bugs/1039916

Title:
  Nvidia driver causing SIGSEGV in nvclock and smartdimmer

Status in “nvclock” package in Ubuntu:
  Triaged
Status in “nvidia-graphics-drivers-updates” package in Ubuntu:
  Confirmed

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/SourceCode/nvclock/nvclock-0.8b4+cvs20100914/src/smartdimmer -g

  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*)nv_card->PRAMIN;
  (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/x86_64/multiarch/memcpy-ssse3.S:91
  91    ../sysdeps/x86_64/multiarch/memcpy-ssse3.S: No such file or directory.

  
  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-0xd1ffffff]
  [    0.396529] pci 0000:01:00.0: reg 14: [mem 0xb0000000-0xbfffffff 64bit 
pref]
  [    0.396554] pci 0000:01:00.0: reg 1c: [mem 0xd0000000-0xd0ffffff 64bit]
  [    0.396571] pci 0000:01:00.0: reg 24: [io  0x2000-0x207f]
  [    0.396589] pci 0000:01:00.0: reg 30: [mem 0x00000000-0x0001ffff pref]
  [    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:01:00.0,decodes=io+mem,owns=io+mem,locks=none
  [    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:01:00.0,olddecodes=io+mem,decodes=none:owns=io+mem

  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_current_updates, nouveau, nvidiafb

  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".

  [1] http://nouveau.freedesktop.org/wiki/HwIntroduction

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nvclock/+bug/1039916/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to