Bug 251849 - qps 1.9.19 : segmentation fault on x86_64
Summary: qps 1.9.19 : segmentation fault on x86_64
Alias: None
Product: Fedora
Classification: Fedora
Component: qps   
(Show other bugs)
Version: 7
Hardware: x86_64 Linux
Target Milestone: ---
Assignee: Dawid Gajownik
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2007-08-12 12:53 UTC by Eric LANDES
Modified: 2008-09-08 03:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-17 02:08:54 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Stack trace from a generated coredump (10.78 KB, text/plain)
2007-08-12 14:36 UTC, Eric LANDES
no flags Details

Description Eric LANDES 2007-08-12 12:53:18 UTC
Description of problem:
qps, when launched, reports a segmentation fault
Changelogs on http://qps.kldp.net/ do not show a segmentation fault bug fix
since release 1.9.19

Version-Release number of selected component (if applicable):
$ qps -version
qps version 1.9.19, using Qt library 3.3.8

$ uname -a
Linux pc-linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux

How reproducible:
Just launch qps

Actual results:
$ qps
Erreur de segmentation

Additional info : 
$ tail -f /var/log/messages
Aug 12 14:44:17 localhost kernel: qps[4453]: segfault at 0000000000000006 rip
00000036c8679bdc rsp 00007fff170ccd98 error 4

$ strace qps 
open("/home/eric/.qps-linux", O_RDONLY) = -1 ENOENT (No such file or directory)
ioctl(5, FIONREAD, [1])                 = 0
ioctl(5, FIONREAD, [1])                 = 0
ioctl(5, FIONREAD, [1])                 = 0
stat("/proc/vmstat", {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
stat("/proc/1/task", {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
open("/proc/meminfo", O_RDONLY)         = 7
read(7, "MemTotal:      1027204 kB\nMemFre"..., 4096) = 725
close(7)                                = 0
open("/proc/stat", O_RDONLY)            = 7
read(7, "cpu  16107 45 3132 108347 7212 1"..., 4096) = 4096
close(7)                                = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Comment 1 Dawid Gajownik 2007-08-12 13:20:41 UTC
Thank you for your bug report!

(In reply to comment #0)
> $ uname -a
> Linux pc-linux 2.6.21-1.3228.fc7 #1 SMP Tue Jun 12 14:56:37 EDT 2007 x86_64
> x86_64 x86_64 GNU/Linux

Would you be willing to update your whole system first? Your kernel is a bit
old. I presume that other packages can be outdated, too.

Please run as root:

yum update

> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++

Could you install gdb, qps-debuginfo and qt-debuginfo packages [1] and paste
here stack trace [2], please?

Run first:

gdb qps

then type:


and after application crash:

thread apply all bt

[1] debuginfo packages can be found here:
[2] http://fedoraproject.org/wiki/StackTraces

Comment 2 Eric LANDES 2007-08-12 14:25:59 UTC
In fact, I was up to date (last kernel does not with my wireless
usb key). 

After applying the requested commands, here is the result (run under
kernel- : 
$ gdb qps
GNU gdb Red Hat Linux (6.6-15.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...
Using host libthread_db library "/lib64/libthread_db.so.1".
(gdb) run
Starting program: /usr/bin/qps 
[Thread debugging using libthread_db enabled]
[New Thread 46912496295040 (LWP 3141)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912496295040 (LWP 3141)]
0x00000036c8679bdc in rawmemchr () from /lib64/libc.so.6
(gdb) thread apply all bt

Thread 1 (Thread 46912496295040 (LWP 3141)):
#0  0x00000036c8679bdc in rawmemchr () from /lib64/libc.so.6
#1  0x00000036c866d7ca in _IO_str_init_static_internal () from /lib64/libc.so.6
#2  0x00000036c86620c5 in vsscanf () from /lib64/libc.so.6
#3  0x00000036c865d3f8 in sscanf () from /lib64/libc.so.6
#4  0x000000000041fe0d in Procinfo::read_common () at proc.cpp:723
#5  0x00000000004229c0 in Proc::refresh (this=0x6) at proc.cpp:1381
#6  0x0000000000423c1d in Procview::refresh (this=0x966c50)
    at proc_common.cpp:266
#7  0x000000000041ddb0 in Pstable::refresh (this=0x967000) at pstable.cpp:373
#8  0x0000000000415042 in Qps::set_table_mode (this=0x9204a0, treemode=true)
    at qps.cpp:866
#9  0x000000000041a10a in Qps (this=0x9204a0) at qps.cpp:282
#10 0x000000000041a94f in main (argc=1, argv=0x7fff68c1b338, 
    envp=<value optimized out>) at qps.cpp:2004
#11 0x00000036c861dab4 in __libc_start_main () from /lib64/libc.so.6
#12 0x0000000000414789 in _start ()

Comment 3 Eric LANDES 2007-08-12 14:36:30 UTC
Created attachment 161139 [details]
Stack trace from a generated coredump

See a stack trace after allowing core dump creation
It should also help.

Comment 4 Dawid Gajownik 2007-08-14 16:20:53 UTC
OK, I found where the problem is: on some systems /proc/stats is bigger than
4096 chars so the whole content could not fit into "buf" buffer

In line 723 and 724 of proc_linux.cpp we have these lines:

        p = strstr(buf, "btime") + 6;
        sscanf(p, "%lu", &boot_time);

Because buf variable did not contain "btime" string, strstr() returned NULL.
That's why sscanf caused segmentation fault. I'll contact with upstream developer.

Comment 5 André Johansen 2007-10-02 20:28:30 UTC
Version 1.9.20 has this bug fixed.

Comment 6 Bug Zapper 2008-05-14 13:57:27 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Bug Zapper 2008-06-17 02:08:52 UTC
Fedora 7 changed to end-of-life (EOL) status on June 13, 2008. 
Fedora 7 is no longer maintained, which means that it will not 
receive any further security or bug fix updates. As a result we 
are closing this bug. 

If you can reproduce this bug against a currently maintained version 
of Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 Arindam Ghosh 2008-09-08 03:35:36 UTC
Fixed in qps-1.10.2-1

Note You need to log in before you can comment on or make changes to this bug.