screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Aleksey Tsalolikhin
Subject: Re: error: Invalid message (magic 0x00000000).
Date: Wed, 19 Oct 2016 06:08:53 -0700

As a workaround, try putting a sleep 1 between launching screens? 

On Tue, Oct 18, 2016 at 4:02 AM, Vegard Nossum <address@hidden> 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
address@hidden
https://lists.gnu.org/mailman/listinfo/screen-users



--
Need CFEngine training?  Email address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]