Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 166355 - app-misc/screen current stable ebuild (4.0.3) hangs pressing ^S
Summary: app-misc/screen current stable ebuild (4.0.3) hangs pressing ^S
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-11 14:58 UTC by Miguel Vicente
Modified: 2007-02-20 11:21 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Vicente 2007-02-11 14:58:52 UTC
When running GNU screen 4.0.3, the application freezes randomly. Also when pressing ^S (Control-S).

Reproducible: Sometimes

Steps to Reproduce:
1.Execute screen.
2.Start a few screens.
3.Press ^S, or work a few minutes with screen.

Actual Results:  
"screen" freezes and I have to kill by hand "screen" or "Eterm".

Expected Results:  
Send STOP signal to the shell and still working.

I was running it over Eterm, and with TCSH and BASH as shells.
Comment 1 Sven Wegener gentoo-dev 2007-02-11 15:37:23 UTC
Miguel, please provide the output of emerge --info so that we know you current setup.

I'm continuously running more than 150 ssh sessions inside of multiple screens and never experience any issues.
Comment 2 Dustin Polke 2007-02-11 16:31:43 UTC
I can confirm that pressing <Control-S> multiple times results in a frozen screen session that cannot be killed any more. I am using screen-4.0.3 as well. I have not had any other problems until now with this version.


Portage 2.1.2-r9 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r6.agp3 i686)
=================================================================
System uname: 2.6.18-gentoo-r6.agp3 i686 mobile AMD Athlon(tm) XP 1500+
Gentoo Base System version 1.12.6
Timestamp of tree: Sun, 11 Feb 2007 15:50:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache collision-protect distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict test userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/ ftp://linux.rz.ruhr-uni-bochum.de/gentoo-mirror/ ftp://gd.tuwien.ac.at/opsys/linux/gentoo/ ftp://gentoo.inode.at/source/"
LANG="en_US.UTF-8"
LINGUAS="en de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=500"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/modified /usr/local/portage/own /usr/local/portage/layman/webapps-experimental /usr/local/portage/layman/science"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac aalib acpi alsa amr amrr apache2 apm asf async atlas audacious audiofile bash-completion berkdb bindist bitmap-fonts bl bonobo bzip2 cap cardbus cjk cli cracklib crypt ctype cups dba dga dlloader dri dvd dvdread eds encode evo exif expat extensions fam fbcon ffmpeg flac foomaticdb force-cgi-redirect fortran ftp gd gdbm gif gimpprint glibc-omitfp glut gs gstreamer gtk gtk2 gtkhtml guile hal icq idn imagemagick imap imlib iproute2 java javascript jikes jpeg jpeg2k kerberos lcms ldap libcaca libg++ libwww live lm_sensors logrotate lzo mad madwifi memlimit mikmod mime mjpeg mmx mmxext mng motif moznocompose moznoirc moznomail moznoroaming mp3 mp4 mpeg musepack mysql ncurses nls nntp nptl nptlonly nsplugin ogg opengl pam pam_timestamp pcmcia pcre pda pdf perl php plotutils png pnp posix postgres print python qt4 quicktime readline real ruby samba sasl sdl seamonkey server session simplexml slang smbkrb5passwd sndfile soap sockets sox speex spell spl sse sse-filters ssl svga swat symlink syslog tcltk tcpd test tetex theora tiff truetype truetype-fonts type1-fonts udev unicode usb userlocales vcd vim-with-x vorbis wifi win32codecs winbind wma wmf x264 x86 xanim xine xinetd xml xorg xosd xpm xsl xv xvid zlib" ALSA_CARDS="via82xx via82xx-modem mpu401" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de" USERLAND="GNU" VIDEO_CARDS="savage"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS
Comment 3 Miguel Vicente 2007-02-13 10:18:01 UTC
Portage 2.1.2-r9 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo-r4 i686)
=================================================================
System uname: 2.6.18-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.66GHz
Gentoo Base System version 1.12.6
Timestamp of tree: Mon, 12 Feb 2007 15:20:01 +0000
dev-java/java-config: 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.modulix.net/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://gentoo.mirror.solnet.ch "
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X alsa berkdb bitmap-fonts cli cracklib crypt cups dlloader doc dri dvd emacs expat firefox gdbm gpm iconv isdnlog jpeg kde libg++ midi mp3 mpeg mplayer msn ncurses nls nptl nptlonly opengl pam pcre perl png ppds pppd python qt3 qt4 readline reflection sdl session spl ssl tcl tcltk tcpd truetype-fonts type1-fonts udev unicode usb x86 xine xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark ati chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mga neomagic nsc nv rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 4 Kevin Pyle 2007-02-19 18:22:20 UTC
Traditionally, ^S is the stop-output flow control character.  You can check if this is the case for your terminal by running:

~> stty -a | grep stop
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt

That first line is the important one.  When you press ^S, the terminal application in which you started screen is interpreting that as a command to stop output.  When that happens, you cannot see any further output from screen until you tell the terminal to resume output.  Historically, ^Q is the start-output flow control character.  When screen hangs, try pressing ^Q to unblock output.


If you really are seeing random hangs that are not caused by pressing ^S and are not cured by hitting your start-output character, try re-emerging screen with "USE=debug FEATURES=nostrip emerge =app-misc/screen-4.0.3".  Once you have done this, you may be able to get a meaningful backtrace of the process when it hangs.  Either attach gdb to it[1], or force it to dump core and then examine the core file[2].  Where possible, I prefer examining live processes.

[1]Attaching gdb:
1. emerge sys-devel/gdb (if you have not already)
2. In a non-hung terminal, run: "gdb /usr/bin/screen -p PID", where PID is the pid of the hung screen.  You may be able to find this using pgrep, or just use ps.  Both pgrep and ps are part of sys-process/procps.
2a. Note that screen is installed setgid, so only root will be able to attach to it (even though you are running screen as you).

[2]Forcing a core dump:
1. Ensure that your core file limit is not zero.  I often run with unlimited core size when diagnosing problems.  Consult your shell manual for how to change your core file limit.
2. Get screen to hang.
3. kill -ABRT $(pgrep screen)

Once gdb is ready, either attached to the process or reading the core dump, run "bt" to generate a backtrace showing where it was stopped.  Post that output here.  Note that core files are very large and rarely, if ever, useful on systems other than the one where they were generated.  Therefore, it's NOT worth attaching your core file to this bug.  Note also that you may not get a good backtrace if screen is stuck down in libc and your libc is installed without debugging symbols.