Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 142131 - x11-plugins/wmupmon-0.1.2 segfaults on start
Summary: x11-plugins/wmupmon-0.1.2 segfaults on start
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-29 15:21 UTC by Rafal Andrzejczak
Modified: 2006-10-13 14:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
gdb out (wmupmon-segfault,11.50 KB, text/plain)
2006-10-13 13:23 UTC, Rafal Andrzejczak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafal Andrzejczak 2006-07-29 15:21:14 UTC
gehirn zohar # emerge --info
Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 x86_64)
=================================================================
System uname: 2.6.17-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse3 -Os -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -msse3 -Os -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.po.opole.pl http://gentoo.ITDNet.net/gentoo http://pandemonium.tiscali.de/pub/gentoo/"
LANG="pl_PL"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X alsa amd64 apache2 apm asf avi berkdb bitmap-fonts cdr cli crypt custom-cflags divx4linux dlloader dri dvb dvd dvdr emboss encode exif flac fortran ft gcj gdbm gif glx gnutls gphoto2 gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jabber java jpeg libwww lzw lzw-tiff mad motif mp3 mpeg ncurses nls nptl objc ogg opengl oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline reflection scanner sdl session spell spl ssl tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb vorbis xml2 xmms xorg xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

gehirn zohar # wmupmon --version
wmupmon version 0.1.2

Application segfaults on startup.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-07-30 03:31:09 UTC
Reopen with a backtrace, please.

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 2 Rafal Andrzejczak 2006-07-30 16:07:26 UTC
(gdb) run
Starting program: /usr/bin/wmupmon 

Program received signal SIGSEGV, Segmentation fault.
main (argc=1, argv=0x7fff7756a798) at main.c:90
90      main.c: Nie ma takiego pliku ani katalogu.
        in main.c

Nie ma takiego pliku ani katalogu. <- This means "No such file or directory"
Comment 3 Michele Noberasco (RETIRED) gentoo-dev 2006-07-31 01:52:56 UTC
Would you mind trying wmupmon 0.1.3? Is is masked ~amd64 so you will have to
ACCEPT_KEYWORDS="amd64" emerge wmupmon
This version works fine here, if it works for you we just have to bug the amd64 arch maintainers...
Comment 4 Rafal Andrzejczak 2006-07-31 02:20:50 UTC
Unfortunately i get the very same error with 0.1.3 ... Segmentation fault.
Comment 5 Michele Noberasco (RETIRED) gentoo-dev 2006-07-31 02:45:47 UTC
Silly question, but... do you have the /proc filesystem enabled in your kernel? What does it say when you
cat /proc/uptime
?
Comment 6 Rafal Andrzejczak 2006-07-31 15:17:20 UTC
zohar@gehirn:~$ cat /proc/uptime 
220046.80 135990.87
Comment 7 Michele Noberasco (RETIRED) gentoo-dev 2006-08-01 02:01:41 UTC
OK. Re-assigning this to the amd64 arch team, as I haven't the hardware to reproduce your issue.
Comment 8 Rafal Andrzejczak 2006-08-03 16:12:26 UTC
Starting program: /opt/wmupmon/src/wmupmon 

Program received signal SIGSEGV, Segmentation fault.
main (argc=1, argv=0x7fff2df77108) at main.c:93
93               real_off_xpm[i] = backlight_off_xpm[i];


