Skip to content
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

Download or upload of large files may be broken: java.net.SocketTimeoutException #164

Closed
ameshkov opened this issue Nov 9, 2015 · 6 comments

Comments

Projects
None yet
1 participant
@ameshkov
Copy link
Member

commented Nov 9, 2015

debug (13).txt

It seems that write timeout is too small?

Look at this (pool-2-thread-201):

21:12:50.979 [pool-2-thread-201] DEBUG com.adguard.android.TcpPacketLog - TCP id=1276 [Packet] [OUT] ESTABLISHED TCP 172.16.16.1:55766 > 94.100.178.248:443 [ACK] seq=664251 ack=134 win=1373 len=4340
21:12:51.022 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:51.551 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:52.203 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:52.573 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:52.807 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:53.038 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:53.593 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:53.757 [pool-2-thread-193] DEBUG com.adguard.commons.io.IoUtils - Write 8192 bytes to /94.100.178.248
21:12:53.989 [pool-2-thread-201] ERROR c.a.a.filtering.commons.LogUtils - TCP id=1276 Error while processing vpn data
java.net.SocketTimeoutException: Socket write timed out
    at com.adguard.commons.io.SocketChannelOutputStream.write(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.vpn.BaseVpnConnection.writeToServer(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.vpn.VpnTcpConnection$2.onReceived(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.lwip.TcpConnectionImpl.tcpReceive(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.lwip.TcpConnectionImpl.tcpProcessEstablished(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.lwip.TcpConnectionImpl.tcpProcess(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.lwip.TcpConnectionImpl.tcpInput(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.vpn.VpnTcpConnection.tcpInputOpened(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.vpn.VpnTcpConnection.addBrowserInputPacket(Unknown Source) ~[na:0.0]
    at com.adguard.android.filtering.vpn.BaseVpnConnection$1.run(Unknown Source) ~[na:0.0]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) ~[na:0.0]
    at java.util.concurrent.FutureTask.run(FutureTask.java:237) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) ~[na:0.0]
    at java.lang.Thread.run(Thread.java:818) ~[na:0.0]

Source:
http://4pda.ru/forum/index.php?s=&showtopic=601691&view=findpost&p=44369258

@ameshkov ameshkov added the Bug label Nov 9, 2015

@ameshkov ameshkov self-assigned this Nov 9, 2015

@ameshkov ameshkov modified the milestones: 2.5, 2.1 patch 2 Nov 9, 2015

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 8, 2015

Increased to 10 seconds.

@ameshkov ameshkov closed this Dec 8, 2015

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 17, 2015

Increased timeout now cause #238

@ameshkov ameshkov reopened this Dec 17, 2015

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 21, 2015

I think I've fixed it in the latest build

@ameshkov ameshkov closed this Dec 21, 2015

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2015

The same issue with download large files (proxy mode):

18:17:13.398 [pool-2-thread-1] DEBUG com.adguard.commons.io.IoUtils - Error while tunnelling traffic
java.net.SocketTimeoutException: Socket write timed out
    at com.adguard.commons.io.SocketChannelOutputStream.write(Unknown Source) ~[na:0.0]
    at org.apache.commons.io.output.ProxyOutputStream.write(Unknown Source) ~[na:0.0]
    at com.adguard.commons.io.IoUtils.tunnel(Unknown Source) ~[na:0.0]
    at com.adguard.filter.proxy.BaseHttpsProxyServer.tunnelConnection(Unknown Source) ~[na:0.0]
    at com.adguard.filter.proxy.BaseHttpsProxyServer.processSslConnection(Unknown Source) ~[na:0.0]
    at com.adguard.filter.proxy.BaseHttpsProxyServer.acceptIncomingConnection(Unknown Source) ~[na:0.0]
    at com.adguard.filter.network.TcpListener.acceptConnection(Unknown Source) ~[na:0.0]
    at com.adguard.filter.network.TcpListener.access$100(Unknown Source) ~[na:0.0]
    at com.adguard.filter.network.TcpListener$2.run(Unknown Source) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) ~[na:0.0]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) ~[na:0.0]
    at java.lang.Thread.run(Thread.java:818) ~[na:0.0]

Ticket ID: XGC-225-22471

@ameshkov ameshkov reopened this Dec 22, 2015

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2015

Test build with write timeout increased to 30 seconds:
https://static.adguard.com/android/release/adguard_issue164.apk

@ameshkov

This comment has been minimized.

Copy link
Member Author

commented Dec 22, 2015

Now it works good

@ameshkov ameshkov closed this Dec 22, 2015

@ameshkov ameshkov changed the title Connection stuck on upload: java.net.SocketTimeoutException: Socket write timed out Download or upload of large files may be broken: java.net.SocketTimeoutException Jan 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.