Hi!

On 12/24/10 17:02, Arjan van de Ven wrote:
> On 12/24/2010 7:54 AM, Michael Riepe wrote:
>>
>> On 12/24/10 15:32, Arjan van de Ven wrote:
>>> On 12/24/2010 12:12 AM, Andreas Mohr wrote:
>>>> Hi,
>>>>
>>>> On Thu, Dec 23, 2010 at 07:07:39PM -0800, Arjan van de Ven wrote:
>>>>> I'd like to ask everyone who's interested to give it a spin and give
>>>>> feedback on how you like the new design,
>>>> I don't like it since I cannot even see it ;)
>> Well, I did get it compiled (with headers from 2.6.35), but then the
>> binary reported "nl80211 not found" (twice) and crashed with a SIGSEGV.
>> Maybe because I did it on a desktop PC without any wireless interfaces?
> 
> can you run it in gdb to get a backtrace?
> 
> (and can you tell us what kernel version you are running)

Of course. Here's the output, including the backtrace:

--- cut here ---
nl80211 not found.
                  nl80211 not found.

Program received signal SIGSEGV, Segmentation fault.
0xf7c9b42f in ____strtol_l_internal () from /lib/libc.so.6
(gdb) bt
#0  0xf7c9b42f in ____strtol_l_internal () from /lib/libc.so.6
#1  0xf7c9b1e0 in strtol () from /lib/libc.so.6
#2  0x0804cc5a in atoi (n=<value optimized out>, buf=0xffffce3c " ")
    at /usr/include/stdlib.h:286
#3  fmt_prefix (n=<value optimized out>, buf=0xffffce3c " ") at lib.cpp:312
#4  0x0804cd81 in format_watts (W=-nan(0x8000000000000),
buffer=0xffffceac "",
    len=11) at lib.cpp:247
#5  0x08066cfa in report_devices () at devices/device.cpp:158
#6  0x0804ed52 in one_measurement (seconds=1) at main.cpp:141
#7  0x0804f011 in main (argc=1, argv=0xffffd104) at main.cpp:241
--- cut here ---

Kernel is 2.6.35 (x86_64), glibc 2.12.2, gcc 4.5.1.

User space is 32 bit, but that doesn't make a difference - a 64-bit
version of the program behaves exactly the same:

--- cut here ---
nl80211 not found.
                  nl80211 not found.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6623665 in ____strtoll_l_internal () from /lib64/libc.so.6
(gdb) bt
#0  0x00007ffff6623665 in ____strtoll_l_internal () from /lib64/libc.so.6
#1  0x0000000000405efc in atoi (n=<value optimized out>,
    buf=0x7fffffffdc90 " .00 ") at /usr/x86_64-linux/include/stdlib.h:286
#2  fmt_prefix (n=<value optimized out>, buf=0x7fffffffdc90 " .00 ")
    at lib.cpp:312
#3  0x0000000000406035 in format_watts (W=<value optimized out>,
    buffer=0x7fffffffdcf0 "", len=11) at lib.cpp:247
#4  0x000000000041f62c in report_devices () at devices/device.cpp:158
#5  0x0000000000407f93 in one_measurement (seconds=<value optimized out>)
    at main.cpp:141
#6  0x000000000040820e in main (argc=<value optimized out>,
    argv=0x7fffffffdf78) at main.cpp:241
--- cut here ---

The offending instruction is

        omag = atoi(strchr(tmpbuf, 'e') + 1);

in lib.cpp, line 312. I suppose the strchr() returns NULL. Syslog
reports (for the 32-bit version running without gdb):

powertop[29973]: segfault at 1 ip 00000000f73d842f sp 00000000ffd0d9f0
error 4 in libc-2.12.2.so[f73a9000+159000]

-- 
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little
_______________________________________________
Discuss mailing list
[email protected]
http://lists.lesswatts.org/listinfo/discuss

Reply via email to