screen-users
[Top][All Lists]
Advanced

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

Re: Invalid message (magic 0x6175472) [DEBUG output]


From: Cameron Kerr
Subject: Re: Invalid message (magic 0x6175472) [DEBUG output]
Date: Tue, 1 Feb 2005 16:03:29 +1300

On 1/02/2005, at 3:16 PM, Cameron Kerr wrote:

Debian GNU/Linux Testing on x86, kernel 2.4.29 (and priors), Screen version 4.00.02 (FAU) 5-Dec-03

Hello, I'm writing a system that puts a lot of windows (about 12) into a screen session. Sometimes, (ie, not all the time), I find that inside the screen session, I get the following messages

Unknown user /dev/pts/11 tried to send a command!
Invalid message (magic 0x6175472)

The magic in the last message changes, from what I can tell. I'm sure it was 0x000000 at one time, so it seems to be some packet parsing problem or similar. As for the Unknown user line, I don't know why that happens, nor do I get know if its always pts/11.

Anyway, the end result is that some of the windows don't show up inside the screen session.

Thinking it may have something to do with too many windows coming in too close together and dropping off the connection queue, I increased the queue length to listen() to 20, with no difference.

The message is output from this piece of code in ReceiveMsg

  if (m.protocol_revision != MSG_REVISION)
    {
      Msg(0, "Invalid message (magic 0x%08x).",
          m.protocol_revision);
      return;
    }

So it seems that the message is unaligned. I suspect this is due to the first message, and thus there is something left in the buffer.

The first message, regarding the 'Unknown user' message, is produced by the following code.

#ifdef MULTIUSER
  user = *FindUserPtr(mp->m.attach.auser);
  if (user == 0)
    {
      Msg(0, "Unknown user %s tried to send a command!",
          mp->m.attach.auser);
      return;
    }
#else

I'm building it with -DDEBUG now, to have a closer look under the hood.

Here is what I found when compiled with -DDEBUG

Knock - knock!
Ha, there was someone knocking on my fifo??
secopen(/var/run/screen/S-cameron/974.cameron-lab99, 0x800, 0000)
Deq event fd 5 type 1 queued 1
New event fd 5 type 1 queued 0
*** RecMsg: type 8 tty /dev/pts/12
display: /dev/pts/12 display not found
but window /dev/pts/12 (backfacing)found.
FindUserPtr /dev/pts/11 not found, id -1
Msg('Unknown user /dev/pts/11 tried to send a command!') (0);

Knock - knock!
Ha, there was someone knocking on my fifo??
secopen(/var/run/screen/S-cameron/974.cameron-lab99, 0x800, 0000)
Deq event fd 5 type 1 queued 1
New event fd 5 type 1 queued 0
Msg('Invalid message (magic 0x61757472).') (0);


It would seem that the two bugs may be unrelated, but I think both may be race-conditions (recall they don't happen all of the time).

Hmm, that's interesting, I just noticed that the magic value in question always(?) seems to be 0x61757472 or 0x0000000

--
Cameron Kerr
address@hidden; http://humbledown.org





reply via email to

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