Bug 20489 - nv hangs after call to G80CrtcShowHideCursor
Summary: nv hangs after call to G80CrtcShowHideCursor
Status: RESOLVED WONTFIX
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nVidia (open) (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: highest critical
Assignee: Aaron Plattner
QA Contact: Xorg Project Team
URL: https://qa.mandriva.com/show_bug.cgi?...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-05 06:03 UTC by Ander Conselvan de Oliveira
Modified: 2012-01-22 12:30 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Ander Conselvan de Oliveira 2009-03-05 06:03:55 UTC
As reported in https://qa.mandriva.com/show_bug.cgi?id=48279.

"When I close the lid of the laptop and open it again (which triggers locking
the screen), sometimes the system is frozen.
Even mouse does not move"

Backtrace:

0xb7a1f563 in G80DispCommand (pScrn=0x8862588, addr=<value optimized out>, 
    data=83886080) at g80_display.c:189
189            const int super = ffs((pNv->reg[0x00610024/4] >> 4) & 7);
(gdb) backtrace
#0  0xb7a1f563 in G80DispCommand (pScrn=0x8862588, addr=<value optimized out>, 
    data=83886080) at g80_display.c:189
#1  0xb7a1fc1a in G80CrtcShowHideCursor (crtc=<value optimized out>, show=0, 
    update=1) at g80_display.c:437
#2  0x080ef85e in xf86_hide_cursors (scrn=0x8862588) at xf86Cursors.c:263
#3  0x080f7b87 in xf86CursorSetCursor (pDev=0x898d4f8, pScreen=0x8869aa8, 
    pCurs=0x0, x=487, y=249) at xf86Cursor.c:309
#4  0x0811d839 in miPointerUpdateSprite (pDev=0x898d4f8) at mipointer.c:414
#5  0x0811da9f in miPointerDisplayCursor (pDev=0x898d4f8, pScreen=0x8869aa8, 
    pCursor=0x96dfd68) at mipointer.c:198
#6  0x0814c91f in CursorDisplayCursor (pDev=0x898d4f8, pScreen=0x8869aa8, 
    pCursor=0x96dfd68) at cursor.c:148
#7  0x081806c0 in AnimCurDisplayCursor (pDev=0x898d4f8, pScreen=0x8869aa8, 
    pCursor=0x96dfd68) at animcur.c:258
#8  0x080931d8 in ChangeToCursor (pDev=0x898d4f8, cursor=0x96dfd68)
    at events.c:979
#9  0x0809897b in ActivatePointerGrab (mouse=0x898d4f8, grab=0xbfcf4610, time=
      {months = 0, milliseconds = 1928234}, autoGrab=0) at events.c:1514
#10 0x080936a9 in ProcGrabPointer (client=0x963b548) at events.c:4497
#11 0x080893ef in Dispatch () at dispatch.c:437
#12 0x0806d185 in main (argc=-1076934732, argv=0xb7d1feb4, envp=Cannot access
memory at address 0x8
) at main.c:397
(gdb)

The bug is not very reproducible, but seems to occur from time to time. Looks like fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=484738 has the same backtrace.

Using server 1.6 and xf86-video-nv 2.1.12. For X logs, see mandriva bugzilla.
Comment 1 hajma 2009-04-02 12:23:19 UTC
It's happening almost daily


also I noticed 240000 lines in my Xorg.0.log:
...
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
(EE) Mouse2: Read error: No such device
...

not sure if it's related
Comment 2 Valery V. Vorotyntsev 2009-11-22 15:33:57 UTC
Open source driver (nv) hangs after some xscreensaving. No errors in
Xorg.0.log.

I've attached gdb to the hanging Xorg process, added symbols from
nv_drv.so (with `add-symbol-file' gdb command) and obtained some
information.

This is the endless loop I've got (empty lines separate instructions;
the output is a little messy, but don't be afraid; see the source code
below):

    (gdb) display /i $pc
    (gdb) stepi
    0xb7a98182 in G80DispCreateCrtcs (pScrn=0x9dbc510) at ../../src/g80_display.c:679
    679             if(!crtc) return;
    0xb7a98182 <G80DispCreateCrtcs+58>:     test   %eax,%eax

    SmartScheduleTimer (sig=14) at ../../os/utils.c:1243
    1243    {
    0x8134a30 <SmartScheduleTimer>: call   0x8071e6f <__i686.get_pc_thunk.cx>

    0x08071e6f in __i686.get_pc_thunk.cx ()
    0x8071e6f <__i686.get_pc_thunk.cx>:     mov    (%esp),%ecx
    Current language:  auto
    The current source language is "auto; currently asm".

    0x08071e72 in __i686.get_pc_thunk.cx ()
    0x8071e72 <__i686.get_pc_thunk.cx+3>:   ret

    0x08134a35 in SmartScheduleTimer (sig=14) at ../../os/utils.c:1243
    1243    {
    0x8134a35 <SmartScheduleTimer+5>:       add    $0xa97c7,%ecx
    Current language:  auto
    The current source language is "auto; currently c".

    0x08134a3b      1243    {
    0x8134a3b <SmartScheduleTimer+11>:      push   %ebp

    0x08134a3c      1243    {
    0x8134a3c <SmartScheduleTimer+12>:      mov    %esp,%ebp

    1244        SmartScheduleTime += SmartScheduleInterval;
    0x8134a3e <SmartScheduleTimer+14>:      mov    -0x6c(%ecx),%edx

    0x08134a44      1244        SmartScheduleTime += SmartScheduleInterval;
    0x8134a44 <SmartScheduleTimer+20>:      mov    -0x23c(%ecx),%eax

    0x08134a4a      1244        SmartScheduleTime += SmartScheduleInterval;
    0x8134a4a <SmartScheduleTimer+26>:      mov    (%edx),%edx

    0x08134a4c      1244        SmartScheduleTime += SmartScheduleInterval;
    0x8134a4c <SmartScheduleTimer+28>:      add    %edx,(%eax)

    1245    }
    0x8134a4e <SmartScheduleTimer+30>:      pop    %ebp

    1245    }
    0x8134a4f <SmartScheduleTimer+31>:      ret

    <signal handler called>
    0xb7f34400 <__kernel_sigreturn>:        pop    %eax

    <signal handler called>
    0xb7f34401 <__kernel_sigreturn+1>:      mov    $0x77,%eax

    <signal handler called>
    0xb7f34406 <__kernel_sigreturn+6>:      int    $0x80

... and back to G80DispCreateCrtcs, line 679.

Source code of looping functions:

    [xserver-xorg-video-nv-2.1.14/src/g80_display.c]
    668     void
    669     G80DispCreateCrtcs(ScrnInfoPtr pScrn)
    670     {
    671         G80Ptr pNv = G80PTR(pScrn);
    672         Head head;
    673         xf86CrtcPtr crtc;
    674         G80CrtcPrivPtr g80_crtc;
    675
    676         /* Create a "crtc" object for each head */
    677         for(head = HEAD0; head <= HEAD1; head++) {
    678             crtc = xf86CrtcCreate(pScrn, &g80_crtc_funcs);
    679             if(!crtc) return;
    680
    681             g80_crtc = xnfcalloc(sizeof(*g80_crtc), 1);
    682             g80_crtc->head = head;
    683             g80_crtc->dither = pNv->Dither;
    684             crtc->driver_private = g80_crtc;
    685         }
    686     }

    [xorg-server-1.6.5/os/utils.c]
    1241    static void
    1242    SmartScheduleTimer (int sig)
    1243    {
    1244        SmartScheduleTime += SmartScheduleInterval;
    1245    }

And the backtrace:

    (gdb) bt
    #0  0xb7a98182 in G80DispCreateCrtcs (pScrn=0x9dbc510)
        at ../../src/g80_display.c:679
    #1  0xb7a98a09 in G80CalcPLL2 (pScrn=0x1, addr=<value optimized out>, data=0)
        at ../../src/g80_display.c:173
    #2  G80CrtcSetPClk (pScrn=0x1, addr=<value optimized out>, data=0)
        at ../../src/g80_display.c:235
    #3  G80DispCommand (pScrn=0x1, addr=<value optimized out>, data=0)
        at ../../src/g80_display.c:274
    #4  0x080ef08e in xf86_crtc_hide_cursor (scrn=0x9dbc510)
        at ../../../../hw/xfree86/modes/xf86Cursors.c:263
    #5  xf86_hide_cursors (scrn=0x9dbc510)
        at ../../../../hw/xfree86/modes/xf86Cursors.c:280
    #6  0x080f7910 in xf86SetCursor (pScreen=0x9ddaf78, pCurs=0x9f0bd68, x=503,
        y=345) at ../../../../hw/xfree86/ramdac/xf86HWCurs.c:140
    #7  0x080f6e43 in xf86CursorSetCursor (pDev=0x9ecf2d0, pScreen=0x9ddaf78,
        pCurs=0x9f0bd68, x=<value optimized out>, y=<value optimized out>)
        at ../../../../hw/xfree86/ramdac/xf86Cursor.c:344
    #8  0x0811a978 in miPointerUpdateSprite (pDev=0x9ecf2d0)
        at ../../mi/mipointer.c:414
    #9  0x0811abbd in miPointerDisplayCursor (pDev=0x9ecf2d0, pScreen=0x9ddaf78,
        pCursor=0x9f0bd68) at ../../mi/mipointer.c:198
    #10 0x08147606 in CursorDisplayCursor (pDev=0x9ecf2d0, pScreen=0x9ddaf78,
        pCursor=0x9f0bd68) at ../../xfixes/cursor.c:148
    #11 0x08176ba6 in AnimCurDisplayCursor (pDev=0x9ecf2d0, pScreen=0x9ddaf78,
        pCursor=0x9f0bd68) at ../../render/animcur.c:258
    #12 0x08096c19 in ChangeToCursor (pDev=0x9ecf2d0, cursor=0x9f0bd68)
        at ../../dix/events.c:996
    #13 0x0809b642 in DeactivatePointerGrab (mouse=0x9ecf2d0)
        at ../../dix/events.c:1567
    #14 0x080967f4 in ProcUngrabPointer (client=0x9ed0d80) at ../../dix/events.c:4600
    #15 0x0808c8b7 in Dispatch () at ../../dix/dispatch.c:456
    #16 0x08071b8a in main (argc=7, argv=0xbfaea804, envp=0x0)
        at ../../dix/main.c:397

I'm using Debian "testing".

Hope this helps.

--
vvv
Comment 3 hajma 2009-12-06 01:38:47 UTC
I am losing my work because of this

Comment 4 hajma 2009-12-06 01:49:01 UTC
(gdb) bt
#0  0xb7129c47 in G80DispCommand ()
   from /usr/lib/xorg/modules/drivers//nv_drv.so
#1  0xb712a60a in ?? () from /usr/lib/xorg/modules/drivers//nv_drv.so
#2  0x080eeede in xf86_hide_cursors ()
#3  0x080f7c34 in xf86SetCursor ()
#4  0x080f709a in ?? ()
#5  0x0811c60a in miPointerUpdateSprite ()
#6  0x0811c856 in ?? ()
#7  0x0814b212 in ?? ()
#8  0x0817f298 in ?? ()
#9  0x080937cd in ?? ()
#10 0x08093fda in WindowHasNewCursor ()
#11 0x080759b8 in ChangeWindowAttributes ()
#12 0x08088c16 in ProcChangeWindowAttributes ()
#13 0x0808911f in Dispatch ()
#14 0x0806d395 in main ()
Comment 5 Corbin Simpson 2012-01-22 12:30:28 UTC
Nobody is supporting xf86-video-nv and it will be going away at some point in the future. If your problem persists with nouveau or the proprietary driver provided by nVidia, please re-file accordingly. We apologize for the inconvenience.

This is part of an automated bulk action; if you believe that this bug was closed in error, then change the targeted component and reopen it.


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.