Jan Christoph Nordholz <[EMAIL PROTECTED]> writes:

> can you spot a pattern? (Happens only when several sessions are alive /
> happens only as non-root / ...) Otherwise I guess the easiest way would
> be if you could provide me with a 'screen -ls' (so I know what I have to
> expect) and the output of

It happens both as root and non-root, but only when a *single* session
is alive (my typical usage).  For instance:

$ screen
[detached]
$ screen
[detached]
$ screen -ls
There are screens on:
        14892.pts-0.tux64       (25/04/2008 20:20:22)   (Detached)
        14783.pts-0.tux64       (25/04/2008 20:20:19)   (Detached)
2 Sockets in /var/run/screen/S-amu.

$ screen -rR
There are several suitable screens on:
        14892.pts-0.tux64       (25/04/2008 20:20:23)   (Detached)
        14783.pts-0.tux64       (25/04/2008 20:20:20)   (Detached)
[screen is terminating]
$ screen -rR
WriteMessage: Bad file descriptor
$ screen -ls
There is a screen on:
        14783.pts-0.tux64       (25/04/2008 20:20:20)   (Detached)
1 Socket in /var/run/screen/S-amu.

I cannot reproduce the problem under strace, even when running
everything as root or using a test personal screendir (though the
problem does otherwise occur in both simplified cases).

I also cannot reproduce the problem with a fresh rebuild of 4.0.3-7,
so the problem appears to be with changes to screen itself rather than
to the build environment.

I *can*, however, reproduce the problem under gdb (at least when using
a test personal screendir):

$ LD_LIBRARY_PATH=/usr/lib/debug gdb -args ./screen -r
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show
copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) break Panic
Breakpoint 1 at 0x405490: file screen.c, line 1975.
(gdb) run
Starting program: /home/amu/src/screen/screen-4.0.3/screen -r

Breakpoint 1, Panic (err=9, fmt=0x44566a "WriteMessage") at
screen.c:1975
1975    {
(gdb) bt full
#0  Panic (err=9, fmt=0x44566a "WriteMessage") at screen.c:1975
        ap = {{gp_offset = 7286, fp_offset = 0, 
    overflow_arg_area = 0xffffffff, reg_save_area = 0x2af696a52bd0}}
        buf = '\0' <repeats 5200 times>, 
"�D\000\000\000\000\000p3�024�\177\000\000\000\000\000\000\000\000\000\00032�024�\177\000\000\000\000\000\000\000\000\000\000��\226�",
 '\0' <repeats 14 times>, 
"�a\000\000��024�\177\000\000��024�\177\000\000\2002�024�\177\000\000�2�024�\177\000\000��024�\177\000\000��024�\177\000\00083�024�\177\000\00003�024�\177",
 '\0' <repeats 18 times>, 
"P.�024�\177\000\000�4�024�\177\000\000�D\000\000\000\000\000\2003�024�\177\000\000\000\000\000\000\005",
 '\0' <repeats 51 times>, "��������\000\000\000"...
        p = <value optimized out>
#1  0x00000000004257a0 in Attach (how=2) at attacher.c:345
        n = <value optimized out>
        lasts = -1
        m = {protocol_revision = 1836279552, type = 2, 
  m_tty = "/dev/pts/0", '\0' <repeats 4085 times>, m = {create = {
      lflag = 7695713, aflag = 0, flowflag = 0, hheight = 0, nargs = 0, 
      line = "\000\000\000\000&U\000\000\000\000\000\000<\000\000\000P", '\0' 
<repeats 23 times>, "��������xterm", '\0' <repeats 19 times>, 
"\t", '\0' <repeats 4022 times>, dir = '\0' <repeats 4095 times>, 
      screenterm = '\0' <repeats 19 times>}, attach = {
      auser = "amu", '\0' <repeats 17 times>, apid = 21798, adaptflag = 0, 
      lines = 60, columns = 80, preselect = '\0' <repeats 19 times>, esc = -1, 
      meta_esc = -1, envterm = "xterm", '\0' <repeats 15 times>, 
      encoding = 9}, detach = {duser = "amu", '\0' <repeats 17 times>, 
      dpid = 21798}, command = {auser = "amu", '\0' <repeats 17 times>, 
      nargs = 21798, 
      cmd = "\000\000\000\000<\000\000\000P", '\0' <repeats 23 times>, 
"��������xterm", '\0' <repeats 19 times>, "\t", '\0' <repeats 
4030 times>, apid = 0, 
      preselect = '\0' <repeats 19 times>}, 
    message = "amu", '\0' <repeats 21 times>, 
"&U\000\000\000\000\000\000<\000\000\000P", '\0' <repeats 23 times>, 
"��������xterm", '\0' <repeats 19 times>, "\t", '\0' <repeats 
8098 times>}}
        st = {st_dev = 65027, st_ino = 5666642, st_nlink = 1, st_mode = 4480, 
  st_uid = 7286, st_gid = 7286, pad0 = 0, st_rdev = 0, st_size = 0, 
  st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1209169949, 
    tv_nsec = 0}, st_mtim = {tv_sec = 1209169949, tv_nsec = 0}, st_ctim = {
    tv_sec = 1209169949, tv_nsec = 0}, __unused = {0, 0, 0}}
        s = <value optimized out>
#2  0x000000000040829a in main (ac=<value optimized out>, av=0x7fff14d18298)
    at screen.c:1121
        n = <value optimized out>
        ap = <value optimized out>
        av0 = 0x7fff14d198ad "/home/amu/src/screen/screen-4.0.3/screen"
        socknamebuf = "[EMAIL PROTECTED]@\"\000 
\032\020\002\031\004F&\000\001��\200\202�024�\177\000\000`�`\226�", 
'\0' <repeats 18 times>, " 
~�024�\177\000\000\220~�024�\177\000\000\210�", '\0' <repeats 21 
times>, "[EMAIL 
PROTECTED]@�226�\000\000\000\000\000\000\000\000\000\0008��225�\000\000
 ~�024�\177\000\000\000\000\000"...
        mflag = 0
        myname = <value optimized out>
        SockDir = <value optimized out>
        st = {st_dev = 65027, st_ino = 5665583, st_nlink = 2, st_mode = 16832, 
  st_uid = 7286, st_gid = 7286, pad0 = 0, st_rdev = 0, st_size = 88, 
  st_blksize = 4096, st_blocks = 0, st_atim = {tv_sec = 1209169983, 
    tv_nsec = 0}, st_mtim = {tv_sec = 1209169897, tv_nsec = 0}, st_ctim = {
    tv_sec = 1209169897, tv_nsec = 0}, __unused = {0, 0, 0}}
        nwin = {StartAt = -1, aka = 0x0, args = 0x0, dir = 0x0, term = 0x0, 
  aflag = -1, flowflag = -1, lflag = -1, histheight = -1, monitor = -1, 
  wlock = -1, silence = -1, wrap = -1, Lflag = -1, slow = -1, gr = -1, 
  c1 = -1, bce = -1, encoding = -1, hstatus = 0x0, charset = 0x0}
        detached = 0
        sockp = <value optimized out>

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/[EMAIL PROTECTED]


Reply via email to