Just upgraded my main command-line system to Fedora 22. I hadn’t gotten around to moving that particular system from Fedora 20 to 21 (unlike my Fedora desktop systems), and I was nonplussed when my .bash_history .bash_profile was zeroed out. It appears that this data integrity issue has been known since it was added to Fedora 21 and not considered important. And it turns out it is a symptom of a larger data integrity issue; it’s not limited to .bash_history.

I’m glad I keep backups, but still… I remember the days at Red Hat when a data integrity issue was enough to stop ship and pull all-nighters to fix it. Fast reboot is nice, but it shouldn’t be an excuse for blowing away user data. Priorities seem out of skew.

https://bugzilla.redhat.com/show_bug.cgi?id=1141137 and

https://bugzilla.redhat.com/show_bug.cgi?id=1170765

Bug 1141137 – systemd sends SIGKILL imediately after SIGTERM during shutdown


Edward Morbius June 20, 2015 22:35

That … is inexcusable.

Edit: “inexcusable” related to loss of .bash_profile, which was an editing error on +Michael K Johnson’s part, see his followup below and edits above.

And we’re talking a user account .bash_profile here, not even an /etc/conffile (still inexcusable, but, well, this is Red Hat and they fuck that shit up regularly).

Michael K Johnson June 20, 2015 22:41

It’s not my experience that data integrity issues have been common in Red Hat products. That’s what makes this one so odd IMHO.

Edward Morbius June 20, 2015 23:04

+Michael K Johnson Conffile issues have been. Debian policy specifically addresses those. Release-critical bugs.

Pádraig Brady June 20, 2015 23:37

I can see bash_history being incomplete due to this issue, but ~/.bash_profile ? Bash only reads that I think, which strace also suggests.

Cristian Gafton June 21, 2015 01:45

+Michael K Johnson that is quite disturbing. I still remember pulling a gruelling allnighter to fix fd leaks in a daemon which was not even turned on by default (and rebuild, recheck and promise people a beer and pizza breakfast when all was done). Priorities have surely started to rot it seems. (sad thing that two former FPLs get to reminisce about the “old times” on such a crappy occasion/topic)

Eugene Crosser June 21, 2015 05:01

Was it really .bash_profile? Where you modifying it before the reboot? Then it could be due to some other problem than premature kill. (There are a few, potentially, depending on the filesystem in use.)

Or was it .bash_history? There are, again, there are cases when history stops to be saved. I think one possibility is when the file changes ownership to root at some time when you are using sudo.

Michael K Johnson June 21, 2015 06:23

+Pádraig Brady +Eugene Crosser I typed .bash_history once and .bash_profile once by accident… I’m entirely confident that it s because I almost never have to type “.bash_history” and sometimes have to type “.bash_profile”. Just .bash_history, not .bash_profile.

And no, nothing like ownership problems. Just an active login session at the time I shut down. I upgraded F20 → F21 → F22, and I had an active user login session in fully-updated F21 (which still has this bug) at the time I ran shutdown in a root session. No sudo in use at all.

Edward Morbius June 21, 2015 07:22

+Michael K Johnson  That’s a huge difference there.

History … might annoy me, but losing it’s tolerable. Profile, not so much.

Michael K Johnson June 21, 2015 08:08

Sorry for the typo. I use command line history extensively, and blowing away the history is deleting data on which I depend for normal operations and have for a few decades now. My .bash_profile doesn’t change much, so it is unlikely to have changed since my last backup. My .bash_history, obviously, changes all the time; I can fetch a version from backup but some intermediate commands may be irretrievably lost.

Edward Morbius June 21, 2015 09:09

+Michael K Johnson I hear you. Though in theory … I knew those commands … once.

Far too many of my bash sequences start with <ctrl>-R ….

Pádraig Brady June 21, 2015 14:12

BTW I rarely use <ctrl>-R to search history. Instead I type the start of the command and hit up/down. See http://www.pixelbeat.org/settings/.inputrc

Edward Morbius June 21, 2015 23:49

+Pádraig Brady <ctrl>-R (reverse recursive search) largely accomplishes the same thing.


Imported from Google+ — content and formatting may not be reliable