View Issue Details

IDProjectCategoryView StatusLast Update
0016440CentOS-7systemdpublic2019-09-23 07:49
Status closedResolutionduplicate 
Product Version7.7-1908 
Target VersionFixed in Version 
Summary0016440: Systemd: CentOS 7.7 will kill all sessions when switching runlevel with "systemctl isolate <target>"
DescriptionJust updated to CentOS 7.7 (3.10.0-1062.1.1.el7.x86_64). But this version has a strange behavior: when switching runlevel with "systemctl isolate <target>", all logging sessions will be killed.

The behavior will make some services unexpected stopped, for example:
  - When user manual start or restart vnc server service. After switching, vnc server will be killed. Enable (auto start) and DO NOT manual stop/restart would not affected.
  - When enable (auto start), or manual start/restart virtualbox autostart vm service. After switching, all vm would be stopped unexpected.
Steps To ReproduceI made a minimum service to reproduce this behavior.

Minimum service script



function do_clil()
    date >> /media/ramdisk/aaauser.txt
    sleep 3

while :

(replace <USER> with proper username, not root)
(Also See Red Hat Bugzilla – Bug 1747191 - tigervnc service via unit file fails with PID file error:

Description=testecho daemon %i

ExecStart=/bin/bash -c "/opt/testecho/"


  - CentOS 7.7 (3.10.0-1062.1.1.el7.x86_64)
  - default runlevel 3
  - SSH Server enabled
  - minimum service installed but not enabled

Procedure (Steps To Reproduce)
1. Host A boot. Login or not login.
2. Use Computer B, login Host A via ssh, with <USER>@HOST_A
3. Run "sudo su" to grant root permission
4. Run "systemctl start testecho@10"
5. Run "systemctl status testecho@10"
6. Run "systemctl status"
7. Wait 30 seconds
8. Run "systemctl isolate multi-user"
9. Run "systemctl status testecho@10" again
10. Run "systemctl status" again

Expected result
testecho@10 continuous running.
/media/ramdisk/aaauser.txt continuous being appended current time text.

Actual result

1. At "Procedure" step 5, testecho@10 service is OK.

testecho@10.service - testecho daemon 10
   Loaded: loaded (/etc/systemd/system/testecho@.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-09-23 11:45:26 CST; 22s ago
 Main PID: 14038 (
   CGroup: /system.slice/system-testecho.slice/testecho@10.service
           ├─14038 /bin/bash /opt/testecho/
           └─14117 sleep 3

Sep 23 11:45:26 HOST_A systemd[1]: Started testecho daemon 10.

2. But at "Procedure" step 8, after run command, Computer B receive ternimal signal:

Connection to HOST_A closed by remote host.
Connection to HOST_A closed.

3. After relogin Host A via ssh with <USER>@HOST_A and continue "Procedure" step 9, testecho@10 show service terminated.

testecho@10.service - testecho daemon 10
   Loaded: loaded (/etc/systemd/system/testecho@.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since Mon 2019-09-23 11:46:07 CST; 38s ago
  Process: 14038 ExecStart=/bin/bash -c /opt/testecho/ (code=killed, signal=TERM)
 Main PID: 14038 (code=killed, signal=TERM)

Sep 23 11:45:26 HOST_A systemd[1]: Started testecho daemon 10.
Sep 23 11:46:07 HOST_A systemd[1]: Stopping testecho daemon 10...
Sep 23 11:46:07 HOST_A systemd[1]: Stopped testecho daemon 10.

4. /media/ramdisk/aaauser.txt text stopped at terminate time or before.
Additional InformationMy default runlevel is 5 (graphical).
But In "Enviromnent" and "Steps To Reproduce", I changed runlevel from 3 to 3. It was just to reproduce problem minimums, and to exclude graphical involved.
Tags3.10.0-1062.1.1.el7.x86_64, 7.7


duplicate of 0016438 acknowledgedtru "systemd isolate" kills sshd/screen/tmux/... 




2019-09-23 07:49

administrator   ~0035199

thanks for the detailed report, we are working on a "fasttrack" workaround.

Issue History

Date Modified Username Field Change
2019-09-23 05:07 horseluke New Issue
2019-09-23 05:07 horseluke Tag Attached: 3.10.0-1062.1.1.el7.x86_64
2019-09-23 05:09 horseluke Tag Attached: 7.7
2019-09-23 07:48 tru Relationship added duplicate of 0016438
2019-09-23 07:49 tru Status new => closed
2019-09-23 07:49 tru Resolution open => duplicate
2019-09-23 07:49 tru Note Added: 0035199