Re: error: Invalid message (magic 0x00000000).

Aleksey Tsalolikhin <[email protected]>
Newsgroups gmane.comp.gnu.screen.user
Message-ID <CA+jMWoeqJGBVxL7ZK8eZJ2TJwzKKLhCfX2geTZf8edLp5AzKtQ@mail.gmail.com>
As a workaround, try putting a sleep 1 between launching screens?

On Tue, Oct 18, 2016 at 4:02 AM, Vegard Nossum <[email protected]>
wrote:

> Hi,
>
> When starting a lot of new screen windows in parallel, some windows
> don't actually open, and I get some errors instead:
>
> Invalid message (magic 0x00000000).
> Invalid message (magic 0x736e6f69).
>
> (the latter seems to be ASCII "snoi").
>
> You can reproduce it e.g. this Python script:
>
> 8<-----------------------------------------------------------
> import os
> import shutil
> import sys
> import subprocess
> import time
>
> if not os.getenv('STY'):
>    print >>sys.stderr, 'Need to run inside an existing screen session'
>    sys.exit(1)
>
> # create pids/
> if os.path.exists('pids'):
>    shutil.rmtree('pids')
> os.mkdir('pids')
>
> expected_n = 100
> for i in range(expected_n):
>    subprocess.check_call(['screen', 'bash', '-c', 'echo 1 > pids/$$'])
>
> # give the processes above some time to start
> time.sleep(5)
>
> actual_n = len(os.listdir('pids'))
>
> print "expected %u, got %u" % (expected_n, actual_n)
> 8<-----------------------------------------------------------
>
> This will mostly print "expected 100, got 100", but sometimes it
> prints "expected 100, got 99".
>
> I've only found this earlier report (from 2005) of something similar:
>
> https://lists.gnu.org/archive/html/screen-users/2005-01/msg00057.html
>
> They are also starting a lot of windows in parallel, i.e.: "I'm
> writing a system that puts a lot of windows (about 12) into a screen
> session".
>
> Are there any recent fixes or workarounds for this problem?
>
> Thanks,
>
>
> Vegard
>
> _______________________________________________
> screen-users mailing list
> screen-users-mXXj517/[email protected]
> https://lists.gnu.org/mailman/listinfo/screen-users
>



-- 
Need CFEngine training?  Email training-c/GIo7RCy9aNyQASi3ws4laTQe2KTcn/@public.gmane.org

_______________________________________________
screen-users mailing list
screen-users-mXXj517/[email protected]
https://lists.gnu.org/mailman/listinfo/screen-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.