Bug 1652312 - When reboot or poweroff server, bash history some time is not saved
Summary: When reboot or poweroff server, bash history some time is not saved
Keywords:
Status: CLOSED DUPLICATE of bug 1394937
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 29
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-21 21:14 UTC by Dario Lesca
Modified: 2018-11-27 20:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-27 20:25:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Dario Lesca 2018-11-21 21:14:37 UTC
Description of problem:

When reboot or poweroff Fedora Server 29 (minimal install),
bash history some time is not saved.

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

[root@s-addc ~]# rpm -q systemd bash
systemd-239-6.git9f3aed1.fc29.x86_64
bash-4.4.23-5.fc29.x86_64

How reproducible:

Start server, connect to it via ssh, then Reboot or poweroff via line command 

At the next login, some time the last bash commands are not saved into .bash_history

Steps to Reproduce:
1. connect to server via ssh
2. type some cmd
3. do reboot or poweroff
4. access to bash and verify if last command is saved.

Actual results:
Sometime last command are not save if reboot or shutdown the server.

Expected results:
Always last command must save when reboot or shutdown the server.

Additional info:

If I do exit the history is always saved

It seems (IMHO) that the shutdown process, started from reboot or poweroff, send a SIGKILL, or destroyed in some other mode, all active process, including the section of ssh which supports bash (sshd: root@pts/0), without give to it the time to save the history.
  
If someone have some suggest to investigate this random issue, let me know.

Thanks

Dario

Comment 1 Matthew Miller 2018-11-27 20:25:15 UTC

*** This bug has been marked as a duplicate of bug 1394937 ***


Note You need to log in before you can comment on or make changes to this bug.