Content-Type: multipart/mixed; boundary="===============1311594807081749018==" MIME-Version: 1.0 From: =?utf-8?q?Jan-Simon_M=C3=B6ller_=3Cdl9pf_at_gmx=2Ede=3E?= Subject: [Powertop] [bugreport] crash on powertop --debug --html=file.html Date: Tue, 26 Jun 2012 17:10:44 +0200 Message-ID: <201206261710.45309.dl9pf@gmx.de> To: powertop@lists.01.org List-ID: --===============1311594807081749018== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi all! With git HEAD I see this crash: $ ./src/powertop --debug --html=3D/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 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: ... 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=3D/home/dl9pf/powertop.1.html'. Program terminated with signal 11, Segmentation fault. #0 0x000000000041f1dc in devlist_sort (i=3D0x875720, j=3D0x211) at = devlist.cpp:273 273 if (i->pid !=3D j->pid) (gdb) bt full #0 0x000000000041f1dc in devlist_sort (i=3D0x875720, j=3D0x211) at = devlist.cpp:273 No locals. #1 0x00000000004218b8 in = std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator > root(a)aragorn: = /home/dl9pf/user/git/LF/powertop = = [17:03] = __val =3D 0x875720 __next =3D {_M_current =3D 0x889288} #2 0x0000000000421071 in = std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator > >, bool (*)(devuser*, = devuser*)> (__first=3D..., __last=3D..., __comp=3D0x41f1c2 ) at /usr/include/c++/4.5/bits/stl_algo.h:2160 __i =3D {_M_current =3D 0x889318} #3 0x0000000000420358 in = std::__final_insertion_sort<__gnu_cxx::__normal_iterator > >, bool (*)(devuser*, = devuser*)> (__first=3D..., __last=3D..., __comp=3D0x41f1c2 ) at /usr/include/c++/4.5/bits/stl_algo.h:2193 No locals. #4 0x000000000041f948 in std::sort<__gnu_cxx::__normal_iterator > >, bool (*)(devuser*, = devuser*)> (__first=3D..., __last=3D..., __comp=3D0x41f1c2 ) 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 =3D 0x68edc0 i =3D 0 prev =3D = "\000_Y=3D\377\177\000\000\000\000\000\000\000\000\000\000\240_Y=3D\377\177= \000\000@\332h\000\000\000\000\000\240\332h\000\000\000\000\000P\241\206", = '\000' , = "\020\362h\000\000\000\000\000\360_Y=3D\377\177\000\000&\203@\000\000\000\0= 00\000\360_Y=3D\377\177\000\000EKh\201x\230Y@\240\332h\000\000\000\000\000@= \332h\000\000\000\000" proc =3D = "\200\360h\000\000\000\000\000\001\000\000\000\000\000\000\000\350bU\001\00= 0\000\000\000\340bU\001\000\000\000\000\020_Y=3D\377\177\000\000\020\320<\3= 57\177\177\000\000\061\000\000\000\000\000\000\000\250\332h\000\000\000\000= \000(a)_Y=3D\377\177\000\000\224\201@\000\000\000\000\000h_Y=3D\377\177\000= \000\000\000\000\000\000\000\000\000 = 0,0%\000kts/s\000\000\000\000\240_Y=3D\377\177\000\000T\016D\000\000\000\00= 0" #6 0x0000000000454a9b in one_measurement (seconds=3D20, workload=3D0x7fff3= d5960a0 = "") at main.cpp:223 tmp =3D 0 #7 0x0000000000454d81 in report (time=3D20, workload=3D0x7fff3d5960a0 "", = iterations=3D1, file=3D0x7fff3d5970a0 "/home/dl9pf/powertop.1.html") at main.cpp:274 i =3D 0 #8 0x0000000000455287 in main (argc=3D3, argv=3D0x7fff3d5981a8) at main.cp= p:434 option_index =3D 4 c =3D -1 wantreport =3D true iterations =3D 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() =3D=3D 0) return; = - sort(target->begin(), target->end(), devlist_sort); +// sort(target->begin(), target->end(), devlist_sort); = if (reporttype) { fprintf(reportout.http_report,"

Process device = activity

\n \n"); Looks like something is fishy in the sort for this case. Best, Jan-Simon --===============1311594807081749018==--