#608422 procmeter3: Seg fault in CreateMenus with invalid menuLabel widget

Package:
procmeter3
Source:
procmeter3
Description:
graphical system status monitor
Submitter:
Neil Williams
Date:
2011-11-23 15:09:03 UTC
Severity:
important
#608422#5
Date:
2010-12-30 19:34:08 UTC
From:
To:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79a3f56 in ?? () from /usr/lib/libXaw.so.7
(gdb) bt
#0  0x00007ffff79a3f56 in ?? () from /usr/lib/libXaw.so.7
#1  0x00007ffff79a41fe in ?? () from /usr/lib/libXaw.so.7
#2  0x00007ffff75277a2 in ?? () from /usr/lib/libXt.so.6
#3  0x00007ffff7527b76 in XtSetValues () from /usr/lib/libXt.so.6
#4  0x0000000000404e75 in CreateMenus (parent=0x626650) at menus.c:151
#5  0x00000000004077f6 in Start (argc=0x7fffffffe0dc, argv=0x7fffffffe298) at
window.c:113
#6  0x000000000040b676 in main (argc=1, argv=0x7fffffffe298) at procmeter.c:89


#4  0x0000000000404e75 in CreateMenus (parent=0x626650) at menus.c:151
151      XtSetValues(menulabel,args,nargs);
(gdb) p menulabel
$1 = (Widget) 0x0

The package defaults to symlinking /usr/bin/procmeter3 to the xaw version of
the package.

Explicitly starting /usr/bin/procmeter3-gtk2 works fine.

Exporting this report out of #602975 as it is a different cause and the gtk2 frontend
works fine on this system. (Joey's patch for #602975 makes no difference to this
crash.)

I've had a look at the seg fault and it appears that the name of the
returned widget the problem:

(gdb) p *menulabel
$7 = {core = {self = 0x632eb0, widget_class = 0x7ffff7bd6e20, parent = 0x632a90, xrm_name = 540,
    being_destroyed = 0 '\000', destroy_callbacks = 0x0, constraints = 0x0, x = 0, y = 0, width = 78, height = 21,
    border_width = 0, managed = 1 '\001', sensitive = 1 '\001', ancestor_sensitive = 1 '\001', event_table = 0x0, tm = {
      translations = 0x0, proc_table = 0x0, current_state = 0x0, lastEventTime = 0}, accelerators = 0x0,
    border_pixel = 6500656, border_pixmap = 25, popup_list = 0x0, num_popups = 0,
    name = 0x40004 <Address 0x40004 out of bounds>, screen = 0x0, colormap = 0, window = 6500688, depth = 1,
    background_pixel = 6503072, background_pixmap = 6502832, visible = -48 '\320', mapped_when_managed = 59 ';'}}

name is out of bounds in the Widget returned from XtNameToWidget(module_menu,"menuLabel"),
on lines 150 and 170 of xaw/menus.c - wondering if this could be down to a
particular font package not being installed. (Current set includes gsfonts gsfonts-x11
texlive-fonts-recommended ttf-freefont x-ttcidfont-conf xfonts-100dpi xfonts-75dpi
xfonts-encodings xfonts-utils.) (If these lines are omitted, I get Error: Aborting: no font found)

#608422#10
Date:
2011-01-09 04:22:46 UTC
From:
To:
Hello, Neil, thanks for all your help with this bug.

Please install xfonts-base package, and try to reproduce the bug again.

I am able to reproduce it, only after:

# apt-get purge xfonts-base

Again, thanks for your help.

#608422#15
Date:
2011-01-09 11:32:50 UTC
From:
To:
With and without xfonts-base, I get the same seg fault.

I've got some extra X dbg packages installed:

libxaw7-dbg 2:1.0.8-2
libxt6-dbg    1:1.0.7-1

So I get a bit more detail in the trace:

un  xfonts-base    <none>         (no description available)

sudo apt-get install xfonts-base

Setting up xfonts-base (1:1.0.3) ...

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79a3f56 in CreateGCs (w=0x62eeb0) at ../../src/SmeBSB.c:714
714	../../src/SmeBSB.c: No such file or directory.
	in ../../src/SmeBSB.c
(gdb) bt
#0  0x00007ffff79a3f56 in CreateGCs (w=0x62eeb0)
#at ../../src/SmeBSB.c:714 1  0x00007ffff79a41fe in XawSmeBSBSetValues
#(current=0x7fffffffd9a0,
    request=<value optimized out>, cnew=0x62eeb0, args=<value optimized
out>, num_args=<value optimized out>) at ../../src/SmeBSB.c:462
#2  0x00007ffff75277a2 in CallSetValues (class=0x7ffff7bd6e20,
    current=0x7fffffffd9a0, request=0x7fffffffd680, new=0x62eeb0,
    args=0x7fffffffdfc0, num_args=3) at ../../src/SetValues.c:125
#3  0x00007ffff7527b76 in XtSetValues (w=0x62eeb0, args=0x7fffffffdfc0,
    num_args=3) at ../../src/SetValues.c:261
