<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - intel driver hangs in waitpid() for backlight helper process on output hotplug"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=90230">90230</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>intel driver hangs in waitpid() for backlight helper process on output hotplug
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/intel
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>chris@chris-wilson.co.uk
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fourdan@xfce.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-gfx-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Using Fedora 22, when undocking/docking my laptop with an external monitor
attached to the docking station, Xorg will hang on waitpid() for the backlight
helper process.

Backtrace shows that the PID is -1:

#0  0x00007feccda90f3b in __GI___waitpid (pid=-1, stat_loc=stat_loc@entry=0x0,
options=options@entry=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x00007fecc8601e58 in backlight_close (b=b@entry=0x97c8c8) at
backlight.c:522
#2  0x00007fecc864b85a in sna_output_destroy (output=output@entry=0x97c960) at
sna_display.c:3202
#3  0x00007fecc864f1e4 in sna_output_add (sna=sna@entry=0x7feccfeed000,
id=<optimized out>, serial=serial@entry=5) at sna_display.c:3944
#4  0x00007fecc8651f21 in sna_mode_discover (sna=sna@entry=0x7feccfeed000) at
sna_display.c:4211
#5  0x00007fecc8658198 in sna_handle_uevents (fd=<optimized out>,
closure=0x7feccfeed000) at sna_driver.c:771
#6  0x00000000004799e7 in xf86Wakeup (blockData=<optimized out>, err=<optimized
out>, pReadmask=0x836360 <LastSelectMask>) at xf86Events.c:284
#7  0x000000000043ee0d in WakeupHandler (result=result@entry=2,
pReadmask=pReadmask@entry=0x836360 <LastSelectMask>) at dixutils.c:423
#8  0x0000000000592dc7 in WaitForSomething
(pClientsReady=pClientsReady@entry=0x14189c0) at WaitFor.c:229
#9  0x0000000000439fd1 in Dispatch () at dispatch.c:361
#10 0x000000000043e2fb in dix_main (argc=15, argv=0x7ffd512ec9a8,
envp=<optimized out>) at main.c:298
#11 0x00007feccd9e9790 in __libc_start_main (main=0x4286f0 <main>, argc=15,
argv=0x7ffd512ec9a8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, 
    stack_end=0x7ffd512ec998) at libc-start.c:289
#12 0x0000000000428729 in _start ()

It could be a Fedora 22 issue with SElinux (I dont know) but I think it would
be safer to check for (b->pid > 0) instead of just ->pid) in backlight_close so
that if the PID is not initialized somehow (default value is -1), it won hang.

Will send a patch to the ML in a minute for further review/discussion...</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>