Detaching session sometimes kills the session

Bug #1734811 reported by Søren Holm on 2017-11-28
This bug affects 3 people
Affects Status Importance Assigned to Milestone
byobu (Ubuntu)

Bug Description

When pressing F6 to detach the session, very often the session is killed together with all the programes running there.

I have only seen this on virtualized systems. Both on Digital Ocean and Amazon EC2. It never happen on my "real hardware" server.

I suspect it has nothing to do with byobu itself but merely a setup issue.

Do you have *any* idea of things to try?

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: byobu 5.123-0ubuntu1
ProcVersionSignature: Ubuntu 4.13.0-17.20-generic 4.13.8
Uname: Linux 4.13.0-17-generic x86_64
ApportVersion: 2.20.7-0ubuntu3.5
Architecture: amd64
Date: Tue Nov 28 05:51:39 2017
Ec2AMI: ami-f95ef58a
Ec2AMIManifest: (unknown)
Ec2AvailabilityZone: eu-west-1c
Ec2InstanceType: t2.micro
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: byobu
UpgradeStatus: Upgraded to artful on 2017-11-01 (26 days ago)

Søren Holm (sgh) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in byobu (Ubuntu):
status: New → Confirmed
Søren Holm (sgh) wrote :

I can add that "screen" works. And it - AFAIK - both screen adn byobu uses tmux.

laborer (laborer) wrote :

This bug affects one of my "real" computers. The affected computer was upgraded from Lubuntu 17.04 to 17.10 not long ago. I tried to remove/reinstall byobu and its dependencies but it doesn't solve the problem. Interestingly, the bug also exists in a freshly installed Ubuntu 17.10 lxd instance on that computer.

However, another computer with Lubuntu 17.10 (clean install) is not affected, and the 17.10 lxd instance on the computer is fine as well.

So I guess the bug might have something to do with hardware information. I tried turning off all the status notifications, but the problem still persists.

This bug only happens on byobu-tmux sessions and doesn't affect byobu-screen.

Søren Holm (sgh) wrote :

I tried removing all informations as well. Is it possible to make byobu default to using screen? What is the pros/cons anyway?

laborer (laborer) wrote :

You can use `byobu-select-backend` to switch between screen or tmux. I don't think there are many fundamental differences if you don't use advanced features such as pane splits.

Søren Holm (sgh) wrote :

Good to know. Thank you.

laborer (laborer) wrote :

If I downgrade tmux from 2.5-3 to 2.3-4 (the version in Ubuntu 17.04), then byobu does not ever get killed after detaching.

It looks like the bug is in how tmux runs the status line script, /usr/bin/byobu-status. If byobu-status takes long time to finish, then even my "good" computer becomes affected by the bug. For example, with following line placed at the beginning of byobu-status
seq 10000000 | awk '{i=i+$0} END {print i}'
byobu is a lot more likely to be killed after detaching.

In tmux 2.5-3, the status line is reloaded every time a session is reattached as you can see the status line says "byobu-status not ready" at the beginning. But in tmux 2.3-4, the status line is NOT reloaded. This difference might be a useful clue to solve the problem.

laborer (laborer) wrote :

A workaround is to disable the byobu status line as follows
echo -e 'set -ug status-left\nset -ug status-right' >>$BYOBU_CONFIG_DIR/profile.tmux

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers