-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
shadowsocks hangs with stopping #1122
Comments
Changing the encryption to AES-128-GCM made no difference. |
Can anyone else reproduce this? |
Try uninstall and reinstall the app. |
Hi... Tried uninstall and reinstall the app. No change..same problem. Shadowsocks-Android 4.0.3 Tried a Nexus 6 running Android 7.0 and it worked fine. I'll try it on another phone tonight. Any other thoughts? Thanks, ...Karl |
Attach logcat if possible.
|
I tried it on an LG G Flex 2 running android 5.1.1 and it works fine. (Frustrating) |
I also meet this problem when using kcptun on Samsung S6 running android 6.0.1. |
Do you mean that you were using shadowsocks-android with the kcptun plugin? If so, do you have the same problem without using the plugin? Can you disable the kcptun plugin on your android device and try it again? |
Oh, the 4.0.2 ver. runs normally. |
Came across same issue this morning with 4.0.3 and obfs plugin enabled. Solve it by clearing the SS activity. |
貌似开启obfs会出现 |
You've filtered some important information. Try again.
|
Hmm... For now I'm suspecting 8d1f2da is causing this issue. |
@madeye What do you think? This problem looks like a third-party bug where SIGTERM is ignored for some reason. We could add a timeout and do SIGKILL instead but that would raise another problem for terminating plugin processes. Another workaround is to maybe somehow kill |
I think a delay of I think all the latest plugins support detecting the detach or a parent process. So this change would not bring any side effect. |
1 second for each process would add up to 4 seconds for service to shut down if it turns out it's their Android system that has bugged out. If we're really going to take this approach, how about half a sec? Or use a process pool to manage these processes which would involve even more work. Another thing is SIGTERM is always used since Android 7.0 so I assume it's a bug of their ROM. I still think the better solution is |
@Mygod OK, to keep things clean, let's just kill Also, let's see if there are more similar issues after the first stable release pushed to more users. |
I have a new logcat with kcptun. However, uploading the txt file fails with the message "Something went really wrong, and we can’t process that file. Try again.". |
The upload worked from my phone. |
Hi... I just tried the 4.1.0 apk. When I use shadowsocks without any plugins, the change works fine. I can see the delay for the timeout, but it disconnects fine. When I run shadowsocks with the kcptun plugin, it still hangs. The symptoms are slightly different. If I force stop shadowsocks, that disconnects as before. However, previously I could also disconnect by first touching the paper airplane icon, then I could connect to private tunnel with the openvpn app. Shadowsocks would give a dialog box with "Unfortunately shadowsocks has stopped working" I would then click ok and disconnect openvpn. After that, shadowsocks was disconnected again as I desired. Now only the force stop method works (when kcptun is used). Connecting with openvpn does not cause the dialog box and it does not cause shadowsocks to disconnect. If additional logs would be useful, please describe what you would like to see. |
Hi... I have a question. The hanging problem started only with recent shadowsocks-android versions. How did you terminate the background task differently in the past vs how you terminate it now? Thanks, ...Karl |
Try this kcptun: https://dl.dropboxusercontent.com/u/4356689/kcptun-nightly-0.0.4.apk |
With both of your recent apks, shadowsocks starts and stops with and without kcptun. Nice job working around my bad Moto factory ROM. Is the obfuscation plugin and server in working order? Should I set up to try them yet? |
You can also try simple-obfs. It should work now. |
I did some research and unfortunately process group is introduced back in Lollipop. And it seems this bug can be worked around by using Reset already. |
@Mygod It crashed on Android 4.4.
Maybe we'd better not use private API here. |
Hmm, it turns out to be a typo. Fixed via d5d6740. |
@KarlM256 Could you try this APK https://www.dropbox.com/s/p1dvtvq99tig006/shadowsocks-nightly-4.1.0.apk again? |
The latest version looks good. I just installed and tested with shadowsocks alone, with KCP and with OBFS. All three worked. Just to be clear...The previous apk and this one were both named 4.1.0. I did an install and it succeeded, but I can't independently verify the version of my apk. |
@KarlM256 Thanks! The latest one should override the previous one. I think they both works for you now. |
With the new plugin approach, clearly the UDP forwarding option can not work with a plugin because the port number for the plain shadowsocks server is unknown. However I have noticed that SIP connections fail to work without UDP forwarding. I can only try this without using a plugin. That is, unless I use the android client without a plugin and enable UDP forwarding, SIP connections fail. If I enable UPD forwarding and do not use a plugin, SIP connections work. |
From issue #1022, I want to clarify, does shadowsocks do UDP over TCP when UDP forwarding is not selected? |
The UDP port is still the same. The only exception is KCPTUN, which requires a trick here: #1090 (comment)
SIP is a UDP protocol, So, you need to enable UDP forwarding.
Nope, disabling UDP means dropping all UDP packets locally. |
So if UDP forwarding is selected, are the UDP packets sent through the plugin? Are UDP packets obfuscated? What does KCP do with UDP packets? |
All UDP traffic should bypass the SIP003 plugin. |
Wouldn't it make sense to obfuscate UDP traffic as well as TCP? |
No plan for this. |
When using kcptun with incorrect options shadowsocks android hangs on shutdown. I had the u option in the plugin options in android. Testing the connection timed out and shutting down the connection hung, requiring a force stop. |
Configuration
Put an
x
inside the [ ] that applies.What did you do?
Start it. Then Stop it from the green paper airplane icon.
What did you expect to see?
I expected it to stop and be ready to restart.
What did you see instead?
It hung with the orange ring going around the green paper airplane. Text saying shutting down.
VPN icon still in the top android status bar.
I had to force stop the app.
The text was updated successfully, but these errors were encountered: