-
Notifications
You must be signed in to change notification settings - Fork 608
Too many "out of UDP buffer" msg in log #91
Comments
how large is your mtu set? and how large buffers´? looked in wireshark trace of tap interface? |
MTU is 1500, udpgw-connection-buffer-size is defult. |
It's on android mobile phone, haven't found a way to trace it |
The only reason for "out of UDP buffer" errors should be that the packet buffer is in fact full. This will happen when the UDP socket is blocking packets (i.e. rejecting new ones with EAGAIN/EWOULDBLOCK and not indicating being writable via epoll). If you add some logging to the right parts of the code, it may help understanding what is happening with the buffer. The reason the first packet is not sent immediately is because the send pipeline needs to first request a packet from BufferWriter (send_if), which is asynchronous. The first_job is queued (BPending_Set()) before the send pipeline is initialized, ensuring that it executes after the send pipeline stuff is done, due to LIFO nature of job processing. |
So in some case, the first packet will send out after the second packet because of LIFO job processing? |
I also encountered crashes in BSocksClient.c calling report_error job handler:
In which case would this happen? |
It should not happen. See device_read_handler_send. PacketPassInterface_Done is called before process_device_udp_packet. Which means that the packet processing will be done before the next time that process_device_udp_packet could be called, again due to LIFO processing. |
Regarding _DebugError_job_handler, there seems to be a violation of the requirement that BSocksClient is freed when BSOCKSCLIENT_EVENT_ERROR or BSOCKSCLIENT_EVENT_ERROR_CLOSED is reported. |
In which condition will this happen? For release build, this will cause packets can't be sent out. |
I don't know whether it is related to this issue or not. Just ignore me if I am wrong. On some android devices, when mobile network signal is low, which cause network become unavailable, the udp socket fd sendto() operation will be blocking if the udp fd is not NON_BLOCKING. We found this issue in a signal-shielded room. Maybe you can reproduce the problem in the elevator? |
Hello, I used the shadowsocks version of tun2socks, I have issue with UDP traffic, I saw many error log of UDP, what the cause it may be?
The text was updated successfully, but these errors were encountered: