jwmesa412 / i7z

Automatically exported from code.google.com/p/i7z
GNU General Public License v2.0
0 stars 0 forks source link

i7z_GUI segfaults #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using latest head with qt-4.8 i7z_GUI segfaults:

(gdb) bt
#0  Print_Information_Processor (nehalem=0x7fffffffbe48, 
sandy_bridge=0xffffbe4c) at ../helper_functions.c:434
#1  0x00000000004059c3 in MyWidget::MyWidget (this=0x7fffffffc6b0, 
parent=<optimized out>) at i7z_GUI.cpp:464
#2  0x0000000000407c5b in main (argc=1, argv=0x7fffffffca78) at i7z_GUI.cpp:681

(gdb) bt full
#0  Print_Information_Processor (nehalem=0x7fffffffbe48, 
sandy_bridge=0xffffbe4c) at ../helper_functions.c:434
        proc_info = {stepping = 7 '\a', model = 10 '\n', family = 6 '\006', processor_type = 0 '\000', extended_model = 2 '\002', 
          extended_family = 0}
        vendor_string = "GenuineIntel"
#1  0x00000000004059c3 in MyWidget::MyWidget (this=0x7fffffffc6b0, 
parent=<optimized out>) at i7z_GUI.cpp:464
        cpuNehalem = 0
        cpuSandybridge = 0
        i = <optimized out>
        layout1 = <optimized out>
        timer = <optimized out>
        processor_str = "\000\000\000\000\000\000\000\000\270鬪\252*\000\000\001\000\000\000\001\000\000\000\004\000\000\000\000\000\000\000\070\315@\000\000\000\000\000H\255Ҫ\252*\000\000p\311\377\377\377\177\000\000\242Ј\253\252*\000\000\000\000\000\000\000\000\000\000\320\316@\000\000\000\000\000p\311\377\377\377\177\000\000\360\272\377\377\377\177\000\000p\311\377\377"
