bugGNU Screen - Bugs: bug #43744, "WriteMessage: Bad file...

 
 

bug #43744: "WriteMessage: Bad file descriptor" while attaching

Submitter:  None
Submitted:  Wed 03 Dec 2014 10:06:18 AM UTC
   
 
Category:  Program Logic Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Need Info
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  None
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 04 Jul 2016 07:17:25 PM UTC, comment #11: 

As attaching to wrong sessions seems to be debian specific, let's concentrate on "WriteMessage: Bad file descriptor".

Does it still happen with 4.4.0 release?

If yes, can you try to download 4.4.0 release and build it yourself and try to reproduce it then?

Amadeusz Sławiński <amade>
Group administrator
Thu 24 Dec 2015 10:35:28 AM UTC, comment #10: 

Hi Alex,

no problem: The finding that the bug is Debian-specific is indeed new.

I also don't think the "WriteMessage: Bad file descriptor" error is related to the "connects to wrong screen instance" problem. Given that this bug has been opened with both problems in the title, I'd suggest to close this bug as "connects to wrong screen instance" functioning as designed and open a new one for "WriteMessage: Bad file descriptor".

With kind regards,
Baurzhan.

Baurzhan Ismagulov <ibr>
Thu 24 Dec 2015 09:57:54 AM UTC, comment #9: 

Hi Baurzhan,

sorry, my fault. It sounded as if the finding that it's debian-specific is new. But that's not the case.

I'm though not yet sure if the "WriteMessage: Bad file descriptor" and the wrong selection of the session are the same issue.

Axel Beckert <abe>
Thu 24 Dec 2015 09:34:20 AM UTC, comment #8: 

Is it possible to change the title of the bug to "WriteMessage: Bad file descriptor"?

Baurzhan Ismagulov <ibr>
Thu 24 Dec 2015 09:31:35 AM UTC, comment #7: 

Hi Alex,

it's https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799929 .

With kind regards,
Baurzhan

Baurzhan Ismagulov <ibr>
Thu 24 Dec 2015 09:30:23 AM UTC, comment #6: 

Hi Baurzhan,

thanks for the confirmation that this is indeed a debian-specific bug. Would you mind filing a bug report in the Debian bug-tracking system? (Otherwise I'll try to copy details from this report into a new Debian Bug report later.)

TIA, Axel (Maintainer of Debian's screen package)

Axel Beckert <abe>
Thu 24 Dec 2015 09:30:21 AM UTC, comment #5: 

git master 6917e9d attaches to the right session.

Baurzhan Ismagulov <ibr>
Thu 24 Dec 2015 09:12:24 AM UTC, comment #4: 

Debian screen 4.2.1-3 with 80EXP_session_creation_time.patch reverted works correctly.

Baurzhan Ismagulov <ibr>
Thu 24 Sep 2015 11:41:18 AM UTC, comment #3: 


$ screen -d -m -S aaa sh -c 'echo aaa; sleep 3600'
$ screen -d -m -S aaabbb sh -c 'echo aaabbb; sleep 3600'
$ screen -ls
There are screens on:
        10534.aaabbb    (24/09/15 14:29:53)     (Detached)
        10496.aaa       (24/09/15 14:29:49)     (Detached)
$ screen -r aaa
[resumes aaabbb instead]


Is this a Debian-specific issue?

Anonymous
Fri 05 Dec 2014 09:12:32 PM UTC, comment #2: 

screen-4.00.04devel as seen on openSUSE behaves the way I expect.


$ screen -d -r RDV
here is DEV
[detached from 11420.RDV]
screen -d -r RDVdev
here is NOT DEV
[detached from 11511.RDVdev]


I am confused by the echo "here is NOT DEV" that you have in the screen session with dev in its name. So I cannot exactly see what behaviour you want.
Please also peek at the output of screen -ls when you try to reproduce the issue. Another source of confusion might be multiple sessions with the same name, but different contents.

Regarding the mentioned patch: The rationale in the introductory comment looks great to me. thumbs up.
But seeing the bad filedescriptor error from WriteMessage indicates that the implementation is flawed. Thumbs down.




Juergen Weigert <jnweiger>
Group administrator
Wed 03 Dec 2014 10:22:21 AM UTC, comment #1: 


> Under Debian wheezy & screen 4.01.00devel

[...]

> Under Ubuntu 14.10 & screen 4.02.01


JFTR: Both these screen versions contain a patch which changes the sorting of sessions:

http://sources.debian.net/src/screen/4.2.1-3/debian/patches/80EXP_session_creation_time.patch/

There's a slight chance that this issue is Debian- (and Ubuntu-) specific.

But then again, this patch is in Debian's screen package for more than 8 years now. So I don't really expect that it causes general problems.

See https://bugs.debian.org/206572 for the full discussion of this bug.

Axel Beckert <abe>
Wed 03 Dec 2014 10:06:18 AM UTC, original submission:  

In the following lines, I'm indenting commands executed inside screen...

The setup:
$ screen -S RDV
  $ echo "here is DEV"
  here is DEV
[detached from 5266.RDV]
$ screen -S RDVdev
  $ echo "here is NOT DEV"
  here is NOT DEV
[detached from 5737.RDVdev]

Under Debian wheezy & screen 4.01.00devel
I get
$ screen -d -r RDV
  here is DEV
[detached from 7847.RDVdev] ## <= wrong instance
$ screen -d -r RDVdev
  here is DEV
[detached from 7847.RDVdev]

Under Ubuntu 14.10 & screen 4.02.01
I get
$ screen -d -r RDVdev
  here is DEV
[detached from 7847.RDVdev]
$ screen -d -r RDV
WriteMessage: Bad file descriptor ## <= error

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by ibr (Posted a comment)
  • -email is unavailable- added by jnweiger (Posted a comment)
  • -email is unavailable- added by abe (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-04 amade StatusNone Need Info
        Summaryscreen -d -r &lt;string&gt; connects to wrong screen instance or gives an error "WriteMessage: Bad file descriptor" while attaching

    Back to the top

    Powered by Savane 3.13-8ccc.
    Corresponding source code