Debian Bug report logs - #157873
Ctrl-S + copy mode hangs screen (partially solved)

version graph

Package: screen; Maintainer for screen is Axel Beckert <abe@debian.org>; Source for screen is src:screen (PTS, buildd, popcon).

Reported by: "John R. Daily" <jdaily@progeny.com>

Date: Thu, 22 Aug 2002 19:03:02 UTC

Severity: minor

Tags: confirmed, patch

Found in versions 3.9.11-5, 4.0.2-3, 4.0.2-4.1

Fixed in version 4.1.0~20110819git450e8f3-1

Done: Axel Beckert <abe@debian.org>

Bug is archived. No further changes may be made.

Forwarded to https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11610

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Adam Lazur <zal@debian.org>, screen@packages.qa.debian.org:
Bug#157873; Package screen. (full text, mbox, link).


Acknowledgement sent to "John R. Daily" <jdaily@progeny.com>:
New Bug report received and forwarded. Copy sent to Adam Lazur <zal@debian.org>, screen@packages.qa.debian.org. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "John R. Daily" <jdaily@progeny.com>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: screen: Reproducible key sequence causes hard lock
Date: Thu, 22 Aug 2002 13:58:12 -0500
Package: screen
Version: 3.9.11-5
Severity: important

The following key sequence will cause screen to lock; sometimes
the session can be rescued by killing off all connections
and reconnecting.

^S to lock the terminal, followed by ^A-ESC to enter scrollback mode.

-- System Information:
Debian Release: 3.0
Architecture: i386
Kernel: Linux albus.progeny.com 2.4.18-686 #1 Sun Apr 14 11:32:47 EST 2002 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages screen depends on:
ii  base-passwd              3.4.1           Debian Base System Password/Group 
ii  debconf                  1.1.15          Debian configuration management sy
ii  libc6                    2.2.5-7         GNU C Library: Shared libraries an
ii  libncurses5              5.2.20020112a-8 Shared libraries for terminal hand
ii  libpam0g                 0.72-35         Pluggable Authentication Modules l

-- debconf information:
  screen/old_upgrade_prompt: false




Information forwarded to debian-bugs-dist@lists.debian.org, screen@packages.qa.debian.org:
Bug#157873; Package screen. (full text, mbox, link).


Acknowledgement sent to Adam Lazur <zal@debian.org>:
Extra info received and forwarded to list. Copy sent to screen@packages.qa.debian.org. (full text, mbox, link).


Message #10 received at 157873@bugs.debian.org (full text, mbox, reply):

From: Adam Lazur <zal@debian.org>
To: 157873@bugs.debian.org, 157873-submitter@bugs.debian.org
Subject: Re: #157873 screen: Reproducible key sequence causes hard lock
Date: Tue, 18 Mar 2003 21:38:24 -0500
So the normal behavior when a terminal has stopped output is that screen
will loop (high cpu usage!) trying to write to the pty and getting EIO
until the output has been started again.

In the scrollback case, we jump out of the output looping and spit out
the following debug output:

MarkRoutine called: fore nr 0, display /dev/pts/2
Entering new layer on top of 0x1007de0c: 0x1013d630
layer is blocking
...and is first, so window gets blocked
---LGotoPos 21 41
LMsg('Welcome to hacker's treasure zoo - Column 22 Line 42(+8192)
(80,42)') (0x1
013d630);
using STATLINE 41
GotoPos (21,41) -> (0,41)
Flush(): 82

And thereafter we're hung.

strace yields that the screen process is blocking in the write about the
hacker's treasure zoo.

I don't know enough about the way this stuff works code-wise, so I'll
spend some time poking around the source and try to figure out a fix.

-- 
Adam Lazur, Cluster Monkey



Message sent on to "John R. Daily" <jdaily@progeny.com>:
Bug#157873. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Adam Lazur <zal@debian.org>:
Bug#157873; Package screen. (full text, mbox, link).


Acknowledgement sent to Maximiliano Curia <maxy@gnuservers.com.ar>:
Extra info received and forwarded to list. Copy sent to Adam Lazur <zal@debian.org>. (full text, mbox, link).


Message #18 received at 157873@bugs.debian.org (full text, mbox, reply):

