Bug 45297 - Socket unit crashing with "File exists"
Summary: Socket unit crashing with "File exists"
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Lennart Poettering
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-27 01:55 UTC by freedesktop.org
Modified: 2012-03-13 19:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description freedesktop.org 2012-01-27 01:55:04 UTC
I have a socket-activated unit with Accept=true.
The unit failed with this error message:

Jan 26 06:21:35 b071 systemd[1]: netqmail-smtpd.socket failed to queue socket startup job: File exists
Jan 26 06:21:35 b071 systemd[1]: Unit netqmail-smtpd.socket entered failed state.

So far this has happened only once. Nobody was twiddling with unit files or anything else related to systemd at that time.

I suppose (wild guess) the EEXISTS comes from unit_add_name(), possibly due to a race condition where the remote side opens and closes the socket several times with the same remote port number.

This bug is related to #39016 insofar as my comment in https://bugzilla.novell.com/show_bug.cgi?id=741590 applies here, too:

> IMO it's a really bad idea to shut down the listening socket when an error
regarding the accept()ed socket occurs. systemd need to be much more robust
here.
Comment 1 Lennart Poettering 2012-03-13 19:10:22 UTC
Fixed in 77b088c211a0939cb94969b487e5746bb05d12ae (i.e. names are now guaranteed to be unique). And also 9586cdfab6a2638078702b7fea7e16b3a71899e2 to make failing setup for an incoming connection less problematic.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.