#4  0x0000000000404e75 in CreateMenus (parent=0x626650) at menus.c:151
#5  0x00000000004077f6 in Start (argc=0x7fffffffe0cc,
#argv=0x7fffffffe288)
    at window.c:113
#6  0x000000000040b676 in main (argc=1, argv=0x7fffffffe288) at
#procmeter.c:89

The seg fault is still in the same place of procmeter3 - menus.c:151

$ sudo dpkg -P xfonts-base

un  xfonts-base    <none>         (no description available)

Reading symbols from /usr/bin/procmeter3...(no debugging symbols found)...done.
(gdb) run

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff79a3f56 in CreateGCs (w=0x62ee80) at ../../src/SmeBSB.c:714
714	../../src/SmeBSB.c: No such file or directory.
	in ../../src/SmeBSB.c
(gdb) bt
#0  0x00007ffff79a3f56 in CreateGCs (w=0x62ee80) at ../../src/SmeBSB.c:714
#1  0x00007ffff79a41fe in XawSmeBSBSetValues (current=0x7fffffffd9f0,
    request=<value optimized out>, cnew=0x62ee80, args=<value optimized out>,
    num_args=<value optimized out>) at ../../src/SmeBSB.c:462
#2  0x00007ffff75277a2 in CallSetValues (class=0x7ffff7bd6e20,
    current=0x7fffffffd9f0, request=0x7fffffffd6d0, new=0x62ee80,
    args=0x7fffffffe010, num_args=3) at ../../src/SetValues.c:125
#3  0x00007ffff7527b76 in XtSetValues (w=0x62ee80, args=0x7fffffffe010,
    num_args=3) at ../../src/SetValues.c:261
#4  0x0000000000404e75 in CreateMenus ()
#5  0x00000000004077f6 in Start ()
#6  0x000000000040b676 in main ()

What other font packages do you have installed?

#608422#20
Date:
2011-01-09 18:02:31 UTC
From:
To:
These are the fonts that I have installed

ii  gsfonts-x11                          0.21
 Make Ghostscript fonts available to X11
ii  ttf-dejavu-core                      2.31-1
 Vera font family derivate with additional characters
ii  ttf-dejavu-extra                     2.31-1
 Vera font family derivate with additional characters
ii  ttf-freefont                         20090104-7
 Freefont Serif, Sans and Mono Truetype fonts
ii  ttf-lyx                              1.6.7-1
 TrueType versions of some TeX fonts
ii  ttf-opensymbol                       1:3.2.1-9
 OpenSymbol TrueType font
ii  ttf-sil-gentium                      20081126:1.02-11
 extended Unicode Latin font ("a typeface for the nations")
ii  ttf-sil-gentium-basic                1.1-2
 smart Unicode font families (Basic and Book Basic) based on Gentium
ii  ttf-uralic                           0.0.20040829-1
 Truetype fonts for Cyrillic-based Uralic languages
ii  x-ttcidfont-conf                     32
 TrueType and CID fonts configuration for X
ii  x11-xfs-utils                        7.4+1
 X font server utilities
ii  xfonts-base                          1:1.0.1
 standard fonts for X
ii  xfonts-encodings                     1:1.0.3-1
 Encodings for X.Org fonts
ii  xfonts-mathml                        4
 Type1 Symbol font for MathML
ii  xfonts-utils                         1:7.5+2
 X Window System font utility programs

Regards

#608422#25
Date:
2011-01-09 19:23:29 UTC
From:
To:
found 608422 3.5c-1.1
quit

$ dpkg-query -W -f '${Package} ${Version}\n' xfonts-utils xfonts-mathml
xfonts-encodings xfonts-base x11-xfs-utils x-ttcidfont-conf ttf-uralic
ttf-sil-gentium-basic ttf-sil-gentium ttf-opensymbol ttf-lyx
ttf-freefont ttf-dejavu-extra ttf-dejavu-core gsfonts-x11 gsfonts-x11
0.21 ttf-dejavu-core 2.31-1 ttf-dejavu-extra 2.31-1 ttf-freefont
20090104-7 ttf-lyx 1.6.7-1
ttf-opensymbol 1:3.2.1-11
ttf-sil-gentium 20081126:1.02-11
ttf-sil-gentium-basic 1.1-2
ttf-uralic 0.0.20040829-1
x-ttcidfont-conf 32
x11-xfs-utils 7.4+1
xfonts-base 1:1.0.3
xfonts-encodings 1:1.0.4-1
xfonts-mathml 4
xfonts-utils 1:7.6~1

There were a few extra packages to install but I'm still getting
exactly the same seg fault. (Tested each time after adding each of the
packages from that list which I didn't already have installed.)

Maybe this isn't a font problem at all, yet -gtk2 continues to operate.

Attaching content of /proc/interrupts and /proc/cpuinfo

procmeter3     3.5c-1.1

#608422#32
Date:
2011-11-23 15:06:07 UTC
From:
To:
Hello,
Could you please try to reproduce the bug you experiencied,  with the
new 3.5d-1 version of procmeter package that has been uploaded in
unstable?

Regards