#2  0x0000000000407c5b in main (argc=1, argv=0x7fffffffca78) at i7z_GUI.cpp:681
        hostname = "paul.ics.kfa-juelich.de\000\000P\240\254\252*\000\000\200\302\377\377\377\177\000\000\020\301|\253\252*\000\000\000\000\200\221\377\377\377\377\000\000\000\000\000\000\000\000@\301|\253\252*\000\000\066\201\253\252\252*\000\000\001\000\000\000\377\177\000\000\240\331q\254\252*\000\000\300\302\377\377\377\177\000\000\360\300|\253\252*\000\000\000\000\200\221\377\377\377\377\000\000\000\000\000\000\000\000\060\301|\253\252*\000\000\066\201\253\252\252*\000\000\001\000\000\000\377\177\000\000\320\324q\254\252*\000\000\000\303\377\377\377\177\000\000\320\300|\253\252*\000\000\000\000\200\221\377\377\377\377\000\000\000\000\000\000\000\000 \301|\253\252*\000\000\066\201\253\252\252*\000\000\001\000\000\000\377\177\000\000\000\320q\254\252*\000\000@\303\377\377\377\177\000\000@g9\000\000\000\000\000\300\070", '\000' <repeats 14 times>, "\020\301|\253\252*\000\000\066\201\253\252\252*\000\000\001\000\000\000\000\000\000\000\230\271#\254\252*\000\000\200\303\377\377\377\177", '\000' <repeats 26 times>"\360, \300|\253\252*"...
        app = {<QCoreApplication> = {<QObject> = {_vptr.QObject = 0x2aaaab7d4910, static staticMetaObject = {d = {superdata = 0x0, 
                  stringdata = 0x2aaaaba9ce60 "QObject", data = 0x2aaaaba9cf00, extradata = 0x2aaaabafae60}}, 
              static staticMetaObjectExtraData = {objects = 0x0, 
                static_metacall = 0x2aaaab9bea40 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, d_ptr = {
                d = 0x40cd20}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x2aaaabaa5400 "Qt", 
                  data = 0x2aaaabaa8d20, extradata = 0x0}}}, static staticMetaObject = {d = {superdata = 0x2aaaabafae40, 
                stringdata = 0x2aaaabaaef20 "QCoreApplication", data = 0x2aaaabaaefc0, extradata = 0x2aaaabafdaa0}}, 
            static staticMetaObjectExtraData = {objects = 0x0, 
              static_metacall = 0x2aaaaba0ab10 <QCoreApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, 
            static self = 0x7fffffffc970}, static staticMetaObject = {d = {superdata = 0x2aaaabafda80, 
              stringdata = 0x2aaaab6269a0 "QApplication", data = 0x2aaaab626be0, extradata = 0x2aaaab7d49c0}}, 
          static staticMetaObjectExtraData = {objects = 0x0, 
            static_metacall = 0x2aaaaaea2340 <QApplication::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}}
        str_display = "i7z @ paul.ics.kfa-juelich.de\000\000\000`\276\377\377\377\177\000\000\a\300 \b\200\240\000\242@\030\201\004E\207\005\064\000\000\000\000\000\000\000\000\300e\257\253\252*\000\000\066\201\253\252\252*\000\000\001\000\000\000\204\fY\020(\306\"\255\252*\000\000\240\276\377\377\377\177\000\000\001\000\242\001 \t\024E ա\b\273o\220\"\000\000\000\000\000\000\000\000\260e\257\253\252*\000\000\066\201\253\252\252*\000\000(\306\"\255\252*\000\000\000\313\"\255\252*\000\000\230\271#\254\252*\000\000\030\060\260\253\252*\000\000\320\324q\254\252*\000\000\000\240k\255\252*\000\000\000\065\260\253\252*\000\000\000\300\"\255\252*\000\000\350\071\260\253\252*\000\000\000\260#\254\252*\000\000\230\331̪\252*", '\000' <repeats 26 times>, "x\340̪\252*\000\000\000\302|\253\252*\000\000\000\000\200\221\377\377\377\377`欪\252*\000\000\023\000\000\000\000\000\000\000\177\235Ҫ\252*\000\000@\304\377\377\377\177\000\000\000\000\240"...
        i7z_widget = {<QWidget> = {<QObject> = {_vptr.QObject = 0x408e30, static staticMetaObject = {d = {superdata = 0x0, 
                  stringdata = 0x2aaaaba9ce60 "QObject", data = 0x2aaaaba9cf00, extradata = 0x2aaaabafae60}}, 
              static staticMetaObjectExtraData = {objects = 0x0, 
                static_metacall = 0x2aaaab9bea40 <QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, d_ptr = {
                d = 0x468140}, static staticQtMetaObject = {d = {superdata = 0x0, stringdata = 0x2aaaabaa5400 "Qt", 
                  data = 0x2aaaabaa8d20, extradata = 0x0}}}, <QPaintDevice> = {_vptr.QPaintDevice = 0x408ff0, painters = 0}, 
            static staticMetaObject = {d = {superdata = 0x2aaaabafae40, stringdata = 0x2aaaab629e80 "QWidget", data = 0x2aaaab62a400, 
                extradata = 0x2aaaab7d6960}}, static staticMetaObjectExtraData = {objects = 0x0, 
              static_metacall = 0x2aaaaaef5170 <QWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, 
            data = 0x468288}, static staticMetaObject = {d = {superdata = 0x40bf20, stringdata = 0x408b30 "MyWidget", data = 0x408ce0, 
              extradata = 0x408b20}}, static staticMetaObjectExtraData = {objects = 0x0, 
            static_metacall = 0x407ac0 <MyWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)>}, C0_l = {0x2aaaab8997ac, 
            0x2aaaae147b18, 0x7fffffffc837, 0x7fffffffc838, 0x2aaaaaab4744, 0x7fffffffc837, 0x2, 0x25, 0x2aaaae147768, 0x4122e989, 
            0x2aaaaaab501e, 0x2aaaaba2657a}, C1_l = {0x2aaa00000009, 0x7fffffffc8f0, 0x1048ba6, 0x2aaaab85c82c, 0x2aaaab818200, 
            0x2aaaabaf7540, 0x2aaaab821998, 0x100000000, 0x2aaaaaab4824, 0x0, 0x6, 0x25}, C3_l = {0x2aaaae147768, 0xf63d4e2e, 
            0x2aaaaaab501e, 0x100000000, 0x10000002e, 0x7fffffffc970, 0x3d8f538, 0x2aaaac23fa9c, 0x2aaaac23fc90, 0x0, 0x2aaaac24bd38, 
            0x2aaaaaace660}, C6_l = {0x2aaaaaab5303, 0x0, 0x2aaaae1478c0, 0x2aaaac23b000, 0x400ee9, 0x2aaaac24c8f0, 0x400258, 
            0x100000000, 0x100000807, 0x2aaaac5d81c0, 0x2aaaaacce608, 0x7fffffffc9b0}, C0 = 0xf63d4e2e, C1 = 0x2aaaae1478c0, 
          C3 = 0x7fffffffc9d8, C6 = 0x2aaaaacce2b0, Freq_ = {0x2aaaaaab5303, 0x0, 0x2aaaae1478c0, 0x1, 0x0, 0x1, 0x2aaaaacce2b0, 
            0x2aaaabaf75c0, 0x4, 0x40cc40, 0x1, 0x2}, StatusMessage0 = 0x2aaaab6cf420, StatusMessage1 = 0x0, Curr_Freq0 = 0x2aaaaacce608, 
          Curr_Freq1 = 0x100000028, ProcNames = {0x2aaaab8b6501, 0x2aaaab6cf3a0, 0x400ee9, 0x3, 0x2aaaab8b696c, 0x7fffffffc9a8, 0x40cbf1, 
            0x2aaaab6cf340, 0x407d20, 0x0, 0x402dab, 0x2aaaac24bd38}, mythread = 0x407d50, curr_numCPUs = 2}

Original issue reported on code.google.com by ju.leche...@googlemail.com on 12 Mar 2012 at 12:26

GoogleCodeExporter commented 8 years ago
processor   : 7
vendor_id   : GenuineIntel
cpu family  : 6
model       : 42
model name  : Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
stepping    : 7
microcode   : 0x25
cpu MHz     : 1600.000
cache size  : 8192 KB
physical id : 0
siblings    : 8
core id     : 3
cpu cores   : 4
apicid      : 7
initial apicid  : 7
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes

Original comment by ju.leche...@googlemail.com on 12 Mar 2012 at 12:35

GoogleCodeExporter commented 8 years ago
Plain cli works fine.

Downstream report is

https://bugs.gentoo.org/show_bug.cgi?id=407881

Original comment by ju.leche...@googlemail.com on 12 Mar 2012 at 12:35

GoogleCodeExporter commented 8 years ago
Hi Justin

thanks for the report. 

looks like optimization flags strike again: 
http://code.google.com/p/i7z/issues/detail?id=43

i had to disable two more flags these times, the updated makefile is in the svn 
-fno-inline-small-functions and -fno-caller-saves

also it seems that qt4 .pro configuration: if CONFIG = release or if the 
optimization flags are other than -O1, GUI doesn't show the C0 states (first 
column), but the frequencies are printed correctly.

i am looking into at what is causing this to happen. 

Original comment by abhirana on 12 Mar 2012 at 11:02

GoogleCodeExporter commented 8 years ago
#0  Print_Information_Processor (nehalem=0x7fffffffbe48, 
sandy_bridge=0xffffbe4c) at ../helper_functions.c:434

This looks like the pointer sandy_bridge was truncated. This may be caused by 
the faulty cpuid-Implementation:

static inline void cpuid (unsigned int info, unsigned int *eax, unsigned int 
*ebx,
                          unsigned int *ecx, unsigned int *edx)
{
    unsigned int _eax = info, _ebx, _ecx, _edx;
    asm volatile ("mov %%ebx, %%edi;" // save ebx (for PIC)
                  "cpuid;"
                  "mov %%ebx, %%esi;" // pass to caller
                  "mov %%edi, %%ebx;" // restore ebx
                  :"+a" (_eax), "=S" (_ebx), "=c" (_ecx), "=d" (_edx)
                  :      /* inputs: eax is handled above */
                  :"edi" /* clobbers: we hit edi directly */);

This code will reset the upper half of rbx to zero, but since ebx is not listed 
as either output or clobber (and can't with PIC), the compiler won't know about 
it. Since rbx must be preserved across function calls, this might lead to the 
observed truncation, if the compiler decides to put the pointer into that 
register.

Original comment by thetruec...@gmx.net on 20 Jun 2013 at 1:27