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

Fixed In Version: elfutils-0.189-3.el8
Doc Type: No Doc Update
Doc Text:
Clone Of: 2218031
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-161014 0 None None None 2023-06-27 22:16:05 UTC
Sourceware 29696 0 P2 RESOLVED intermittent libmicrohttpd assertion failures related to socket fd closing 2023-06-27 22:14:22 UTC

Description Mark Wielaard 2023-06-27 22:14:23 UTC
+++ This bug was initially created as a clone of Bug #2218031 +++

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.