When debugging from directory containing sources (sorry, learning this).
Comment 9 Simon Stelling (RETIRED) gentoo-dev 2006-10-12 04:19:07 UTC
Alright, this is fixed in 0.1.3-r1. The problem was that the code which calculated the size of an array didn't divide the sizeof(array) through the sizeof(array[0]) and then used that number of bytes to access the elements behind the array. All arches are affected by this, but as char* is twice as big on amd64 the chances are higher to hit the bug there.
Comment 10 Rafal Andrzejczak 2006-10-12 15:47:40 UTC
r1 works for root, but still segfaults for a user...
Comment 11 Simon Stelling (RETIRED) gentoo-dev 2006-10-12 16:07:46 UTC
Not here. I'm pretty sure this is another issue.. Can you provide the output of "strace wmupmon" please? You will have to merge dev-util/strace eventually.
Comment 12 Rafal Andrzejczak 2006-10-12 22:09:00 UTC
zohar@gehirn:~$ strace wmupmon
execve("/home/zohar/bin/wmupmon", ["wmupmon"], [/* 54 vars */]) = 0
uname({sys="Linux", node="gehirn", ...}) = 0
brk(0)                                  = 0x508000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5
48a4ec000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=96268, ...}) = 0
mmap(NULL, 96268, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b548a4ed000
close(3)                                = 0
open("/usr/lib/libX11.so.6", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\373"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=1013048, ...}) = 0
mmap(NULL, 2036192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548a5ee000
madvise(0x2b548a5ee000, 2036192, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548a6d9000, 1073632, PROT_NONE) = 0
mmap(0x2b548a7d8000, 28672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENY
WRITE, 3, 0xea000) = 0x2b548a7d8000
mmap(0x2b548a7df000, 480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYM
OUS, -1, 0) = 0x2b548a7df000
close(3)                                = 0
open("/usr/lib/libXext.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 5\0\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=62952, ...}) = 0
mmap(NULL, 1109184, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548a7e0000
madvise(0x2b548a7e0000, 1109184, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548a7ee000, 1051840, PROT_NONE) = 0
mmap(0x2b548a8ee000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYW
RITE, 3, 0xe000) = 0x2b548a8ee000
close(3)                                = 0
open("/usr/lib/libXpm.so.4", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 1\0\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=62872, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5
48a8ef000
mmap(NULL, 1107672, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548a8f0000
madvise(0x2b548a8f0000, 1107672, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548a8fe000, 1050328, PROT_NONE) = 0
mmap(0x2b548a9fe000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYW
RITE, 3, 0xe000) = 0x2b548a9fe000
close(3)                                = 0
open("/lib/tls/libc.so.6", O_RDONLY)    = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\306"..., 640) = 640
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
lseek(3, 680, SEEK_SET)                 = 680
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0"..., 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=1268224, ...}) = 0
lseek(3, 64, SEEK_SET)                  = 64
read(3, "\6\0\0\0\5\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0"..., 616) = 616
mmap(NULL, 2261000, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548a9ff000
madvise(0x2b548a9ff000, 2261000, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548ab1e000, 1085448, PROT_NONE) = 0
mmap(0x2b548ac1d000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENY
WRITE, 3, 0x11e000) = 0x2b548ac1d000
mmap(0x2b548ac23000, 16392, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANON
YMOUS, -1, 0) = 0x2b548ac23000
close(3)                                = 0
open("/usr/lib/libXau.so.6", O_RDONLY)  = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\300\r\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=10136, ...}) = 0
mmap(NULL, 1056192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548ac28000
madvise(0x2b548ac28000, 1056192, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548ac2a000, 1048000, PROT_NONE) = 0
mmap(0x2b548ad29000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYW
RITE, 3, 0x1000) = 0x2b548ad29000
close(3)                                = 0
open("/usr/lib/libXdmcp.so.6", O_RDONLY) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0p\24\0\0"..., 640) = 640
fstat(3, {st_mode=S_IFREG|0755, st_size=21936, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5
48ad2a000
mmap(NULL, 1065936, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548ad2b000
madvise(0x2b548ad2b000, 1065936, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548ad30000, 1045456, PROT_NONE) = 0
mmap(0x2b548ae2f000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYW
RITE, 3, 0x4000) = 0x2b548ae2f000
close(3)                                = 0
open("/lib/libdl.so.2", O_RDONLY)       = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\17\0"..., 640) = 640
lseek(3, 624, SEEK_SET)                 = 624
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"..., 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=11280, ...}) = 0
mmap(NULL, 1056984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2b
548ae30000
madvise(0x2b548ae30000, 1056984, MADV_SEQUENTIAL|0x1) = 0
mprotect(0x2b548ae32000, 1048792, PROT_NONE) = 0
mmap(0x2b548af31000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYW
RITE, 3, 0x1000) = 0x2b548af31000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5
48af33000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b5
48af34000
mprotect(0x2b548ac1d000, 12288, PROT_READ) = 0
mprotect(0x2b548a5ec000, 4096, PROT_READ) = 0
arch_prctl(ARCH_SET_FS, 0x2b548af33ae0) = 0
munmap(0x2b548a4ed000, 96268)           = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "Uc<\260\24\\\354=", 8)         = 8
close(3)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
Process 15125 detached

And when running wmupmon itself from user:
/var/log/messages:
Oct 13 07:07:18 gehirn wmupmon[15165]: segfault at 0000000000508000 rip 0000000000401a98 rsp 00007fffdbad7870 error 4
Comment 13 Simon Stelling (RETIRED) gentoo-dev 2006-10-13 02:36:21 UTC
(In reply to comment #11)
> I'm pretty sure this is another issue..

Heh, that should have been "a different issue". I guess I shouldn't write comments at 1am ;)

I can't see any reason why it would segfault (the strace output only shows libraries getting loaded), so I need a gdb backtrace as well:

$ gdb wmupmon
(gdb) run
[it segfaults]
(gdb) bt full
[paste that stuff here]
(gdb) quit

Thanks
Comment 14 Rafal Andrzejczak 2006-10-13 13:23:50 UTC
Created attachment 99588 [details]
gdb out
Comment 15 Simon Stelling (RETIRED) gentoo-dev 2006-10-13 13:38:51 UTC
> (gdb) run
> Starting program: /home/zohar/bin/wmupmon

Err, stupid question, but you didn't forget to copy the new version there, did you? 
Comment 16 Rafal Andrzejczak 2006-10-13 14:20:18 UTC
Sh** i forgot to remove the self compiled version with binding after emerging one, it was so long ago, omg you got me there. It works, i suck :/