From: Maximiliano Curia <maxy@gnuservers.com.ar>
To: Debian Bug Tracking System <157873@bugs.debian.org>
Subject: screen: Fix?
Date: Sat, 03 Jul 2004 00:19:12 -0300
[Message part 1 (text/plain, inline)]
Package: screen
Version: 4.0.2-3
Tags: patch
Followup-For: Bug #157873

*** Please type your report below this line **

Damián Viano and I, found some extra information about this bug.

This bug is activated in help, command and copy mode. And it's triggered
by calling the InitOverlayPage function.

First, the 'select()' infinite loop when pressing CTRL-S is gone in
kernel 2.6.x . (weird)

Second, the hung in the write could be workaround applying the attached
patch, it's a hack so screen doesn't call some weirds tcsetattr, in this
cases.

There is another way to avoid this, using C-a f, to set -flow, it will
not hang, in fact in this way pressing C-s will act as C-a s. (Should be
default?)

I'll keep looking this bug, when I've got some sleep.

Thanks.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i586)
Kernel: Linux 2.6.6-1-386
Locale: LANG=spanish, LC_CTYPE=spanish (ignored: LC_ALL set to es_AR)

Versions of packages screen depends on:
ii  base-passwd                 3.5.7        Debian base system master password
ii  debconf                     1.4.29       Debian configuration management sy
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libncursesw5                5.4-4        Shared libraries for terminal hand
ii  libpam0g                    0.76-21      Pluggable Authentication Modules l
ii  passwd                      1:4.0.3-28.4 Change and administer password and

-- debconf information:
  screen/old_upgrade_prompt: false
