screen -r fails with "WriteMessage: Bad file descriptor"

Bug #600999 reported by Joolz
74
This bug affects 16 people
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Binary package hint: screen

scenario:

 * two screen are suspended
 * revive the first one with screen -r screen1name
 * revive the second one with screen -r
 * "WriteMessage: Bad file descriptor"
 * revive the second one with screen -r screen2name

Step three used to work alright in every Ubuntu version until I upgraded ro 10.04. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477739 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507817

Ubuntu 10.04 amd64, everything is up to date.

Tags: screen
Revision history for this message
Ian! D. Allen (idallen) wrote :

I've been having the same problem with 10.04 and now with 10.10.
Resume is intermittent. It works if I try long enough. See below.
The Debian bugs list shows screen has been updated:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477739
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507817

I don't think Ubuntu picked up that new version of screen.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.10
Release: 10.10
Codename: maverick

$ uname -a
Linux idallen-oak.home.idallen.ca 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:45:36 UTC 2010 x86_64 GNU/Linux

$ screen -v
Screen version 4.00.03jw4 (FAU) 2-May-06

$ screen -list
There are screens on:
 17522.pts-31.idallen-oak (11/08/10 11:07:54) (Detached)
 16917.pts-2.idallen-oak (11/08/10 11:07:33) (Attached)
2 Sockets in /var/run/screen/S-idallen.

$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
Screen password: <deliberately gave wrong password so I could continue>
Password incorrect.
$ screen -r
Screen password: <deliberately gave wrong password so I could continue>
Password incorrect.
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
Screen password: <deliberately gave wrong password so I could continue>
Password incorrect.
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
WriteMessage: Bad file descriptor
$ screen -r
Screen password:
...etc...

Revision history for this message
Ian! D. Allen (idallen) wrote :

Another example of the problem (Ubuntu 10.10):

$ screen -r
WriteMessage: Bad file descriptor

$ screen -r
WriteMessage: Broken pipe

$ screen -r
WriteMessage: Bad file descriptor

$ screen -r
Screen password:

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in screen (Ubuntu):
status: New → Confirmed
Revision history for this message
Laura Czajkowski (czajkowski) wrote :

http://www.gnu.org/software/screen/manual/html_node/Nonblock.html - echo "defnonblock on" >> ~/.screenrc has fixed my issue for me

Revision history for this message
Yu Lou (louyu1999) wrote :

The problem was solved for me when I find the process's pid with `screen -R` and then resume with `screen -r <pid>`.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I just tried the reproducer steps in bionic, and it worked just fine. The second screen -r without any further parameters attached to the right screen.

Can we close this very old bug?

Changed in screen (Ubuntu):
status: Confirmed → Incomplete
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.