Issue 9112 - Fixup socket error handling
Summary: Fixup socket error handling
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: build (show other issues)
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: 2.5.0
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-28 23:00 UTC by Howard Chu
Modified: 2020-10-14 21:19 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Howard Chu 2019-10-28 23:00:50 UTC
Full_Name: Howard Chu
Version: 2.4
OS: Linux
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (84.203.24.208)
Submitted by: hyc


During connection setup, there are a couple of places where we perform
operations on a socket and log an error if it fails, but otherwise keep going.
It turns out, if the error is EBADF, eventually this gets back to the event
loop, which always does a clean shutdown on any socket error. We should instead
stop init'ing the socket, and not hand it over to the event loop.

This situation only arose because of a long-standing bug in 3rd party code that
was double-closing an fd. https://github.com/heimdal/heimdal/issues/431 . In
normal situations, none of this can ever occur.

Regardless, tracking this here and committing the debug code we used to track it
down, in case we ever need it again in the future.
Comment 1 OpenLDAP project 2019-10-28 23:18:10 UTC
in master
Comment 2 Howard Chu 2019-10-28 23:18:10 UTC
changed notes
changed state Open to Test
moved from Incoming to Build