* [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-26 15:10
0 siblings, 0 replies; 13+ messages in thread
From: @ 2012-06-26 15:10 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 4708 bytes --]
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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-26 18:42 Chris Ferron
0 siblings, 0 replies; 13+ messages in thread
From: Chris Ferron @ 2012-06-26 18:42 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 5638 bytes --]
On 06/26/2012 08:10 AM, Jan-Simon Möller wrote:
> Hi all!
> With git HEAD I see this crash:
>
> $ ./src/powertop --debug --html=/home/dl9pf/powertop.1.html
hum thanks for the trace, but can you give me more info on your system?
./src/powertop --debug --html=/home/dl9pf/powertop.1.html
Fedora 15, 16, and 17 seem not to have the problem
What kernel are you running? Can you send me your kernel config?
and are you modifying power to build on suse in any way?
here is my output.
$ sudo ./src/powertop --debug --html=/home/ceferron/powertop.1.html
Loaded 0 prior measurements
Preparing to take measurements
Taking 1 measurement(s) for a duration of 20 second(s) each.
PowerTOP outputing using base filename /home/ceferron/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
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-26 18:50 Chris Ferron
0 siblings, 0 replies; 13+ messages in thread
From: Chris Ferron @ 2012-06-26 18:50 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 6081 bytes --]
On 06/26/2012 11:42 AM, Chris Ferron wrote:
>
> On 06/26/2012 08:10 AM, Jan-Simon Möller wrote:
>> Hi all!
>> With git HEAD I see this crash:
>>
>> $ ./src/powertop --debug --html=/home/dl9pf/powertop.1.html
> hum thanks for the trace, but can you give me more info on your system?
>
> ./src/powertop --debug --html=/home/dl9pf/powertop.1.html
>
> Fedora 15, 16, and 17 seem not to have the problem
Also tested it on openSUSE 12.1 (Asparagus) (x86_64)"
> What kernel are you running? Can you send me your kernel config?
>
>
> and are you modifying power to build on suse in any way?
>
> here is my output.
>
> $ sudo ./src/powertop --debug --html=/home/ceferron/powertop.1.html
> Loaded 0 prior measurements
> Preparing to take measurements
> Taking 1 measurement(s) for a duration of 20 second(s) each.
> PowerTOP outputing using base filename /home/ceferron/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
>> _______________________________________________
>> PowerTop mailing list
>> PowerTop(a)lists.01.org
>> https://lists.01.org/mailman/listinfo/powertop
>
>
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-26 19:09
0 siblings, 0 replies; 13+ messages in thread
From: @ 2012-06-26 19:09 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 4003 bytes --]
Am Dienstag, 26. Juni 2012, 20:50:04 schrieb Chris Ferron:
> On 06/26/2012 11:42 AM, Chris Ferron wrote:
> > On 06/26/2012 08:10 AM, Jan-Simon Möller wrote:
> >> Hi all!
> >> With git HEAD I see this crash:
> >>
> >> $ ./src/powertop --debug --html=/home/dl9pf/powertop.1.html
> >
> > hum thanks for the trace, but can you give me more info on your system?
openSUSE 11.4 on x86_64 (i7-2)
> > What kernel are you running? Can you send me your kernel config?
$ uname -r
3.5.0-rc4-debug2
$ free
total used free shared buffers cached
Mem: 16442236 9311340 7130896 0 2981216 4891608
-/+ buffers/cache: 1438516 15003720
Swap: 35649528 0 35649528
$ cat /etc/SuSE-release
openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.5/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --
mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-
languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --
with-gxx-include-dir=/usr/include/c++/4.5 --enable-ssp --disable-libssp --
disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE
Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-
system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-
libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.5 --
enable-linux-futex --without-system-libunwind --enable-gold --with-plugin-
ld=/usr/bin/gold --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-
linux
Thread model: posix
gcc version 4.5.3 20110428 [gcc-4_5-branch revision 173117] (SUSE Linux)
$ for i in `grep CONFIG README` ; do echo -n "$i : " ; zcat /proc/config.gz |
grep "$i=y" ; done
CONFIG_NO_HZ : CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS : CONFIG_HIGH_RES_TIMERS=y
CONFIG_HPET_TIMER : CONFIG_HPET_TIMER=y
CONFIG_CPU_FREQ_GOV_ONDEMAND : CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_USB_SUSPEND : CONFIG_USB_SUSPEND=y
CONFIG_SND_AC97_POWER_SAVE : CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_TIMER_STATS : CONFIG_TIMER_STATS=y
CONFIG_PERF_EVENTS : CONFIG_PERF_EVENTS=y
CONFIG_PERF_COUNTERS : CONFIG_TRACEPOINTS : CONFIG_TRACEPOINTS=y
CONFIG_TRACING : CONFIG_TRACING=y
CONFIG_EVENT_POWER_TRACING_DEPRECATED :
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_ACPI_PROCFS_POWER : CONFIG_ACPI_PROCFS_POWER=y
Config attached.
> >
> >
> > and are you modifying power to build on suse in any way?
No change in powertop. Just git clone + ./configure/make/make install
Best,
Jan-Simon
[-- Attachment #2: config.gz --]
[-- Type: application/x-gzip, Size: 33725 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-27 8:06 Sergey Senozhatsky
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2012-06-27 8:06 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
> (i=0x875720, j=0x211)
Hm, it seems pretty unlikely that std::allocator would allocate anything
on such a low address. It rather expected i and j to be somewhere in
-/+ N * sizeof(struct)
range.
So, there is something we don't known about your system, or we have
memory corruption which I can't find at the moment.
-ss
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-27 9:42
0 siblings, 0 replies; 13+ messages in thread
From: @ 2012-06-27 9:42 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
Am Mittwoch, 27. Juni 2012, 10:06:28 schrieb Sergey Senozhatsky:
> > (i=0x875720, j=0x211)
>
> Hm, it seems pretty unlikely that std::allocator would allocate anything
> on such a low address. It rather expected i and j to be somewhere in
> -/+ N * sizeof(struct)
> range.
>
> So, there is something we don't known about your system, or we have
> memory corruption which I can't find at the moment.
Nothing special, just opensuse 11.4 with all updates.
It works fine on the same setup with an i586 kernel/userspace.
I'll look into that a bit more.
Best,
JS
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-27 13:57 Arjan van de Ven
0 siblings, 0 replies; 13+ messages in thread
From: Arjan van de Ven @ 2012-06-27 13:57 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
On 6/27/2012 1:06 AM, Sergey Senozhatsky wrote:
>> (i=0x875720, j=0x211)
>
> Hm, it seems pretty unlikely that std::allocator would allocate anything
> on such a low address. It rather expected i and j to be somewhere in
> -/+ N * sizeof(struct)
> range.
>
> So, there is something we don't known about your system, or we have
> memory corruption which I can't find at the moment.
maybe Jan Simon can run powertop in valgrind to check ?
>
>
> -ss
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-27 16:32 Sergey Senozhatsky
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2012-06-27 16:32 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On (06/27/12 11:42), Jan-Simon Möller wrote:
> > > (i=0x875720, j=0x211)
> >
> > Hm, it seems pretty unlikely that std::allocator would allocate anything
> > on such a low address. It rather expected i and j to be somewhere in
> > -/+ N * sizeof(struct)
> > range.
> >
> > So, there is something we don't known about your system, or we have
> > memory corruption which I can't find at the moment.
>
> Nothing special, just opensuse 11.4 with all updates.
> It works fine on the same setup with an i586 kernel/userspace.
>
> I'll look into that a bit more.
>
Could you please run
valgrind --tool=memcheck --leak-check=full --show-reachable=yes --leak-resolution=high --track-origins=yes -v --log-file=./powertop-memcheck powertop --debug --html=file.html
and provide powertop-memcheck file?
-ss
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-06-27 16:37 Sergey Senozhatsky
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2012-06-27 16:37 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
On (06/27/12 11:42), Jan-Simon Möller wrote:
> Am Mittwoch, 27. Juni 2012, 10:06:28 schrieb Sergey Senozhatsky:
> > > (i=0x875720, j=0x211)
> >
> > Hm, it seems pretty unlikely that std::allocator would allocate anything
> > on such a low address. It rather expected i and j to be somewhere in
> > -/+ N * sizeof(struct)
> > range.
> >
> > So, there is something we don't known about your system, or we have
> > memory corruption which I can't find at the moment.
>
> Nothing special, just opensuse 11.4 with all updates.
> It works fine on the same setup with an i586 kernel/userspace.
>
Ok, speaking on the kernel, I see that you run 3.5-rc2, have you
tried 3.5.0-rc4-01004-gcee4d98?
-ss
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-07-01 13:46
0 siblings, 0 replies; 13+ messages in thread
From: @ 2012-07-01 13:46 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
Am Mittwoch, 27. Juni 2012, 18:32:42 schrieb Sergey Senozhatsky:
>
> Could you please run
>
> valgrind --tool=memcheck --leak-check=full --show-reachable=yes
> --leak-resolution=high --track-origins=yes -v
> --log-file=./powertop-memcheck powertop --debug --html=file.html
>
> and provide powertop-memcheck file?
>
>
> -ss
Attached.
[-- Attachment #2: powertop-memcheck.gz --]
[-- Type: application/x-gzip, Size: 25040 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-07-01 18:13 Sergey Senozhatsky
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2012-07-01 18:13 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]
On (07/01/12 15:46), Jan-Simon Möller wrote:
> Am Mittwoch, 27. Juni 2012, 18:32:42 schrieb Sergey Senozhatsky:
> >
> > Could you please run
> >
> > valgrind --tool=memcheck --leak-check=full --show-reachable=yes
> > --leak-resolution=high --track-origins=yes -v
> > --log-file=./powertop-memcheck powertop --debug --html=file.html
> >
> > and provide powertop-memcheck file?
> >
> >
> > -ss
>
> Attached.
Thanks, I'll take a look.
Meanwhile, could you please try the following patch?
---
src/devlist.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/devlist.cpp b/src/devlist.cpp
index 93f2081..9f06b92 100644
--- a/src/devlist.cpp
+++ b/src/devlist.cpp
@@ -146,11 +146,12 @@ void collect_open_devices(void)
if (!dev)
continue;
dev->pid = strtoull(entry->d_name, NULL, 10);
- strncpy(dev->device, link, 251);
+ strncpy(dev->device, link, 250);
+ dev->device[251] = 0x00;
sprintf(filename, "/proc/%s/comm", entry->d_name);
- strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 31);
+ strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 30);
+ dev->comm[31] = 0x00;
target->push_back(dev);
-
}
}
closedir(dir2);
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-07-01 20:07
0 siblings, 0 replies; 13+ messages in thread
From: @ 2012-07-01 20:07 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]
no change.
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Sergey Senozhatsky <sergey.senozhatsky(a)gmail.com> schrieb:
On (07/01/12 15:46), Jan-Simon Möller wrote:
> Am Mittwoch, 27. Juni 2012, 18:32:42 schrieb Sergey Senozhatsky:
> >
> > Could you please run
> >
> > valgrind --tool=memcheck --leak-check=full --show-reachable=yes
> > --leak-resolution=high --track-origins=yes -v
> > --log-file=./powertop-memcheck powertop --debug --html=file.html
> >
> > and provide powertop-memcheck file?
> >
> >
> > -ss
>
> Attached.
Thanks, I'll take a look.
Meanwhile, could you please try the following patch?
---
src/devlist.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/devlist.cpp b/src/devlist.cpp
index 93f2081..9f06b92 100644
--- a/src/devlist.cpp
+++ b/src/devlist.cpp
@@ -146,11 +146,12 @@ void collect_open_devices(void)
if (!dev)
continue;
dev->pid = strtoull(entry->d_name, NULL, 10);
- strncpy(dev->device, link, 251);
+ strncpy(dev->device, link, 250);
+ dev->device[251] = 0x00;
sprintf(filename, "/proc/%s/comm", entry->d_name);
- strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 31);
+ strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 30);
+ dev->comm[31] = 0x00;
target->push_back(dev);
-
}
}
closedir(dir2);
[-- Attachment #2: attachment.html --]
[-- Type: text/html, Size: 2079 bytes --]
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Powertop] [bugreport] crash on powertop --debug --html=file.html
@ 2012-07-06 9:00 Sergey Senozhatsky
0 siblings, 0 replies; 13+ messages in thread
From: Sergey Senozhatsky @ 2012-07-06 9:00 UTC (permalink / raw)
To: powertop
[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]
Hi,
Could you please give it a try? (just a bunch of suspects).
If it fails, it'd be nice to see valgrind output.
---
src/devlist.cpp | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/devlist.cpp b/src/devlist.cpp
index 93f2081..e65981e 100644
--- a/src/devlist.cpp
+++ b/src/devlist.cpp
@@ -89,7 +89,6 @@ void collect_open_devices(void)
}
target->resize(0);
-
dir = opendir("/proc/");
if (!dir)
return;
@@ -105,7 +104,7 @@ void collect_open_devices(void)
if (strcmp(entry->d_name, "self") == 0)
continue;
- sprintf(filename, "/proc/%s/fd/", entry->d_name);
+ snprintf(filename, 4095, "/proc/%s/fd/", entry->d_name);
dir2 = opendir(filename);
if (!dir2)
@@ -113,12 +112,14 @@ void collect_open_devices(void)
while (1) {
int ret;
struct devuser * dev;
+ std::string comm;
+
entry2 = readdir(dir2);
if (!entry2)
break;
if (entry2->d_name[0] == '.')
continue;
- sprintf(filename, "/proc/%s/fd/%s", entry->d_name, entry2->d_name);
+ snprintf(filename, 4095, "/proc/%s/fd/%s", entry->d_name, entry2->d_name);
memset(link, 0, 4096);
ret = readlink(filename, link, 4095);
if (ret < 0)
@@ -147,10 +148,14 @@ void collect_open_devices(void)
continue;
dev->pid = strtoull(entry->d_name, NULL, 10);
strncpy(dev->device, link, 251);
- sprintf(filename, "/proc/%s/comm", entry->d_name);
- strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 31);
+ dev->device[251] = 0x00;
+ comm = read_sysfs_string("/proc/%s/comm", entry->d_name);
+ if (comm.empty())
+ dev->comm[0] = 0x00;
+ else
+ strncpy(dev->comm, read_sysfs_string("/proc/%s/comm", entry->d_name).c_str(), 31);
+ dev->comm[31] = 0x00;
target->push_back(dev);
-
}
}
closedir(dir2);
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-07-06 9:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 9:00 [Powertop] [bugreport] crash on powertop --debug --html=file.html Sergey Senozhatsky
-- strict thread matches above, loose matches on Subject: below --
2012-07-01 20:07
2012-07-01 18:13 Sergey Senozhatsky
2012-07-01 13:46
2012-06-27 16:37 Sergey Senozhatsky
2012-06-27 16:32 Sergey Senozhatsky
2012-06-27 13:57 Arjan van de Ven
2012-06-27 9:42
2012-06-27 8:06 Sergey Senozhatsky
2012-06-26 19:09
2012-06-26 18:50 Chris Ferron
2012-06-26 18:42 Chris Ferron
2012-06-26 15:10
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.