Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

native segfaults when SIGIO occurs while booting (in valgrind) #395

Closed
LudwigKnuepfer opened this issue Dec 2, 2013 · 1 comment
Closed
Assignees
Labels
Platform: native Platform: This PR/issue effects the native platform State: duplicate State: The issue/PR is a duplicate of another issue/PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@LudwigKnuepfer
Copy link
Member

Testing:

Employ l2perf from https:/LudwigOrtmann/riot-tools like: echo 'tg 1000 1 1 0' | ./bin/l2perf.elf tap1. While this is running, start the default RIOT project (a few times) until (something like) this happens:

$ valgrind ./bin/default.elf tap0
==27262== Memcheck, a memory error detector
==27262== Copyright (C) 2002-2012, and GNU GPL'd, by Julian Seward et al.
==27262== Using Valgrind-3.8.1 and LibVEX; rerun with -h for copyright info
==27262== Command: ./bin/default.elf tap0
==27262== 
RIOT native interrupts/signals initialized.
RIOT native uart0 initialized.
LED_GREEN_OFF
LED_RED_ON
RIOT native board initialized.
RIOT native hardware initialization complete.

kernel_init(): This is RIOT!
Scheduler...[OK]
kernel_init(): jumping into first task...
==27262== Conditional jump or move depends on uninitialised value(s)
==27262==    at 0x804B0BE: ??? (tramp.S:40)
==27262==    by 0x804A523: native_irq_handler (irq_cpu.c:279)
==27262==    by 0x410109A: makecontext (in /usr/lib32/libc-2.18.so)
==27262== 
==27262== Use of uninitialised value of size 4
==27262==    at 0x80623A8: ???
==27262== 
==27262== 
==27262== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==27262==  Access not within mapped region at address 0x0
==27262==    at 0x1: ???
==27262==    by 0x804A523: native_irq_handler (irq_cpu.c:279)
==27262==    by 0x410109A: makecontext (in /usr/lib32/libc-2.18.so)
==27262==  If you believe this happened as a result of a stack
==27262==  overflow in your program's main thread (unlikely but
==27262==  possible), you can try to increase the size of the
==27262==  main thread stack using the --main-stacksize= flag.
==27262==  The main thread stack size used in this run was 8388608.
==27262== 
==27262== HEAP SUMMARY:
==27262==     in use at exit: 0 bytes in 0 blocks
==27262==   total heap usage: 2 allocs, 2 frees, 104 bytes allocated
==27262== 
==27262== All heap blocks were freed -- no leaks are possible
==27262== 
==27262== For counts of detected and suppressed errors, rerun with: -v
==27262== Use --track-origins=yes to see where uninitialised values come from
==27262== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0)
sh: segmentation fault (core dumped)  valgrind ./bin/default.elf tap0

I was not able to reproduce this either without valgrind or in gdb although I did not try very hard.

@LudwigKnuepfer
Copy link
Member Author

apparently possible without valgrind as well: #498

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: native Platform: This PR/issue effects the native platform State: duplicate State: The issue/PR is a duplicate of another issue/PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

1 participant