All of lore.kernel.org
 help / color / mirror / Atom feed
* [Powertop] close_display() sigsegv
@ 2014-11-18 22:29 Sami Kerola
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Kerola @ 2014-11-18 22:29 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 4143 bytes --]

Hello,

It might be good idea to check before final release if the issue
reported in this email can be reproduced.

$ echo $CC
clang
$ echo $CFLAGS
-O0 -g -ggdb -Wall -Wextra -pedantic -fno-omit-frame-pointer
$ echo $LD
ld.gold

After compiling the version above I always get crash.

$ git describe
v2.7-rc1-1-g959227c

$ ./src/powertop
....
Leaving PowerTOPtimates do 21 measurement(s) connected to battery only
Segmentation fault (core dumped)

It looks like commit 706bc28ff536f4f53fdf6e24178b9e3bac67d53f might
have something to do with the issue.

(gdb) bt full
#0  0x00007f59287ed200 in std::string::compare(std::string const&)
const () from /usr/lib/libstdc++.so.6
No symbol table info available.
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
#1  0x000000000041066d in std::operator< <char,
std::char_traits<char>, std::allocator<char> > (__lhs=, __rhs=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/basic_string.h:2590
No locals.
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
#2  0x000000000040f681 in std::less<std::string>::operator()
(this=0x6c3268 <tab_windows>, __x=, __y=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_function.h:371
No locals.
#3  0x0000000000411817 in std::_Rb_tree<std::string,
std::pair<std::string const, tab_window*>,
std::_Select1st<std::pair<std::string const, tab_window*> >,
std::less<std::string>, std::allocator<std::pair<std::string const,
tab_window*> > >::_M_lower_bound (
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
    this=0x6c3268 <tab_windows>, __x=0x5828990, __y=0x6c3270
<tab_windows+8>, __k=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_tree.h:1261
No locals.
#4  0x00000000004117c1 in std::_Rb_tree<std::string,
std::pair<std::string const, tab_window*>,
std::_Select1st<std::pair<std::string const, tab_window*> >,
std::less<std::string>, std::allocator<std::pair<std::string const,
tab_window*> > >::lower_bound (
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
    this=0x6c3268 <tab_windows>, __k=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_tree.h:927
No locals.
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
#5  0x00000000004107ed in std::map<std::string, tab_window*,
std::less<std::string>, std::allocator<std::pair<std::string const,
tab_window*> > >::lower_bound (this=0x6c3268 <tab_windows>, __x=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_map.h:902
No locals.
Python Exception <class 'gdb.error'> There is no member named _M_dataplus.:
#6  0x000000000040f0a2 in std::map<std::string, tab_window*,
std::less<std::string>, std::allocator<std::pair<std::string const,
tab_window*> > >::operator[] (this=0x6c3268 <tab_windows>, __k=)
    at /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_map.h:496
        __i = {first = <error reading variable>
#7  0x000000000040e03a in close_display () at display.cpp:93
        i = 5
#8  0x0000000000416c2e in clean_shutdown () at main.cpp:378
No locals.
#9  0x0000000000417477 in main (argc=1, argv=0x7fff77810778) at main.cpp:519
        option_index = 0
        c = -1
        filename =
"\210\a\201w\377\177\000\000\b-.)Y\177\000\000\000\000\000\000\000\000\000\000\303Z\355'Y\177\000\000\020\220i\002\000\000\000\000\320\366\200w\377\177\000\000x\a\201w\377\177\000\000e\356\f)Y\177\000\000\350\003\000\000@\000\000\000(a)B\017\000\000\312\232;/proc/net/psched",
'\000' <repeats 2680 times>...
        workload = '\000' <repeats 4095 times>
        iterations = 1
        auto_tune = 0

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-19  1:43 Joe Konno
  0 siblings, 0 replies; 8+ messages in thread
From: Joe Konno @ 2014-11-19  1:43 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 940 bytes --]

The game of whack-a-mole continues. Good find, Sami.

Alex, suggest we revert the errant patch. Memory management as a whole
within the tool deserves (much) more time and focus than a few
band-aids, so I wouldn't be opposed to reverting the entire series (of 5).

On 11/18/2014 02:29 PM, Sami Kerola wrote:
> Hello,
> 
> It might be good idea to check before final release if the issue
> reported in this email can be reproduced.
> 
> $ echo $CC
> clang
> $ echo $CFLAGS
> -O0 -g -ggdb -Wall -Wextra -pedantic -fno-omit-frame-pointer
> $ echo $LD
> ld.gold
> 
> After compiling the version above I always get crash.
> 
> $ git describe
> v2.7-rc1-1-g959227c
> 
> $ ./src/powertop
> ....
> Leaving PowerTOPtimates do 21 measurement(s) connected to battery only
> Segmentation fault (core dumped)
> 
> It looks like commit 706bc28ff536f4f53fdf6e24178b9e3bac67d53f might
> have something to do with the issue.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-20  4:13 Alexandra Yates
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandra Yates @ 2014-11-20  4:13 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 4797 bytes --]

Hi Sami,

> Hello,
>
> It might be good idea to check before final release if the issue
> reported in this email can be reproduced.
>
> $ echo $CC
> clang
> $ echo $CFLAGS
> -O0 -g -ggdb -Wall -Wextra -pedantic -fno-omit-frame-pointer
> $ echo $LD
> ld.gold
>
> After compiling the version above I always get crash.
>
> $ git describe
> v2.7-rc1-1-g959227c
>
> $ ./src/powertop
> ....
> Leaving PowerTOPtimates do 21 measurement(s) connected to battery only
> Segmentation fault (core dumped)
>
> It looks like commit 706bc28ff536f4f53fdf6e24178b9e3bac67d53f might
> have something to do with the issue.
>
> (gdb) bt full
> #0  0x00007f59287ed200 in std::string::compare(std::string const&)
> const () from /usr/lib/libstdc++.so.6
> No symbol table info available.
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> #1  0x000000000041066d in std::operator< <char,
> std::char_traits<char>, std::allocator<char> > (__lhs=, __rhs=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/basic_string.h:2590
> No locals.
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> #2  0x000000000040f681 in std::less<std::string>::operator()
> (this=0x6c3268 <tab_windows>, __x=, __y=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_function.h:371
> No locals.
> #3  0x0000000000411817 in std::_Rb_tree<std::string,
> std::pair<std::string const, tab_window*>,
> std::_Select1st<std::pair<std::string const, tab_window*> >,
> std::less<std::string>, std::allocator<std::pair<std::string const,
> tab_window*> > >::_M_lower_bound (
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
>     this=0x6c3268 <tab_windows>, __x=0x5828990, __y=0x6c3270
> <tab_windows+8>, __k=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_tree.h:1261
> No locals.
> #4  0x00000000004117c1 in std::_Rb_tree<std::string,
> std::pair<std::string const, tab_window*>,
> std::_Select1st<std::pair<std::string const, tab_window*> >,
> std::less<std::string>, std::allocator<std::pair<std::string const,
> tab_window*> > >::lower_bound (
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
>     this=0x6c3268 <tab_windows>, __k=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_tree.h:927
> No locals.
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> #5  0x00000000004107ed in std::map<std::string, tab_window*,
> std::less<std::string>, std::allocator<std::pair<std::string const,
> tab_window*> > >::lower_bound (this=0x6c3268 <tab_windows>, __x=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_map.h:902
> No locals.
> Python Exception <class 'gdb.error'> There is no member named
> _M_dataplus.:
> #6  0x000000000040f0a2 in std::map<std::string, tab_window*,
> std::less<std::string>, std::allocator<std::pair<std::string const,
> tab_window*> > >::operator[] (this=0x6c3268 <tab_windows>, __k=)
>     at
> /usr/bin/../lib64/gcc/x86_64-unknown-linux-gnu/4.9.2/../../../../include/c++/4.9.2/bits/stl_map.h:496
>         __i = {first = <error reading variable>
> #7  0x000000000040e03a in close_display () at display.cpp:93
>         i = 5
> #8  0x0000000000416c2e in clean_shutdown () at main.cpp:378
> No locals.
> #9  0x0000000000417477 in main (argc=1, argv=0x7fff77810778) at
> main.cpp:519
>         option_index = 0
>         c = -1
>         filename =
> "\210\a\201w\377\177\000\000\b-.)Y\177\000\000\000\000\000\000\000\000\000\000\303Z\355'Y\177\000\000\020\220i\002\000\000\000\000\320\366\200w\377\177\000\000x\a\201w\377\177\000\000e\356\f)Y\177\000\000\350\003\000\000@\000\000\000(a)B\017\000\000\312\232;/proc/net/psched",
> '\000' <repeats 2680 times>...
>         workload = '\000' <repeats 4095 times>
>         iterations = 1
>         auto_tune = 0
>
> --
> Sami Kerola
> http://www.iki.fi/kerolasa/
> _______________________________________________
> PowerTop mailing list
> PowerTop(a)lists.01.org
> https://lists.01.org/mailman/listinfo/powertop
>

Thank you for sending this bug report.  Yes I want to get this workout
before the release.

I'm trying to reproduce this error but I cant get it to show me the seg
fault.

Please help me review the steps to compile powertop using clang.

Thank you,
Alexandra.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-20 15:02 Sami Kerola
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Kerola @ 2014-11-20 15:02 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1430 bytes --]

On 20 November 2014 04:13, Alexandra Yates
<alexandra.yates(a)linux.intel.com> wrote:
> Thank you for sending this bug report.  Yes I want to get this workout
> before the release.
>
> I'm trying to reproduce this error but I cant get it to show me the seg
> fault.

Strange.

> Please help me review the steps to compile powertop using clang.

I did not do anything special.

export CC=clang
export CXX=clang++
export CFLAGS='-O0 -g -ggdb -Wall -Wextra -pedantic -fno-omit-frame-pointer'
export LD=ld.gold

I don't think the gold linker has much to do with the bug, but then
again I did not test with the traditional linker so I cannot say it
has no effect.

cd powertop
git checkout master
git clean -xdf
git reset --hard
./autogen.sh && ./configure && make -j3
sudo ./src/powertop
[press  esc quit] -> core

I am archlinux testing repos user, so all packages are pretty fresh
from open source bakers.

$ clang --version
clang version 3.5.0 (tags/RELEASE_350/final)
Target: i386-pc-linux-gnu
Thread model: posix

Just in case you have systemd 'core dropped' message might not appear
after running the command. The easy thing to check is have a look of
journal

journalctl --boot --output=json-pretty SYSLOG_IDENTIFIER=systemd-coredump

The '--boot' option limits the search to the current boot, that is
what everyone usually needs.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-20 19:47 Alexandra Yates
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandra Yates @ 2014-11-20 19:47 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 1730 bytes --]

Hi Sami,

> On 20 November 2014 04:13, Alexandra Yates
> <alexandra.yates(a)linux.intel.com> wrote:
>> Thank you for sending this bug report.  Yes I want to get this workout
>> before the release.
>>
>> I'm trying to reproduce this error but I cant get it to show me the seg
>> fault.
>
> Strange.
>
>> Please help me review the steps to compile powertop using clang.
>
> I did not do anything special.
>
> export CC=clang
> export CXX=clang++
> export CFLAGS='-O0 -g -ggdb -Wall -Wextra -pedantic
> -fno-omit-frame-pointer'
> export LD=ld.gold
>
> I don't think the gold linker has much to do with the bug, but then
> again I did not test with the traditional linker so I cannot say it
> has no effect.
>
> cd powertop
> git checkout master
> git clean -xdf
> git reset --hard
> ./autogen.sh && ./configure && make -j3
> sudo ./src/powertop
> [press  esc quit] -> core
>
> I am archlinux testing repos user, so all packages are pretty fresh
> from open source bakers.
>
> $ clang --version
> clang version 3.5.0 (tags/RELEASE_350/final)
> Target: i386-pc-linux-gnu
> Thread model: posix
>
> Just in case you have systemd 'core dropped' message might not appear
> after running the command. The easy thing to check is have a look of
> journal
>
> journalctl --boot --output=json-pretty SYSLOG_IDENTIFIER=systemd-coredump
>
> The '--boot' option limits the search to the current boot, that is
> what everyone usually needs.
>
> --
> Sami Kerola
> http://www.iki.fi/kerolasa/
>

Followed all steps, in two platforms still cant reproduce.  (Difference)
I'm running Ubuntu.

I will revert the culprit commit.  I would appreciate you testing again.

Thank you,
Alexandra.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-20 21:51 Sami Kerola
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Kerola @ 2014-11-20 21:51 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2081 bytes --]

On 20 November 2014 19:47, Alexandra Yates
<alexandra.yates(a)linux.intel.com> wrote:

Hi Alexandra,

> Followed all steps, in two platforms still cant reproduce.  (Difference)
> I'm running Ubuntu.

I just reproduced the issue with g++, without CFLAGS, or anything in
environment that I could tell would effect to compilation. Backtrace
is pretty similar.

(gdb) bt full
#0  0x000000000040a14e in _M_lower_bound (this=<optimized out>,
__k=<error reading variable: Cannot access memory at address
0xffffffffffffffe8>, __y=0x477368 <tab_windows+8>, __x=0x363e930)
    at /usr/include/c++/4.9.2/bits/stl_tree.h:1260
No locals.
#1  lower_bound (__k=<error reading variable: Cannot access memory at
address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
/usr/include/c++/4.9.2/bits/stl_tree.h:927
No locals.
#2  lower_bound (__x=<error reading variable: Cannot access memory at
address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
/usr/include/c++/4.9.2/bits/stl_map.h:902
No locals.
#3  operator[] (__k=<error reading variable: Cannot access memory at
address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
/usr/include/c++/4.9.2/bits/stl_map.h:496
        __i = <optimized out>
#4  close_display () at display.cpp:93
        i = 5
#5  0x0000000000411e5e in clean_shutdown () at main.cpp:378
No locals.
#6  0x0000000000406d6d in main (argc=1, argv=0x7fff51015798) at main.cpp:519
        option_index = 0
        c = <optimized out>
        iterations = 1
        filename = '\000' <repeats 2928 times>...
        workload = '\000' <repeats 4095 times>
        auto_tune = 0

Maybe comparing my config.log with your will give a hint what could be going on.

http://ut3.org/~kerolasa/config.log.gz

> I will revert the culprit commit.  I would appreciate you testing again.

I think the line below should be removed as well.

main.cpp: In function 'void clean_shutdown()':
main.cpp:378:16: error: 'close_display' was not declared in this scope
  close_display();

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-21  1:06 Alexandra Yates
  0 siblings, 0 replies; 8+ messages in thread
From: Alexandra Yates @ 2014-11-21  1:06 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 2298 bytes --]


> On 20 November 2014 19:47, Alexandra Yates
> <alexandra.yates(a)linux.intel.com> wrote:
>
> Hi Alexandra,
>
>> Followed all steps, in two platforms still cant reproduce.  (Difference)
>> I'm running Ubuntu.
>
> I just reproduced the issue with g++, without CFLAGS, or anything in
> environment that I could tell would effect to compilation. Backtrace
> is pretty similar.
>
> (gdb) bt full
> #0  0x000000000040a14e in _M_lower_bound (this=<optimized out>,
> __k=<error reading variable: Cannot access memory at address
> 0xffffffffffffffe8>, __y=0x477368 <tab_windows+8>, __x=0x363e930)
>     at /usr/include/c++/4.9.2/bits/stl_tree.h:1260
> No locals.
> #1  lower_bound (__k=<error reading variable: Cannot access memory at
> address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
> /usr/include/c++/4.9.2/bits/stl_tree.h:927
> No locals.
> #2  lower_bound (__x=<error reading variable: Cannot access memory at
> address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
> /usr/include/c++/4.9.2/bits/stl_map.h:902
> No locals.
> #3  operator[] (__k=<error reading variable: Cannot access memory at
> address 0xffffffffffffffe8>, this=0x477360 <tab_windows>) at
> /usr/include/c++/4.9.2/bits/stl_map.h:496
>         __i = <optimized out>
> #4  close_display () at display.cpp:93
>         i = 5
> #5  0x0000000000411e5e in clean_shutdown () at main.cpp:378
> No locals.
> #6  0x0000000000406d6d in main (argc=1, argv=0x7fff51015798) at
> main.cpp:519
>         option_index = 0
>         c = <optimized out>
>         iterations = 1
>         filename = '\000' <repeats 2928 times>...
>         workload = '\000' <repeats 4095 times>
>         auto_tune = 0
>
> Maybe comparing my config.log with your will give a hint what could be
> going on.
>
> http://ut3.org/~kerolasa/config.log.gz
>
>> I will revert the culprit commit.  I would appreciate you testing again.
>
> I think the line below should be removed as well.
>

Where you able to test that you issue is resolved without these lines?

> main.cpp: In function 'void clean_shutdown()':
> main.cpp:378:16: error: 'close_display' was not declared in this scope
>   close_display();
>
> --
> Sami Kerola
> http://www.iki.fi/kerolasa/
>



Thank you,
Alexandra.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Powertop] close_display() sigsegv
@ 2014-11-21  6:26 Sami Kerola
  0 siblings, 0 replies; 8+ messages in thread
From: Sami Kerola @ 2014-11-21  6:26 UTC (permalink / raw)
  To: powertop

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

On 21 November 2014 01:06, Alexandra Yates
<alexandra.yates(a)linux.intel.com> wrote:
>>> I will revert the culprit commit.  I would appreciate you testing again.
>>
>> I think the line below should be removed as well.
>
> Where you able to test that you issue is resolved without these lines?

Sorry, I should have told immediately all works when references to
close_display() are removed.

-- 
Sami Kerola
http://www.iki.fi/kerolasa/

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-21  6:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-19  1:43 [Powertop] close_display() sigsegv Joe Konno
  -- strict thread matches above, loose matches on Subject: below --
2014-11-21  6:26 Sami Kerola
2014-11-21  1:06 Alexandra Yates
2014-11-20 21:51 Sami Kerola
2014-11-20 19:47 Alexandra Yates
2014-11-20 15:02 Sami Kerola
2014-11-20  4:13 Alexandra Yates
2014-11-18 22:29 Sami Kerola

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.