-
Notifications
You must be signed in to change notification settings - Fork 2.1k
native uart0 crashes when no real terminal is attached #270
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
Comments
You cant safely read input from a file at the moment, the upcoming #161 resolving PR changes that. |
Although file input is still not properly supported (seems to work a bit though), this should fix the segfault. |
It's not really file input, the file is empty (should rather have used /dev/null), but that was the only way I could get to run it in gdb,
also triggers the issue, but gdb immediately exits afterwards.
allows you to get the backtrace from above. |
I can't reproduce this with default-native. |
Sorry, I can, but only with |
Sorry, again, I've got the error now ;-) |
OK, the remaining error is indeed due to file io not being supported, I've added preliminary support for EOF in the PR. |
By the way - why are you using uart in the first place if you are not using it? |
It's required by sixlowpan because of bordermultiplex.c/border.c |
Well with that it will shutdown straight away, that's not very desirable. It doesn't even allow the application to free it's resources, leaving the tap devices in a busy state.
output in log.txt is
|
I guess whether a shutdown is desired is arguable... One case I had in mind was scripting shell commands. |
I updated the PR according to your use case as you're probably the only user of this feature at the moment. |
fixed by RIOT-OS/boards#34 |
test/border_router: fixed with the new modifications
A native RIOT process crashes when can't access real terminal input, e.g. when running it in the background and redirecting the output with
>
running in gdb produces
Executing the executable in a normal terminal works without issues. (And doesn't spew all the _native_set_uart_fds_native_lpm_sleep: returned: 1 - logging the output just for a few seconds causes several MB of those when compiling with -DENABLE_DEBUG)
The text was updated successfully, but these errors were encountered: