Package: screen Version: 4.5.0-6 Severity: important
Steps to Reproduce on Debian Stretch OS
---------------------------------------
1) invoke: screen
2) start a program e.g. top (or none)
3) detach from screen session by pressing keys CRTL+A+D
4) process listing looks as usual, SCREEN process has no TTY, all the forks
have one:
$ ps axfwu
root 1581 0.0 0.0 28176 1628 ? Ss 10:12 0:00 SCREEN
root 1582 0.0 0.0 20068 2408 pts/1 Ss 10:12 0:00 \_
/bin/bash
root 1585 0.0 0.0 42744 2052 pts/1 S+ 10:12 0:00 \_ top
5) log out from system, in my case close SSH-session on remote system
6) log in again, screen session does not exist anymore, no more such processes
Screen Session on Debian Buster OS
----------------------------------
If you start a screen session, detach and log out and in, screen session
persists and is reattachable - works as expected.
Attempt to Workaround
---------------------
Since there is no newer or older (regression) release for screen package
available from repository, I compiled the screen binary on my own with the
original source. It compiled successfully for all screen code releases I tried:
- 4.8.0
- 4.6.2
- 4.2.1
But I have the same issue with all self-compiled screen binaries, the detached
screen session was killed after system logout.
Installation of the tmux Package
--------------------------------
I installed the tmux package, started a tmux session, detached from it and
logged out from system. After login, there was no more tmux session I can
reattach, no more such processes. So Same behaviour.
Common Shared Library Bindings of screen and tmux
-------------------------------------------------
libtinfo.so.5 is the common shared object file which screen and tmux are linked
against it:
ldd /usr/bin/screen
linux-vdso.so.1 (0x00007fffa24ae000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007fe796fe4000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1
(0x00007fe796dac000)
libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007fe796b9e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe7967ff000)
libaudit.so.1 => /lib/x86_64-linux-gnu/libaudit.so.1
(0x00007fe7965d7000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe7963d3000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe79748d000)
libcap-ng.so.0 => /lib/x86_64-linux-gnu/libcap-ng.so.0
(0x00007fe7961cd000)
ldd /usr/bin/tmux
linux-vdso.so.1 (0x00007ffe083ec000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f54bbecb000)
libutempter.so.0 => /usr/lib/x86_64-linux-gnu/libutempter.so.0
(0x00007f54bbcc8000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5
(0x00007f54bba9e000)
libevent-2.0.so.5 => /usr/lib/x86_64-linux-gnu/libevent-2.0.so.5
(0x00007f54bb856000)
libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2
(0x00007f54bb63f000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f54bb2a0000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007f54bb083000)
/lib64/ld-linux-x86-64.so.2 (0x00007f54bc355000)
libtinfo5 is a low level terminal library, maintained by Debian, derived from
libncurses:
dkpkg --status libtinfo5
-bash: dkpkg: command not found
root@shl-ehb-tool:~/dev# dpkg --status libtinfo5
Package: libtinfo5
Status: install ok installed
Priority: required
Section: libs
Installed-Size: 478
Maintainer: Craig Small <[email protected]>
Architecture: amd64
Multi-Arch: same
Source: ncurses
Version: 6.0+20161126-1+deb9u2
Replaces: libncurses5 (<< 5.9-3)
Depends: libc6 (>= 2.16)
Breaks: dialog (<< 1.2-20130523)
Description: shared low-level terminfo library for terminal handling
The ncurses library routines are a terminal-independent method of
updating character screens with reasonable optimization.
.
This package contains the shared low-level terminfo library.
Homepage: http://invisible-island.net/ncurses/
I suppose the bug is in libtinfo5 shared library.
Attempt to Backport libtinfo5 Library from Debian Buster OS
===========================================================
Downloaded source tar's from https://packages.debian.org/buster/libtinfo5:
[ncurses_6.1+20181013-2+deb10u2.dsc]
[ncurses_6.1+20181013.orig.tar.gz]
[ncurses_6.1+20181013.orig.tar.gz.asc]
[ncurses_6.1+20181013-2+deb10u2.debian.tar.xz]
Attempt to build it first for Buster
------------------------------------
First try to build it under Debian Buster with pdebuild but I failed, autoconf
did not create the configure script, it's missing when it was tried to invoke:
debian/rules build
dh_update_autotools_config
dh_autoreconf autoreconf-dickey -- -f -i
touch config.guess-stamp
test -d /build/ncurses-6.1+20181013/obj || mkdir /build/ncurses-6.1+20181013/obj
cd /build/ncurses-6.1+20181013/obj && ../configure \
--prefix=/usr --build=x86_64-linux-gnu --with-shared
--mandir=/usr/share/man --with-manpage-format=normal --without-profile
--without-debug --disable-rpath --enable-echo --disable-stripping
--enable-const --enable-pc-files
--with-pkg-config-libdir=/usr/lib/x86_64-linux-gnu/pkgconfig
--libdir=/usr/lib/x86_64-linux-gnu
--with-install-prefix=/build/ncurses-6.1+20181013/debian/tmp --without-ada
--without-tests --without-progs --with-gpm --enable-symlinks --disable-termcap
--with-default-terminfo-dir=/etc/terminfo
--with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
--with-ticlib=tic --with-termlib=tinfo --with-versioned-syms
--disable-wattr-macros --disable-relink --enable-overwrite --with-xterm-kbs=del
/bin/sh: 1: ../configure: not found
debian/rules:212: recipe for target
'/build/ncurses-6.1+20181013/obj/config.status' failed
make: *** [/build/ncurses-6.1+20181013/obj/config.status] Error 127
make: *** Waiting for unfinished jobs....
test -d /build/ncurses-6.1+20181013/obj-wide || mkdir
/build/ncurses-6.1+20181013/obj-wide
cd /build/ncurses-6.1+20181013/obj-wide && ../configure \
--prefix=/usr --build=x86_64-linux-gnu --with-shared
--mandir=/usr/share/man --with-manpage-format=normal --without-profile
--without-debug --disable-rpath --enable-echo --disable-stripping
--enable-const --enable-pc-files
--with-pkg-config-libdir=/usr/lib/x86_64-linux-gnu/pkgconfig
--libdir=/usr/lib/x86_64-linux-gnu
--with-install-prefix=/build/ncurses-6.1+20181013/debian/tmp --without-ada
--without-tests --without-progs --with-gpm --enable-symlinks --disable-termcap
--with-default-terminfo-dir=/etc/terminfo
--with-terminfo-dirs="/etc/terminfo:/lib/terminfo:/usr/share/terminfo"
--with-ticlib=tic --with-termlib=tinfo --with-versioned-syms
--disable-wattr-macros --disable-relink --enable-overwrite --with-xterm-kbs=del
\
--with-progs \
--enable-widec
/bin/sh: 1: ../configure: not found
debian/rules:258: recipe for target
'/build/ncurses-6.1+20181013/obj-wide/config.status' failed
make: *** [/build/ncurses-6.1+20181013/obj-wide/config.status] Error 127
dpkg-buildpackage: error: debian/rules build gave error exit status 2
E: Failed autobuilding of package
I: user script /var/cache/pbuilder/build/33027/tmp/hooks/C10shell starting
[...]
Attempt to build it first for Stretch
-------------------------------------
I prepared first some build directives:
- debhelper compat level 11 -> 10
- deleted debian/source/format (cause of build errors)
- debian/source/control, changed Build-Depends:
- debhelper (>= 11~) -> debhelper (>= 10~)
- autoconf-dickey (>= 2.52+20170501) -> autoconf-dickey (>= 2.52+20150926-2)
With this changes, build starts and progresses up to the same point as for
Buster, autoconf did not create the configure script.
Regards
Jürgen
0xA811F9F222306A1E.asc
Description: application/pgp-keys

