Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1069306

Summary: socket stays active even though its service cannot start (is masked)
Product: Red Hat Enterprise Linux 7 Reporter: Karel Volný <kvolny>
Component: systemdAssignee: systemd-maint
Status: CLOSED UPSTREAM QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: jsynacek, lnykryn, mschmidt, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1068542 Environment:
Last Closed: 2019-03-07 12:06:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1068542    
Bug Blocks: 1297395    

Description Karel Volný 2014-02-24 17:17:21 UTC
I was able to reproduce my problem also on RHEL7 with systemd-208-4.el7

following is the comment which explains the root cause:


+++ This bug was initially created as a clone of Bug #1068542 +++

--- Additional comment from Michal Schmidt on 2014-02-24 10:04:28 EST ---

systemd-journald is a bit special in the way its socket survives the switch-root from the initramfs. Nevertheless, here's a reproducer that involves neigher initramfs nor systemd-journald:

1. Make sure a socket and its service are both "active (running)":
     systemctl start avahi-daemon.{socket,service}
2. Mask only the service:
     systemctl mask avahi-daemon.service
3. Stop the service:
     systemctl stop avahi-daemon.service
4. Check the resulting statuses:
     systemctl status avahi-daemon.{socket,service}

Actual result: Though the service is now inactive, the socket unit is still "active (running)". This is an inconsistency.
Expected result: The socket should be at most "active (listening)", so it can go into "failed" by itself when a connection is attempted.

I think the socket failed to notice the death of the service because socket_trigger_notify() returns early if the service's load state is UNIT_MASKED (!= UNIT_LOADED).

Comment 2 RHEL Program Management 2014-03-22 05:57:39 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Jan Synacek 2019-03-07 12:06:21 UTC
As nobody seems to care enough (or at all, to be precise), let's close this here and leave the report upstream only.

Comment 6 Jan Synacek 2019-03-07 12:06:38 UTC
https://github.com/systemd/systemd/issues/4708