[screen-4.0.2.patch (text/x-c, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Adam Lazur <zal@debian.org>:
Bug#157873; Package screen. (full text, mbox, link).


Acknowledgement sent to Bernhard Kaindl <bkaindl@ffii.org>:
Extra info received and forwarded to list. Copy sent to Adam Lazur <zal@debian.org>. (full text, mbox, link).


Message #23 received at 157873@bugs.debian.org (full text, mbox, reply):

From: Bernhard Kaindl <bkaindl@ffii.org>
To: Debian Bug Tracking System <157873@bugs.debian.org>
Subject: screen: Solution using sigsetjmp and siglongjmp from Abram Hindle
Date: Sun, 27 Feb 2005 22:55:36 +0100
Package: screen
Version: 4.0.2-4.1
Severity: critical
Followup-For: Bug #157873


This bug is also reported under the screen web site on savannah:

https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11610

In comment #1, he gave a solution which adds an alarm. He uses
sigsetjmp and siglongjmp to skip over the blocking routines
which works fine here.

This is a really highly critical problem because it causes that
all applications which were running below the hard hanging screen
have to be killed since the screen in really dead beyong recovery.

Either this or the other fix which was already given must be applied...
Bernhard

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.4.27
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages screen depends on:
ii  base-passwd                 3.5.9        Debian base system master password
ii  debconf                     1.4.30.11    Debian configuration management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libncursesw5                5.4-4        Shared libraries for terminal hand
ii  libpam0g                    0.76-22      Pluggable Authentication Modules l
ii  passwd                      1:4.0.3-30.9 change and administer password and

-- debconf information excluded



Tags added: confirmed, patch Request was from Justin Pryzby <justinpryzby@users.sourceforge.net> to control@bugs.debian.org. (full text, mbox, link).


Noted your statement that Bug has been forwarded to https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=11610. Request was from Justin Pryzby <justinpryzby@users.sourceforge.net> to control@bugs.debian.org. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#157873; Package screen. (full text, mbox, link).


Acknowledgement sent to Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>:
Extra info received and forwarded to list. (full text, mbox, link).


Message #32 received at 157873@bugs.debian.org (full text, mbox, reply):

From: Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de>
To: 157873@bugs.debian.org, "John R. Daily" <jdaily@progeny.com>, Maximiliano Curia <maxy@gnuservers.com.ar>, Bernhard Kaindl <bkaindl@ffii.org>
Subject: Re: screen: Reproducible key sequence causes hard lock
Date: Mon, 6 Aug 2007 23:31:43 +0200
[Message part 1 (text/plain, inline)]
Hi,

I have finally made up my mind and implemented my own workaround,
which I'll include in 4.0.3-3. It gets by without alarm signals and
jumping (which is always a bit awkward to debug) but uses an additional
call to select() instead to make sure the socket in question won't block.

The solution is still rather hackish (the unblocking ^Q is sometimes
consumed by screen itself when it happens to be in the other select()
waiting for input for the copy mode - a second ^Q is necessary in those
cases), but this is only a small inconvenience that downgrades the bug
from important to minor.


Regards,

Jan
[19flowcontrol_lockup.dpatch (text/plain, attachment)]
[signature.asc (application/pgp-signature, inline)]

Severity set to `minor' from `important' Request was from Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de> to control@bugs.debian.org. (Sat, 19 Apr 2008 14:54:05 GMT) (full text, mbox, link).


Changed Bug title to `Ctrl-S + copy mode hangs screen (partially solved)' from `screen: Reproducible key sequence causes hard lock'. Request was from Jan Christoph Nordholz <hesso@pool.math.tu-berlin.de> to control@bugs.debian.org. (Sat, 19 Apr 2008 14:54:05 GMT) (full text, mbox, link).


Reply sent to Axel Beckert <abe@debian.org>:
You have taken responsibility. (Mon, 08 Aug 2016 16:48:04 GMT) (full text, mbox, link).


Notification sent to "John R. Daily" <jdaily@progeny.com>:
Bug acknowledged by developer. (Mon, 08 Aug 2016 16:48:04 GMT) (full text, mbox, link).


Message #41 received at 157873-done@bugs.debian.org (full text, mbox, reply):

From: Axel Beckert <abe@debian.org>
To: 157873-done@bugs.debian.org
Cc: "John R. Daily" <jdaily@progeny.com>, Maximiliano Curia <maxy@gnuservers.com.ar>, Bernhard Kaindl <bkaindl@ffii.org>, Jan Christoph Nordholz <jnordholz@sec.t-labs.tu-berlin.de>, Thorsten Glaser <tg@mirbsd.de>
Subject: Re: Bug#157873: screen: Reproducible key sequence causes hard lock
Date: Mon, 8 Aug 2016 18:44:02 +0200
Version: 4.1.0~20110819git450e8f3-1

Hi,

I just had a look at the ancient bug report "Ctrl-S + copy mode hangs
screen (partially solved)" against Debian's screen package.

Jan Christoph Nordholz wrote in 2007:
> I have finally made up my mind and implemented my own workaround,
> which I'll include in 4.0.3-3. It gets by without alarm signals and
> jumping (which is always a bit awkward to debug) but uses an additional
> call to select() instead to make sure the socket in question won't block.

He wrote in 4.0.3-3's debian/changelog entry:

  * Add a kluge to prevent screen from locking up when doing strange things
    with xon and flow control enabled. Still waiting for upstream to properly
    fix this problem, so this only addresses: #157873.

This resulting patch was named 19flowcontrol_lockup.dpatch.

> The solution is still rather hackish (the unblocking ^Q is sometimes
> consumed by screen itself when it happens to be in the other select()
> waiting for input for the copy mode - a second ^Q is necessary in those
> cases), but this is only a small inconvenience that downgrades the bug
> from important to minor.

The patch 19flowcontrol_lockup.dpatch was removed with with the upload
of a git snapshot of screen in version 4.1.0~20110819git450e8f3-1. The
according changelog entry is:

  […]
  * Removed the following patches which have been applied upstream or are
    otherwise no more necessary:
    […]
    - 19flowcontrol_lockup
    […]

For me, the fact that the workaround from Jan was no more necessary,
implies that upstream fixed this issue properly. The according
upstream bug nevertheless has reports from 2013 that this is still
happening, but the Debian bug report hasn't seen any new reports since
2007.

Hence I'm closing this bug report now with the version of screen's
Debian package which removed that workaround.

Feel free to reopen this bug report, if contrary to my expectations
the issue is still present in Debian Unstable. (I can't reproduce the
initial submitter's recipe).

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe@debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE



Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 06 Sep 2016 07:31:04 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jan 10 21:47:57 2018; Machine Name: beach

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.