Debian Bug report logs - #493823
gpm: segv on SIGWINCH

version graph

Package: gpm; Maintainer for gpm is Axel Beckert <abe@debian.org>; Source for gpm is src:gpm (PTS, buildd, popcon).

Reported by: Kevin Ryde <user42@zip.com.au>

Date: Tue, 5 Aug 2008 07:27:02 UTC

Severity: normal

Found in versions gpm/1.20.4-2, gpm/1.20.4-3.3

Done: Jason D Cormie <jason@wormwood666.demon.co.uk>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (full text, mbox, link).


Acknowledgement sent to Kevin Ryde <user42@zip.com.au>:
New Bug report received and forwarded. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Kevin Ryde <user42@zip.com.au>
To: submit@bugs.debian.org
Subject: gpm: segv on SIGWINCH
Date: Tue, 05 Aug 2008 11:51:05 +1000
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




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (full text, mbox, link).


Acknowledgement sent to Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org>:
Extra info received and forwarded to list. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #10 received at submit@bugs.debian.org (full text, mbox, reply):

From: Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org>
To: Kevin Ryde <user42@zip.com.au>, 493823@bugs.debian.org
Cc: submit@bugs.debian.org
Subject: Re: Bug#493823: gpm: segv on SIGWINCH
Date: Tue, 5 Aug 2008 12:35:28 +0200
[Message part 1 (text/plain, inline)]
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 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (full text, mbox, link).


Acknowledgement sent to Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org>:
Extra info received and forwarded to list. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (full text, mbox, link).


Acknowledgement sent to Kevin Ryde <user42@zip.com.au>:
Extra info received and forwarded to list. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #20 received at 493823@bugs.debian.org (full text, mbox, reply):

From: Kevin Ryde <user42@zip.com.au>
To: 493823@bugs.debian.org
Subject: Re: Bug#493823: gpm: segv on SIGWINCH
Date: Wed, 06 Aug 2008 11:09:46 +1000
Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org> 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  0x0000001c in ?? ()
#2  0x0000001c in ?? ()
#3  0x00000000 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=0x8000000) 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 ...




Information forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (full text, mbox, link).


Acknowledgement sent to Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org>:
Extra info received and forwarded to list. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #25 received at 493823@bugs.debian.org (full text, mbox, reply):

From: Nico Schottelius <nico-debian-pkg-gpm-devel@schottelius.org>
To: Kevin Ryde <user42@zip.com.au>
Cc: 493823@bugs.debian.org
Subject: Re: Bug#493823: gpm: segv on SIGWINCH
Date: Wed, 6 Aug 2008 10:34:13 +0200
[Message part 1 (text/plain, inline)]
It should be fixed in gpm-1.99.7-4-gb4dddd7, which you can get from

http://home.schottelius.org/~nico/temp/gpm-1.99.7-4-gb4dddd7.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 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>:
Bug#493823; Package gpm. (Thu, 23 Dec 2010 23:39:04 GMT) (full text, mbox, link).


Acknowledgement sent to Jason Cormie <jason@wormwood666.demon.co.uk>:
Extra info received and forwarded to list. Copy sent to Debian GPM Team <pkg-gpm-devel@lists.alioth.debian.org>. (Thu, 23 Dec 2010 23:39:04 GMT) (full text, mbox, link).


Message #30 received at 493823@bugs.debian.org (full text, mbox, reply):

From: Jason Cormie <jason@wormwood666.demon.co.uk>
To: 493823@bugs.debian.org
Subject: [gpm] Fixed upstream, current version no longer affected
Date: Thu, 23 Dec 2010 23:38:15 +0000
Package: gpm
Version: 1.20.4-3.3

--- Please enter the report below this line. ---

This issue was fixed upstream first in the 1.99 tree then in the 1.20 tree 
which then made it into debian.

This bug can be closed

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.32-5-amd64

Debian Release: squeeze/sid
  900 testing         ftp.debian.org
  850 unstable        ftp.debian.org
  800 stable          www.debian-multimedia.org
  800 stable          security.debian.org
  800 stable          ftp.debian.org
  700 experimental    ftp.debian.org

--- Package information. ---
Depends             (Version) | Installed
=============================-+-=============
libc6                (>= 2.7) | 2.11.2-7
libgpm2           (>= 1.20.4) | 1.20.4-3.3
debconf             (>= 0.5)  | 1.5.36
 OR debconf-2.0               |
dpkg             (>= 1.15.4)  | 1.15.8.5
 OR install-info              | 4.13a.dfsg.1-6
debianutils          (>= 1.7) | 3.4
ucf                 (>= 0.28) | 3.0025+nmu1
lsb-base                      | 3.2-23.1


Package's Recommends field is empty.

Package's Suggests field is empty.







Bug closed, send any further explanations to Kevin Ryde <user42@zip.com.au> Request was from Jason D Cormie <jason@wormwood666.demon.co.uk> to control@bugs.debian.org. (Sun, 24 Apr 2011 12:02:09 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 23 May 2011 07:34:26 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jul 1 15:31:03 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.