Bug 1446395 - Rawhide installer images fail to boot since tmux 2.4 landed
Summary: Rawhide installer images fail to boot since tmux 2.4 landed
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tmux
Version: rawhide
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Sven Lankes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-04-27 19:56 UTC by Adam Williamson
Modified: 2017-06-10 07:04 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-06-10 07:04:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2017-04-27 19:56:51 UTC
All Rawhide installer images have failed to boot since tmux 2.4 landed in Rawhide.

These errors can be seen in the journal:

Apr 27 19:41:02 localhost systemd[1]: Starting Anaconda...
Apr 27 19:41:02 localhost tmux[1498]: invalid option: set-remain-on-exit
Apr 27 19:41:02 localhost tmux[1498]: open terminal failed: not a terminal
Apr 27 19:41:02 localhost tmux[1498]: no current session
Apr 27 19:41:02 localhost tmux[1498]: no current session
Apr 27 19:41:02 localhost systemd[1]: anaconda.service: Control process exited, code=exited status=1
Apr 27 19:41:02 localhost systemd[1]: Failed to start Anaconda.

I did try removing the 'set-remain-on-exit' option from the config file and restarting the service; that makes the 'invalid option' line go away, but anaconda still fails to start, so I don't *think* that's the problem.

I built a custom image with tmux reverted to 2.3 (by doing a scratch build of 2.3 with an epoch bump), and that boots fine. So tmux 2.4 is definitely the problem here.

anaconda's tmux config file looks like this:

========

# tmux.conf for the anaconda environment

bind -n M-tab next
bind -n F1 list-keys

set-option -s exit-unattached off
set-option -g base-index 1
set-option -g set-remain-on-exit on
set-option -g history-limit 10000

new-session -s anaconda -n main "anaconda"

set-option status-right '#[fg=blue]#(echo -n "Switch tab: Alt+Tab | Help: F1 ")'

new-window -d -n shell          "bash --login"
new-window -d -n log            "tail -F /tmp/anaconda.log"
new-window -d -n storage-log    "tail -F /tmp/storage.log"
new-window -d -n program-log    "tail -F /tmp/program.log"

# The idea here is to detach the client started here via anaconda.service, and
# then re-attach to it in the tmux service run on the console tty. However,
# the detach-client directive is now giving us "no current client" for some
# reason.
# detach-client -s anaconda

========

And anaconda.service does this:

Environment=HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp GIO_USE_VFS=local
WorkingDirectory=/root
ExecStart=/usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start

If I recreate this manually, though - by running:

HOME=/root MALLOC_CHECK_=2 MALLOC_PERTURB_=204 PATH=/usr/bin:/bin:/sbin:/usr/sbin:/mnt/sysimage/bin:/mnt/sysimage/usr/bin:/mnt/sysimage/usr/sbin:/mnt/sysimage/sbin LANG=en_US.UTF-8 GDK_BACKEND=x11 XDG_RUNTIME_DIR=/tmp GIO_USE_VFS=local /usr/bin/tmux -u -f /usr/share/anaconda/tmux.conf start

from /root, tmux starts fine. Not sure what that implies; some complication based on how systemd runs it?

This is an automatic F27 Alpha blocker per "Complete failure of any release-blocking TC/RC image to boot at all under any circumstance - "DOA" image (conditional failure is not an automatic blocker)"

Comment 1 Filipe Rosset 2017-04-27 21:11:07 UTC
Hi guys, I'm not familiarized with anaconda vs. tmux settings, can you please take a look if this is broken due some changes on 2.4 release? 

https://raw.githubusercontent.com/tmux/tmux/master/CHANGES

Comment 2 Adam Williamson 2017-04-27 21:53:16 UTC
Well it obviously *is* caused by some change in the 2.4 release, that's the whole point of the bug report. :) But none of the changes described in that log look to be related, to me. I usually find it more useful to read the raw commit log.

Comment 3 Sven Lankes 2017-04-28 09:03:46 UTC
According to the CHANGES-File the option set-remain-on-exit no longer exists in 2.4:

> * set-remain-on-exit has gone -- can be achieved with hooks instead.

Comment 4 Sven Lankes 2017-04-28 09:06:24 UTC
https://github.com/tmux/tmux/issues/787

According to his:

set-hook -g session-created 'set remain-on-exit on'

should fix it. I haven't tested it.

Comment 5 Martin Kolman 2017-04-28 09:38:58 UTC
Anaconda anaconda-27.5-1, which was released yesterday, should have a fix[0] for this.

[0] https://github.com/rhinstaller/anaconda/pull/1042

Comment 6 Fedora Update System 2017-04-28 13:28:32 UTC
anaconda-26.21.4-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f620d8c7c2

Comment 7 Adam Williamson 2017-04-28 16:48:02 UTC
Sven: you did read the part of the report where I saw that message, tried taking the option out of the config file, and it still didn't start up, right?

"I did try removing the 'set-remain-on-exit' option from the config file and restarting the service; that makes the 'invalid option' line go away, but anaconda still fails to start, so I don't *think* that's the problem."

Martin: thanks for the changes. Did you check they're safe on tmux 2.3 as well, though? tmux 2.4 was not built for F26, F26 is still on 2.3.

Comment 8 Adam Williamson 2017-04-28 20:42:23 UTC
So this doesn't work properly, for two reasons.

One, bc isn't in the installer environment.

Two, it's not *right*. bc does a floating point number comparison, not a version comparison (given the conventions of how software is normally versioned). For instance, that means it thinks 1.9 > 1.10 (because as a number, it *is*).

This:

https://stackoverflow.com/questions/4023830/how-compare-two-strings-in-dot-separated-version-format-in-bash

suggests using sort -V to do a version sort, which seems like a reasonable solution.

I'll send a modified PR and test it.

Comment 9 Adam Williamson 2017-04-28 22:37:02 UTC
I believe https://github.com/rhinstaller/anaconda/pull/1048 should fix this properly.

I'm also editing the F26 update and removing the link to this bug; it doesn't make sense because this bug didn't really affect F26, tmux 2.4 wasn't sent to F26. So there's reason to make the push of that update close this bug. If the original fix had worked, we could close the bug already; since it didn't, we can close it whenever a working fix is pushed to Rawhide and lands in a compose.

Comment 10 Filipe Rosset 2017-06-10 02:06:59 UTC
can we close this one?

also tmux-2.5 will land on rawhide shortly:

https://koji.fedoraproject.org/koji/taskinfo?taskID=19942642

Comment 11 Adam Williamson 2017-06-10 07:04:07 UTC
Sure, it was merged a while back and seems to be working fine.


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