[Tinyos-devel] C sf problems
Bart Braem
bart.braem at gmail.com
Wed May 10 02:16:13 PDT 2006
Hello,
I am running sf (CVS 1.x version) to connect to a TelosB mote and it
has serious problems. When running it with a mote connected under
valgrind I get:
$ valgrind ./sf 9001 /dev/ttyUSB0 57600 telos
==26637== Memcheck, a memory error detector.
==26637== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==26637== Using LibVEX rev 1575, a library for dynamic binary translation.
==26637== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==26637== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==26637== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==26637== For more details, rerun with: -v
==26637==
==26637== Conditional jump or move depends on uninitialised value(s)
==26637== at 0x8049A77: serial_source_empty (serialsource.c:437)
==26637== by 0x8049231: main (sf.c:296)
==26637==
==26637== Conditional jump or move depends on uninitialised value(s)
==26637== at 0x8049A8B: serial_source_empty (serialsource.c:437)
==26637== by 0x8049231: main (sf.c:296)
==26637==
==26637== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 13 from 1)
==26637== malloc/free: in use at exit: 1,584 bytes in 1 blocks.
==26637== malloc/free: 1 allocs, 0 frees, 1,584 bytes allocated.
==26637== For counts of detected errors, rerun with: -v
==26637== searching for pointers to 1 not-freed blocks.
==26637== checked 55,508 bytes.
==26637==
==26637== LEAK SUMMARY:
==26637== definitely lost: 0 bytes in 0 blocks.
==26637== possibly lost: 0 bytes in 0 blocks.
==26637== still reachable: 1,584 bytes in 1 blocks.
==26637== suppressed: 0 bytes in 0 blocks.
==26637== Reachable blocks (those to which a pointer was found) are not shown.
==26637== To see them, rerun with: --show-reachable=yes
When running it and unplugging my mote the CPU usage goes up to 100%.
The valgrind output is not nice either:
$ valgrind ./sf 9001 /dev/ttyUSB0 57600 telos
==26651== Memcheck, a memory error detector.
==26651== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==26651== Using LibVEX rev 1575, a library for dynamic binary translation.
==26651== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==26651== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==26651== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==26651== For more details, rerun with: -v
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049A77: serial_source_empty (serialsource.c:437)
==26651== by 0x8049231: main (sf.c:296)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049A8B: serial_source_empty (serialsource.c:437)
==26651== by 0x8049231: main (sf.c:296)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049B1F: read_byte (serialsource.c:473)
==26651== by 0x8049BC9: read_and_process (serialsource.c:516)
==26651== by 0x8049E0D: read_serial_packet (serialsource.c:629)
==26651== by 0x8048F52: check_serial (sf.c:221)
==26651== by 0x80492BE: main (sf.c:307)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049A31: pop_protocol_packet (serialsource.c:415)
==26651== by 0x8049E1D: read_serial_packet (serialsource.c:630)
==26651== by 0x8048F52: check_serial (sf.c:221)
==26651== by 0x80492BE: main (sf.c:307)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049E22: read_serial_packet (serialsource.c:631)
==26651== by 0x8048F52: check_serial (sf.c:221)
==26651== by 0x80492BE: main (sf.c:307)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049A77: serial_source_empty (serialsource.c:437)
==26651== by 0x8049E47: read_serial_packet (serialsource.c:640)
==26651== by 0x8048F52: check_serial (sf.c:221)
==26651== by 0x80492BE: main (sf.c:307)
==26651==
==26651== Conditional jump or move depends on uninitialised value(s)
==26651== at 0x8049A8B: serial_source_empty (serialsource.c:437)
==26651== by 0x8049E47: read_serial_packet (serialsource.c:640)
==26651== by 0x8048F52: check_serial (sf.c:221)
==26651== by 0x80492BE: main (sf.c:307)
==26651==
==26651== More than 100000 total errors detected. I'm not reporting any more.
==26651== Final error counts will be inaccurate. Go fix your program!
==26651== Rerun with --error-limit=no to disable this cutoff. Note
==26651== that errors may occur in your program without prior warning from
==26651== Valgrind, because errors are no longer being displayed.
==26651==
==26651==
==26651== ERROR SUMMARY: 100000 errors from 7 contexts (suppressed: 13 from 1)
==26651== malloc/free: in use at exit: 1,584 bytes in 1 blocks.
==26651== malloc/free: 1 allocs, 0 frees, 1,584 bytes allocated.
==26651== For counts of detected errors, rerun with: -v
==26651== searching for pointers to 1 not-freed blocks.
==26651== checked 55,616 bytes.
==26651==
==26651== LEAK SUMMARY:
==26651== definitely lost: 0 bytes in 0 blocks.
==26651== possibly lost: 0 bytes in 0 blocks.
==26651== still reachable: 1,584 bytes in 1 blocks.
==26651== suppressed: 0 bytes in 0 blocks.
==26651== Reachable blocks (those to which a pointer was found) are not shown.
==26651== To see them, rerun with: --show-reachable=yes
This is the first time I'm using the application but it does not seem
good to me...
Bart
--
"May the source be with you"
More information about the Tinyos-devel
mailing list