D26635: Fix hang due to calling exit() after fork()

Ambroz Bizjak noreply at phabricator.kde.org
Mon Jan 13 17:56:51 GMT 2020


abizjak created this revision.
abizjak added a reviewer: Frameworks.
abizjak requested review of this revision.

REVISION SUMMARY
  After fork(), exit() invokes atexit handlers, which can result in a lockup if an atexit handler uses thread synchronization facilities, since all but the current thread no longer exist. An example backtrace can be found in the linked bug report. Fix it by using _exit() instead of exit().
  
  BUG: 404652

TEST PLAN
  I don't know the exact environment required to trigger this bug, but one precondition is to trigger generation of thumbnails via this code; maybe browsing folders with PDF files will do that. Once you see thumbnail.so processes staying around, you must have hit this bug. This patch should prevent this issue from occurring, and it did on my system.

REPOSITORY
  R373 Image Thumbnailers

REVISION DETAIL
  https://phabricator.kde.org/D26635

AFFECTED FILES
  ps/gscreator.cpp

To: abizjak, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200113/e07c5ded/attachment.html>


More information about the Kde-frameworks-devel mailing list