[Powertop] [bugreport] crash on powertop --debug --html=file.html
Jan-Simon Möller <dl9pf at gmx.de> Tue, 26 Jun 2012 17:10:44 +0200
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <[email protected]> |
Hi all!
With git HEAD I see this crash:
$ ./src/powertop --debug --html=/home/dl9pf/powertop.1.html
Loaded 0 prior measurements
Preparing to take measurements
Taking 1 measurement(s) for a duration of 20 second(s) each.
Segmentation fault (core dumped)
$ gdb ./src/powertop core
GNU gdb (GDB) SUSE (7.4.50.20120603-77.1)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/dl9pf/user/git/LF/powertop/src/powertop...done.
[New LWP 2714]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./src/powertop --debug --
html=/home/dl9pf/powertop.1.html'.
Program terminated with signal 11, Segmentation fault.
#0 0x000000000041f1dc in devlist_sort (i=0x875720, j=0x211) at
devlist.cpp:273
273 if (i->pid != j->pid)
(gdb) bt full
#0 0x000000000041f1dc in devlist_sort (i=0x875720, j=0x211) at
devlist.cpp:273
No locals.
#1 0x00000000004218b8 in
std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<devuser**,
std::vector<devuser*, std::allocator<devuser*> > root(a)aragorn:
/home/dl9pf/user/git/LF/powertop
[17:03]
__val = 0x875720
__next = {_M_current = 0x889288}
#2 0x0000000000421071 in
std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator<devuser**,
std::vector<devuser*, std::allocator<devuser*> > >, bool (*)(devuser*,
devuser*)> (__first=..., __last=..., __comp=0x41f1c2 <devlist_sort(devuser*,
devuser*)>)
at /usr/include/c++/4.5/bits/stl_algo.h:2160
__i = {_M_current = 0x889318}
#3 0x0000000000420358 in
std::__final_insertion_sort<__gnu_cxx::__normal_iterator<devuser**,
std::vector<devuser*, std::allocator<devuser*> > >, bool (*)(devuser*,
devuser*)> (__first=..., __last=..., __comp=0x41f1c2 <devlist_sort(devuser*,
devuser*)>)
at /usr/include/c++/4.5/bits/stl_algo.h:2193
No locals.
#4 0x000000000041f948 in std::sort<__gnu_cxx::__normal_iterator<devuser**,
std::vector<devuser*, std::allocator<devuser*> > >, bool (*)(devuser*,
devuser*)> (__first=..., __last=..., __comp=0x41f1c2 <devlist_sort(devuser*,
devuser*)>) at /usr/include/c++/4.5/bits/stl_algo.h:5252
No locals.
#5 0x000000000041f2e5 in report_show_open_devices () at devlist.cpp:306
target = 0x68edc0 <two>
i = 0
prev =
"\000_Y=\377\177\000\000\000\000\000\000\000\000\000\000\240_Y=\377\177\000\000@\332h\000\000\000\000\000\240\332h\000\000\000\000\000P\241\206",
'\000' <repeats 29 times>,
"\020\362h\000\000\000\000\000\360_Y=\377\177\000\000&\203@\000\000\000\000\000\360_Y=\377\177\000\000EKh\201x\230Y@\240\332h\000\000\000\000\000@\332h\000\000\000\000"
proc =
"\200\360h\000\000\000\000\000\001\000\000\000\000\000\000\000\350bU\001\000\000\000\000\340bU\001\000\000\000\000\020_Y=\377\177\000\000\020\320<\357\177\177\000\000\061\000\000\000\000\000\000\000\250\332h\000\000\000\000\000(a)_Y=\377\177\000\000\224\201@\000\000\000\000\000h_Y=\377\177\000\000\000\000\000\000\000\000\000\000
0,0%\000kts/s\000\000\000\000\240_Y=\377\177\000\000T\016D\000\000\000\000"
#6 0x0000000000454a9b in one_measurement (seconds=20, workload=0x7fff3d5960a0
"") at main.cpp:223
tmp = 0
#7 0x0000000000454d81 in report (time=20, workload=0x7fff3d5960a0 "",
iterations=1, file=0x7fff3d5970a0 "/home/dl9pf/powertop.1.html")
at main.cpp:274
i = 0
#8 0x0000000000455287 in main (argc=3, argv=0x7fff3d5981a8) at main.cpp:434
option_index = 4
c = -1
wantreport = true
iterations = 1
It runs with:
diff --git a/src/devlist.cpp b/src/devlist.cpp
index 93f2081..de98214 100644
--- a/src/devlist.cpp
+++ b/src/devlist.cpp
@@ -303,7 +303,7 @@ void report_show_open_devices(void)
if (target->size() == 0)
return;
- sort(target->begin(), target->end(), devlist_sort);
+// sort(target->begin(), target->end(), devlist_sort);
if (reporttype) {
fprintf(reportout.http_report,"<h2>Process device
activity</h2>\n <table width=\"100%%\">\n");
Looks like something is fishy in the sort for this case.
Best,
Jan-Simon