bugGNU Screen - Bugs: bug #64190, Extremely slow startup due to fd...

 
 

bug #64190: Extremely slow startup due to fd polling?

Submitter:  None
Submitted:  Sun 14 May 2023 03:27:45 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Need Investigation
Privacy:  Public Assigned to:  None
Open/Closed:  Open Release:  4.9.0
Fixed Release:  None Planned Release:  None
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 09 Aug 2023 09:40:56 PM UTC, comment #1: 

Hey,
thanks for reporting, but what kind of fix are you waiting for exactly?

Does screen also slow without docker? Can you reproduce it with other container implementation like podman?

Alexander Naumov <anaumov>
Group administrator
Sun 14 May 2023 03:27:45 PM UTC, original submission:  

I use screen in a docker container on Home Assistant OS on a x86 machine.

```
# uname -a
Linux core-ssh 6.1.25 #1 SMP PREEMPT_DYNAMIC Tue Apr 25 11:50:31 UTC 2023 x86_64 Linux

# screen -v
Screen version 4.09.00 (GNU) 30-Jan-22

# cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.17.3
PRETTY_NAME="Alpine Linux v3.17"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
```

Just running `screen -v` is very slow as well.

Very slow means tens of seconds or minutes - prior to the latest update of the docker container, this took about 1 second max.

```
strace -f -o screen.log screen -v
```

The screen.log shows many lines similar to the following:

```
22942 poll([{fd=3, events=0}, {fd=4, events=0}, {fd=5, events=0}, {fd=6, events=0}, {fd=7, events=0}, {fd=8, events=0}, {fd=9, events=0}, {fd=10, events=0}, {fd=11, events=0}, {fd=12, events=0}, {fd=13, events=0}, {fd=14, events=0}, {fd=15, events=0}, {fd=16, events=0}, {fd=17, events=0}, {fd=18, events=0}, {fd=19, events=0}, {fd=20, events=0}, {fd=21, events=0}, {fd=22, events=0}, {fd=23, events=0}, {fd=24, events=0}, {fd=25, events=0}, {fd=26, events=0}, {fd=27, events=0}, {fd=28, events=0}, {fd=29, events=0}, {fd=30, events=0}, {fd=31, events=0}, {fd=32, events=0}, {fd=33, events=0}, {fd=34, events=0}, ...], 1024, 0) = 1024 ([{fd=3, revents=POLLNVAL}, {fd=4, revents=POLLNVAL}, {fd=5, revents=POLLNVAL}, {fd=6, revents=POLLNVAL}, {fd=7, revents=POLLNVAL}, {fd=8, revents=POLLNVAL}, {fd=9, revents=POLLNVAL}, {fd=10, revents=POLLNVAL}, {fd=11, revents=POLLNVAL}, {fd=12, revents=POLLNVAL}, {fd=13, revents=POLLNVAL}, {fd=14, revents=POLLNVAL}, {fd=15, revents=POLLNVAL}, {fd=16, revents=POLLNVAL}, {fd=17, revents=POLLNVAL}, {fd=18, revents=POLLNVAL}, {fd=19, revents=POLLNVAL}, {fd=20, revents=POLLNVAL}, {fd=21, revents=POLLNVAL}, {fd=22, revents=POLLNVAL}, {fd=23, revents=POLLNVAL}, {fd=24, revents=POLLNVAL}, {fd=25, revents=POLLNVAL}, {fd=26, revents=POLLNVAL}, {fd=27, revents=POLLNVAL}, {fd=28, revents=POLLNVAL}, {fd=29, revents=POLLNVAL}, {fd=30, revents=POLLNVAL}, {fd=31, revents=POLLNVAL}, {fd=32, revents=POLLNVAL}, {fd=33, revents=POLLNVAL}, {fd=34, revents=POLLNVAL}, ...])
```


I notice that the value for 'fd' is continuously increasing.  On line 3196 of the log I get:

```
22942 poll([{fd=3215363, events=0}, {fd=3215364, events=0}, {fd=3215365, events=0}, {fd=3215366, events=0}, {fd=3215367, events=0}, {fd=3215368, events=0}, {fd=3215369, events=0}, {fd=3215370, events=0}, {fd=3215371, events=0}, {fd=3215372, events=0}, {fd=3215373, events=0}, {fd=3215374, events=0}, {fd=3215375, events=0}, {fd=3215376, events=0}, {fd=3215377, events=0}, {fd=3215378, events=0}, {fd=3215379, events=0}, {fd=3215380, events=0}, {fd=3215381, events=0}, {fd=3215382, events=0}, {fd=3215383, events=0}, {fd=3215384, events=0}, {fd=3215385, events=0}, {fd=3215386, events=0}, {fd=3215387, events=0}, {fd=3215388, events=0}, {fd=3215389, events=0}, {fd=3215390, events=0}, {fd=3215391, events=0}, {fd=3215392, events=0}, {fd=3215393, events=0}, {fd=3215394, events=0}, ...], 1024, 0) = 1024 ([{fd=3215363, revents=POLLNVAL}, {fd=3215364, revents=POLLNVAL}, {fd=3215365, revents=POLLNVAL}, {fd=3215366, revents=POLLNVAL}, {fd=3215367, revents=POLLNVAL}, {fd=3215368, revents=POLLNVAL}, {fd=3215369, revents=POLLNVAL}, {fd=3215370, revents=POLLNVAL}, {fd=3215371, revents=POLLNVAL}, {fd=3215372, revents=POLLNVAL}, {fd=3215373, revents=POLLNVAL}, {fd=3215374, revents=POLLNVAL}, {fd=3215375, revents=POLLNVAL}, {fd=3215376, revents=POLLNVAL}, {fd=3215377, revents=POLLNVAL}, {fd=3215378, revents=POLLNVAL}, {fd=3215379, revents=POLLNVAL}, {fd=3215380, revents=POLLNVAL}, {fd=3215381, revents=POLLNVAL}, {fd=3215382, revents=POLLNVAL}, {fd=3215383, revents=POLLNVAL}, {fd=3215384, revents=POLLNVAL}, {fd=3215385, revents=POLLNVAL}, {fd=3215386, revents=POLLNVAL}, {fd=3215387, revents=POLLNVAL}, {fd=3215388, revents=POLLNVAL}, {fd=3215389, revents=POLLNVAL}, {fd=3215390, revents=POLLNVAL}, {fd=3215391, revents=POLLNVAL}, {fd=3215392, revents=POLLNVAL}, {fd=3215393, revents=POLLNVAL}, ...])
```

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 anaumov (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.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-08-09 anaumov StatusNone Need Investigation

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code