Giter Club home page Giter Club logo

Comments (13)

hajoscher avatar hajoscher commented on June 19, 2024 1

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:

#https://github.com/hajoscher/zerotier-openwrt/tree/splice-workaround/zerotier

@mwarning would you kindly review this patch and if you agree I could issue a pull request.

from zerotier-openwrt.

adamierymenko avatar adamierymenko commented on June 19, 2024 1

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.

from zerotier-openwrt.

mwarning avatar mwarning commented on June 19, 2024

meh, I thought this commit would have fixed the crash:
zerotier/ZeroTierOne@8302507

No idea so far. It has been working for me..

from zerotier-openwrt.

hajoscher avatar hajoscher commented on June 19, 2024

I tried to track it down, seems like a bug in uclibc++ for a special case in the std::list::splice function:

https://bitbucket.org/nuttx/uclibc/src/de9babae33085a109bd9e6a6f063d67a1c598149/include/uClibc++/list?at=master&fileviewer=file-view-default#list-708

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.

from zerotier-openwrt.

muebau avatar muebau commented on June 19, 2024

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++?

from zerotier-openwrt.

adamierymenko avatar adamierymenko commented on June 19, 2024

The defer queue was kind of ugly so it died. 1.2.0 will do this differently.

from zerotier-openwrt.

adamierymenko avatar adamierymenko commented on June 19, 2024

But I'd do a bug report to uclibc++ for that std::list::splice() bug. That will show up elsewhere.

from zerotier-openwrt.

hajoscher avatar hajoscher commented on June 19, 2024

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.

from zerotier-openwrt.

mwarning avatar mwarning commented on June 19, 2024

@hajoscher nice find find!
@adamierymenko thanks for dropping by and suggesting a fix.

from zerotier-openwrt.

mwarning avatar mwarning commented on June 19, 2024

@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.

from zerotier-openwrt.

mwarning avatar mwarning commented on June 19, 2024

I have upload new release binaries. Let me know if they work for you. Thanks. :-)

from zerotier-openwrt.

mwarning avatar mwarning commented on June 19, 2024

I assume the problem has been fixed and close this issue.

from zerotier-openwrt.

 avatar commented on June 19, 2024

This uclibc++ problem is also mentioned at https://bugs.openwrt.org/index.php?do=details&task_id=1859

from zerotier-openwrt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.