[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#896979: xserver-xorg-video-nouveau: Crash when undocking Lenovo P50



Source: xserver-xorg-video-nouveau
Followup-For: Bug #896979

I'm still seeing this with Xorg 1.20 (which is not unexpected). Here's a
better backtrace:

    #0  0x00007fd90edb5e7b in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
    #1  0x00007fd90edb7231 in __GI_abort () at abort.c:79
    #2  0x0000557576dc55ca in OsAbort () at ../../../../os/utils.c:1350
    #3  0x0000557576dcb163 in AbortServer () at ../../../../os/log.c:877
    #4  0x0000557576dcbf85 in FatalError (f=f@entry=0x557576dfec30 "Caught signal %d (%s). Server aborting\n") at ../../../../os/log.c:1015
    #5  0x0000557576dc26b3 in OsSigHandler (signo=11, sip=<optimized out>, unused=<optimized out>) at ../../../../os/osinit.c:156
    #6  0x00007fd90f14cf50 in <signal handler called> () at /lib/x86_64-linux-gnu/libpthread.so.0
    #7  0x00007fd90c027f29 in drmmode_output_dpms (output=0x557578bfaf20, mode=3) at ../../src/drmmode_display.c:921
    #8  0x0000557576cd8813 in xf86DisableUnusedFunctions (pScrn=0x557578a6a120) at ../../../../../../hw/xfree86/modes/xf86Crtc.c:3021
    #9  0x0000557576ce0980 in xf86RandR12CrtcSet (pScreen=<optimized out>, randr_crtc=0x557578c33220, randr_mode=0x0, x=0, y=0, rotation=<optimized out>, num_randr_outputs=0, randr_outputs=0x0) at ../../../../../../hw/xfree86/modes/xf86RandR12.c:1241
    #10 0x0000557576d20122 in RRCrtcSet (crtc=<optimized out>, mode=0x0, x=0, y=0, rotation=rotation@entry=1, numOutputs=numOutputs@entry=0, outputs=0x0) at ../../../../randr/rrcrtc.c:774
    #11 0x0000557576d219fe in ProcRRSetCrtcConfig (client=0x557578a598f0) at ../../../../randr/rrcrtc.c:1401
    #12 0x0000557576c660b8 in Dispatch () at ../../../../dix/dispatch.c:478
    #13 0x0000557576c6a0b8 in dix_main (argc=13, argv=0x7ffd47296448, envp=<optimized out>) at ../../../../dix/main.c:276
    #14 0x00007fd90eda2a87 in __libc_start_main (main=0x557576c53d80 <main>, argc=13, argv=0x7ffd47296448, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffd47296438) at ../csu/libc-start.c:310
    #15 0x0000557576c53dba in _start ()

    (gdb) frame 7
    #7  drmmode_output_dpms (output=0x557578bfaf20, mode=3) at ../../src/drmmode_display.c:921
    921	in ../../src/drmmode_display.c

Looking at that file in nouveau's source code:

static void
drmmode_output_dpms(xf86OutputPtr output, int mode)
{
        drmmode_output_private_ptr drmmode_output = output->driver_private;
        drmModeConnectorPtr koutput = drmmode_output->mode_output;
        drmModePropertyPtr props;
        drmmode_ptr drmmode = drmmode_output->drmmode;
        int mode_id = -1, i;

        for (i = 0; i < koutput->count_props; i++) { // <-- this line!
                props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
                if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
                        if (!strcmp(props->name, "DPMS")) {
                                mode_id = koutput->props[i];
                                drmModeFreeProperty(props);
                                break;
                        }
                        drmModeFreeProperty(props);
                }
        }

Examining some variables:

    (gdb) p i
    $7 = 0

    (gdb) p koutput
    $8 = (struct _drmModeConnector *) 0x0

    (gdb) p *drmmode_output
    $9 = {
      drmmode = 0x557578bf9370, 
      output_id = 73, 
      mode_output = 0x0, 
      mode_encoder = 0x557578bf96a0, 
      edid_blob = 0x0, 
      num_props = 10, 
      props = 0x557578c38f10
    }

So anyway... are you likely to consider that alternative patch to Xorg,
to make it not consider nouveau for newer devices? I have tested it and
it works fine--although another bug (#900877) makes the modesetting
driver not work with external displays.

-- System Information:
Debian Release: 9.4
  APT prefers stable-updates
  APT policy: (540, 'stable-updates'), (540, 'stable'), (520, 'testing'), (510, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 4.9.0-6-686-pae (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)


Reply to: