Bug 2218031 - Double close in libdebuginfod
Summary: Double close in libdebuginfod
Keywords:
Status: VERIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: elfutils
Version: 9.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Mark Wielaard
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On:
Blocks: 2218034
TreeView+ depends on / blocked
 
Reported: 2023-06-27 22:07 UTC by Mark Wielaard
Modified: 2023-07-19 12:21 UTC (History)
3 users (show)

Fixed In Version: elfutils-0.189-3.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2218034 (view as bug list)
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-161013 0 None None None 2023-06-27 22:08:03 UTC
Sourceware 29696 0 P2 RESOLVED intermittent libmicrohttpd assertion failures related to socket fd closing 2023-06-27 22:07:27 UTC

Description Mark Wielaard 2023-06-27 22:07:28 UTC
In multithreaded programs there is a small race window where a file descriptor is closed twice. If in that small window in another thread a new file descriptor is created with the same fd handle/number it will get immediately closed causing wierd bugs.

The fix is simple, don't close the file descriptor twice.

See https://sourceware.org/cgit/elfutils/commit/?id=938a52c22ee915ff2cea813edd5da66bc8184885


Note You need to log in before you can comment on or make changes to this bug.