[Bug 83498] New: IGT's igt_reset_connectors is not signal safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 4 06:42:09 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=83498

          Priority: medium
            Bug ID: 83498
                CC: intel-gfx-bugs at lists.freedesktop.org
          Assignee: intel-gfx-bugs at lists.freedesktop.org
           Summary: IGT's igt_reset_connectors is not signal safe
        QA Contact: intel-gfx-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: przanoni at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: DRM/Intel
           Product: DRI

IGT's igt_reset_connectors() is called inside a signal handler, and eventually
it calls malloc() or free() (through its libdrm calls and through the other IGT
functions), and this can lead to nice deadlocks. For more details, just do a
web search for "malloc signal handlers".

When this bug happens, the IGT application just freezes. If you attach GDB to
the process and do a backtrace, you can clearly see it is stuck inside malloc()
(or maybe free()).

So the solution would be to avoid the malloc()/free() calls inside
igt_reset_connectors() and any other possible IGT function that gets called
while in a signal handler. 

One possible solution is to modify our code to do all its allocations _before_
the signal handler happens, and then just do the necessary during the handler,
and free the associated memory later.

References:

commit a16ebccaee426ef96b0894e3af733360d88ce4d7
    igt_core: zero exit_handler_count before forking

http://lists.freedesktop.org/archives/intel-gfx/2014-September/051762.html
https://bugs.freedesktop.org/show_bug.cgi?id=81367

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20140904/52fe657e/attachment.html>


More information about the intel-gfx-bugs mailing list