Bug 1268654

Summary: [RHEL7] systemd: all processes in scopes (including user sessions) SIGKILLed immediately on shutdown with no opportunity to shut down cleanly
Product: Red Hat Enterprise Linux 7 Reporter: Jiří Dostál <jdostal>
Component: systemdAssignee: systemd-maint
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.2CC: ali+rhbugzilla, biaji.cn, bojan, bugzilla.redhat.com, chris+rhbugzilla, djuran, dustymabe, extras-qa, fedora, jdostal, johannbg, jswensso, jsynacek, l4coa3fnjplr, lnykryn, ltoscano, luvilla, marc.dejardin, marcosfrm, mattdm, mbroz, mcatanzaro+wrong-account-do-not-cc, mcdanlj, msekleta, myroslav, olliniem, peter.senna, rbarlow, redhat-bugzilla, rharwood, rjones, robatino, sauchter, sforsyt, sgallagh, sgraf, s, stefw, stepglenn, steveboss111, systemd-maint, vpavlin, zbyszek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1170765 Environment:
Last Closed: 2015-12-07 12:05:38 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: 1170765    
Bug Blocks: 1139380    

Description Jiří Dostál 2015-10-04 12:03:16 UTC
Cloning for RHEL7 bug fix request

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

Description of problem:

I have been noticing during F21 cloud and atomic testing that I sometimes lose my bash history. This seems to be triggered by reboots as can be shown below:

[root@f21 ~]# cat .bash_history | wc -l
2
[root@f21 ~]# history | wc -l
123
[root@f21 ~]# reboot
Connection to 172.24.4.228 closed by remote host.
Connection to 172.24.4.228 closed.
[root@localhost ~(keystone_admin)]# 
[root@localhost ~(keystone_admin)]# ssh -i key1.pem
fedora.4.228
Last login: Thu Nov 20 18:54:48 2014 from 172.24.4.225
[fedora@f21 ~]$ 
[fedora@f21 ~]$ sudo su -
[root@f21 ~]# history | wc -l
3


Version-Release number of selected component (if applicable):

This is from the F21 Cloud RC5 image:

[fedora@f21 ~]$ rpm -q systemd
systemd-216-12.fc21.x86_64

How reproducible:

Seems to be pretty consistent to me. 

Steps to Reproduce:

See description.

Actual results:

My bash history is not saved. 

Expected results:

My bash history is saved.


Additional info:

I think this is an issue with systemd but it could be some other component. Feel free to re-assign where appropriate.

+++++++++++++++++

Hello,

I've created this BZ in order to request a fix for the bug described above. I'm facing the same issue on RHEL7. 

More detailed - There is a feature in Satellite 5 that allows you to execute shell command on remote machine via WebUI. Then you can check status of the command - Pending/Picked Up/Failed/Complete ... When you execute "shutdown -h now" via remote command, the machine shuts down immediately and does not have a chance to report back to server. This results in bad command status and might even cause shutdown loop. Original Satellite 5 BZ https://bugzilla.redhat.com/show_bug.cgi?id=1260527)

Using systemd-219-17.el7

Comment 2 Lukáš Nykrýn 2015-10-05 10:35:30 UTC
That can't be the same issue. We have reverted the patched which caused this in rhel. Can you reproduce it and provide shutdown log? https://wiki.freedesktop.org/www/Software/systemd/Debugging/