-
Notifications
You must be signed in to change notification settings - Fork 55
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
Memory issue with TCP and IPv6 #211
Comments
@joseph-henry Any ideas? Maybe just on how to approach debugging this? This is quite the showstopper for me. |
Instead of an ad-hoc network I tried with a normal network, set up with both IPv4 and IPv6 addresses. Using the assigned ipv6 address gives me the same error, I did not encounter it with ipv4. |
FYI, I am looking at this and can reproduce with some work:
|
bostick
added a commit
that referenced
this issue
Aug 18, 2023
bostick
added a commit
to zerotier/ZeroTierOne
that referenced
this issue
Aug 21, 2023
Part of fix for: zerotier/libzt#211
joseph-henry
added a commit
that referenced
this issue
Aug 21, 2023
Fix #211: Use tcpip_input for IPv6 instead of ethernet_input
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using Java, on Linux with libzt dev branch
I switched from a normal network (using ipv4) to an ad-hoc network which obviously uses ipv6. UDP continued to work (although I'm using a custom wrapper around
ZeroTierNative
, I'm not sure ifZeroTierDatagramSocket
supports ipv6). TCP however is broken with a memory issue.In my actual application (where a lot more is going on, for example UDP traffic), I get one of the following errors within at most 4 TCP connections, usually on the client side.
For testing I adapted the Java example slightly to use an ad hoc network and put both client and server sockets in a loop with nothing else going on (see code at bottom, can share full code if necessary). With that the error is a lot more sporadic, sometimes on the first connection, sometimes after 20 or more. It happens both when multi-threading, or single-threaded where every connection should be properly closed before opening a new one.
I have not tried this yet in other languages, or using ipv6 in a managed network. Reading the log it created didn't help, and the core dump it mentioned is seemingly not generated (I'm not very familiar with this kind of debugging).
Any ideas, any more info you need or tips on debugging this?
Errors
On client side.
An error I got on the server side.
Client and Server
Only changes to libzt java example, + using networkid
ff0000ffff000000
and server's ipv6 address.Server
Client (delay set to 500ms or so when using threads)
The text was updated successfully, but these errors were encountered: