Bug#493823: gpm: segv on SIGWINCH

2008-08-06 Thread Nico Schottelius
It should be fixed in gpm-1.99.7-4-gb47, which you can get from

http://home.schottelius.org/~nico/temp/gpm-1.99.7-4-gb47.tar.bz2

See bug #493168 for more details.

Thanks for your help!

Sincerly,

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C


signature.asc
Description: Digital signature


Bug#493823: gpm: segv on SIGWINCH

2008-08-06 Thread Kevin Ryde
Nico Schottelius [EMAIL PROTECTED] writes:

 Can you attach gdb and/or strace -fF to it and attach the output?
 You can also run gpm -D to run it in debug mode and send the last lines
 before it dies.

*** debug [daemon/old_main.c(158)]: selected 1 times
*** debug [daemon/getmousedata.c(89)]: Data 0a 00 00 (00)
*** debug [daemon/processmouse.c(281)]: dx:   0 dy:   0 x:   2 y:  48 butt: 1 
vc: 11 clicks: 0
*** debug [daemon/old_main.c(158)]: selected 1 times
*** debug [daemon/getmousedata.c(89)]: Data 08 00 00 (00)
*** debug [daemon/processmouse.c(281)]: dx:   0 dy:   0 x:   2 y:  48 butt: 1 
vc: 11 clicks: 0
*** warning [daemon/gpm-killed.c(34)]: /usr/sbin/gpm pid 2981 is resizing :-)
*** debug [daemon/get_console_size.c(45)]: Screen size: 80 - 50
*** debug [daemon/get_console_size.c(62)]: x 3, y 3

Program received signal SIGSEGV, Segmentation fault.
0x080544a8 in ?? ()
(gdb) where
#0  0x080544a8 in ?? ()
#1  0x001c in ?? ()
#2  0x001c in ?? ()
#3  0x in ?? ()

And if I recompile noopt,nostrip to get a backtrace the claim is

#0  0x0805706c in old_main () at daemon/old_main.c:146
#1  0x080569e7 in main (argc=134572308, argv=0x800) at daemon/main.c:33

which is

for (ci = cinfo[i]; ci; ci = ci-next) kill(ci-data.pid,SIGWINCH);

with i=64 and with cinfo[64]=0x50 ... which looks like a rather dodgy
pointer value.

Sticking a watchpoint on cinfo[64] shows it gets clobbered when
get_console_size() stores to maxx.  And indeed gdb claims the addresses
of cinfo[64] and maxx are the same.  (So it seems that 0x50 is 80, the
screen width.)

Putting gpm.c through the preprocessor it looks like it gets compiled
with MAX_VC=63 coming from MAX_NR_CONSOLES in linux/vt.h.  But the
same on old_main.c ends up with MAX_VC=64 coming from the fallback
MAX_NR_CONSOLES=64 in daemon.h.  I guess old_main.c is going past the
end of the array when it tries to propagate sigwinch to the clients ...



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#493823: gpm: segv on SIGWINCH

2008-08-05 Thread Kevin Ryde
Package: gpm
Version: 1.20.4-2
Severity: normal

If the running gpm server process is sent a sigwinch

  kill -WINCH $pid

it dies with a segv,

  Aug  4 13:50:56 blah /usr/sbin/gpm[6589]: /usr/sbin/gpm pid 6589 is resizing 
:-)
  Aug  4 13:50:56 blah kernel: [10393.257728] gpm[6589]: segfault at 58 ip 
080544a8 sp bfde19e0 error 4 in gpm[8048000+14000]

I don't know what it's supposed to do for sigwinch, presumably segv is
not it :-).  I noticed it trying /etc/init.d/console-screen.kbd.sh from
the kbd package, it sends a sigwinch to gpm when the font, or key
mapping, or something, might have changed.


-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i586)

Kernel: Linux 2.6.25-2-486
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages gpm depends on:
ii  debconf [debconf-2.0] 1.5.23 Debian configuration management sy
ii  debianutils   2.30   Miscellaneous utilities specific t
ii  libc6 2.7-12 GNU C Library: Shared libraries
ii  libgpm2   1.20.4-2   General Purpose Mouse - shared lib
ii  lsb-base  3.2-16 Linux Standard Base 3.2 init scrip
ii  ucf   3.007  Update Configuration File: preserv

gpm recommends no packages.

gpm suggests no packages.

-- debconf information:
* gpm/responsiveness: 30
* gpm/repeat_type:
* gpm/append: -l a-zA-Z0-9_.:~/��-�
* gpm/restart: true
* gpm/sample_rate:
* gpm/device: /dev/psaux
* gpm/restart_default: true
* gpm/type: ps2



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#493823: gpm: segv on SIGWINCH

2008-08-05 Thread Nico Schottelius
Hello Kevin,

Kevin Ryde [Tue, Aug 05, 2008 at 11:51:05AM +1000]:
 I don't know what it's supposed to do for sigwinch, presumably segv is
 not it :-). 

gpm is notified of a console change with WINCH.

Can you attach gdb and/or strace -fF to it and attach the output?

You can also run gpm -D to run it in debug mode and send the last lines
before it dies.

I am currently digging in the sourcecode for the reason.

Sincerly,

Nico

-- 
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/

PGP: BFE4 C736 ABE5 406F 8F42  F7CF B8BE F92A 9885 188C


signature.asc
Description: Digital signature