Closed hajoscher closed 8 years ago
meh, I thought this commit would have fixed the crash: https://github.com/zerotier/ZeroTierOne/commit/830250759cd4c14ca2ae5ddf24f0a0427f258622
No idea so far. It has been working for me..
I tried to track it down, seems like a bug in uclibc++ for a special case in the std::list::splice function:
https://git.busybox.net/uClibc++/tree/include/list#n608
previous is not defined if the list has only one element.
As a workaround one could patch node/DeferredPackets.cpp in zerotier to use _q instead of pkt when calling tryDecode and skip the splice. Not sure why this dummy list is needed anyway. Or use push_back and pop instead of splice. Anyway, I'll submit an issue to the author of uclibc++ as well.
Hi, I have problems with seg faults to:
[ 375.300293] [ 375.300293] do_page_fault(): sending SIGSEGV to zerotier-one for invalid write access to 00000004 [ 375.309381] epc = 0040b2b1 in zerotier-one[400000+9c000] [ 375.314965] ra = 0040b273 in zerotier-one[400000+9c000] [ 375.320425] [ 531.892032] [ 531.892032] do_page_fault(): sending SIGSEGV to zerotier-one for invalid write access to 00000004 [ 531.901110] epc = 0040b2b1 in zerotier-one[400000+9c000] [ 531.906795] ra = 0040b273 in zerotier-one[400000+9c000] [ 531.912671]
So most likely because of the same reasons.
Did you got an answer or workaround from uclibc++?
I did not get feedback yet, there is only an email of the author, no issue tracker. But you can try my workaround here, which I am happy with:
@mwarning would you kindly review this patch and if you agree I could issue a pull request.
DeferredPackets is dying in the next version so don't bother. A quick fix would be to edit OneService.cpp and eliminate the two Thread::start()
lines (one after the other) that start background threads. That way everything will just happen in the main thread.
The defer queue was kind of ugly so it died. 1.2.0 will do this differently.
But I'd do a bug report to uclibc++ for that std::list::splice() bug. That will show up elsewhere.
Thank you. Any workaround is temporary anyway, so I am happy with the current patch.
Sure, I did send an email about the bug, since there is no bug tracker. No response however. I will submit one for openwrt directly.
@hajoscher nice find find! @adamierymenko thanks for dropping by and suggesting a fix.
@adamierymenko can you explain how removing both lines will fix the problem? I do not see the connection between between thread and the slice bug.
I have upload new release binaries. Let me know if they work for you. Thanks. :-)
I assume the problem has been fixed and close this issue.
This uclibc++ problem is also mentioned at https://bugs.openwrt.org/index.php?do=details&task_id=1859
Segfault on zerotier 1.1.14
CONFIG_TARGET_ar71xx=y CONFIG_TARGET_ar71xx_generic_WZRHPAG300H=y
Here is some debugger info: