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
vpnserver stop on CentOS 6.5 hangs sometimes #18
Comments
Hi, You can build from the source code with "make DEBUG=YES" command. |
Hi, Still trying to troubleshoot this issue. As a beginner, couldn't understand gdb too well. I did use strace on the two processes vpnserver creates. On the "second" process that vpnserver creates, when I stop the daemon this is the output of strace: Process 3086 attached - interrupt to quit ... and "nanosleep({0, 25000000}, NULL) = 0" will go on forever, and the process hangs. Will still try and give gdb a chance. I'm hoping this one is a little helpful. If not, apologies for the added noise. |
I encountered the same problem.
And you can see pid 6208 is hung:
Now run "gdb vpnserver" again and attach to pid 6208. There are 30 threads:
Thread 1 is just waiting for other threads to exit but all other threads are blocked in pthread_cont_wait():
I don't think it is critical as eventually they were killed (Workaround). The problem seems to be some kind of timing/race condition. These threads miss the event that tell them to quit gracefully. |
Hi tonychung00, I am a developer of SoftEther VPN. I really want to solve this reported hang problem during the shutdown, however, I have not succeeded to reproduce the problem in our environment with CentOS 6.5. To reproduce the problem in my environment, I need your information.
Could you kindly please upload the above files as a ZIP file via the following HTTPS upload page in "Private Mode" ? After uploaded, post the result URL on this forum. The URL can be accessed by only us, so the pasting the URL is safe. Your cooperation is much appreciated. |
I uploaded the zip file as an sosreport output plus another directory usr/vpnserver and gcc version: |
To reproduce the issue, do this:
Apparently system is kind of idle. This loop is not robust since it depends on thread_count to drop to zero. void FreeThreading()
{
while (true)
{
if (Count(thread_count) == 0)
{
break;
}
SleepThread(25);
} There are 29 threads that is seems to be idle and blocked on pthread_cond_wait(). |
Hi tonychung00, I set up the same environment and have tried to reproduce your hang-up problem of vpnserver process, however I have failed to reproduce the problem. If you don't mind, could you please let me log in to your actual server via ssh to analyze the problem? https://www.softether-upload.com/ PIN: 8931 Make sure to choose the "Private Mode" when you sent a file. After uploaded, post the result URL on this forum. The URL can be accessed by only us, so the pasting the URL is safe. Your cooperation is much appreciated. |
Hi thepoch, I set up the same environment and have tried to reproduce your hang-up problem of vpnserver process, however I have failed to reproduce the problem. If you don't mind, could you please let me log in to your actual server via ssh to analyze the problem? https://www.softether-upload.com/ PIN: 8931 Make sure to choose the "Private Mode" when you sent a file. After uploaded, post the result URL on this forum. The URL can be accessed by only us, so the pasting the URL is safe. Your cooperation is much appreciated. |
Hi @dnobori! |
I was able to reproduce the issue in virtualBox appliances. Every time, I tried power off an VM, it hang for 90 seconds. http://www.softether-upload.com/files/20140702_5f167b8ec8dc1ccf0824c/ Setup an ssh session may take me some time to do it. It may be easier to upload an VM for you to test. Should be less than 1GB. |
Hi everyone, Finally I found a tiny bug in the code which causes the dead lock in the shutting down process of vpnserver. I will release the fixed version in a few days. I thank your appreciation very much. |
New maintainer needed |
@dnobori did you manage to implement a fix, or can you tell us at least what is the cause of the problem ? |
Fixed in #248, which has been merged. I think that this issue can now be closed. |
can we close this issue ? |
I've encountered a situation when stopping vpnserver and it would just hang. Logfile shows that it did shutdown (last line is: "The SoftEther VPN Server Engine has been successfully shutdown."). netstat -lntp shows vpnserver is not listening anymore.
But ps aux still shows the vpnserver process running:
/usr/vpnserver/vpnserver execsvc
/usr/vpnserver/vpnserver execsvc
which is causing my initscript to hang when stopping the service. Any way to debug more?
Starting vpnserver again will add 2 new processes in addition to the old ones remaining. Basically, vpnserver process sometimes doesn't disappear.
The text was updated successfully, but these errors were encountered: