SUMMARY Many parts of system are non-responsive if shares are not available STEPS TO REPRODUCE 1. Connect via VPN to a remote network 2. Mount some samba shares from a server in that network using smb4k 3. Use Dolphin to check correct mounting 4. Disconnect VPN 5. Try to access the shares and/or dolphin and/or smb4k and/or other system services. OBSERVED RESULT Some parts of the system hang completely. I have experienced non-responsive smb4k, non-responsive dolphin and also non-responsive krunner. There are probably more programs that break. ONLY SOLUTION SEEMS TO RESTART THE SYSTEM. For us smb4k is not usable in remote and mobile applications that way. EXPECTED RESULT System remains responsive. I get an error when accessing the unavailable shares or the unavailable shares are dismounted automatically. SOFTWARE/OS VERSIONS Current Stable KDE Neon.
Thank you for reporting this issue. This is a use case I never looked at until now. I need to investigate how this can be implemented, because I do not know if Qt offers the possibility to monitor the state of VPN connections.
I am not sure if this is restricted to VPN connections. I experienced it using VPN but I guess this happens whenever a mounted share's server isn't available. So maybe this is a much more common error handling issue, not a VPN specific issue? BTW this issue does not involve a busy CPU since many other applications keep running fine. It feels like some applications are permanently blocked while accessing the unavailable shares or communicating with a process that is blocked accessing the unavailable shares.
Just experienced a temporary VPN connection loss. Smb4k effectively crashed my open documents and crashed my desktop session. VPN connection was quickly re-established automatically but that didn't help. Is there any chance you can look into that problem soon? We need a working solution for Covid related home-office and currently it looks like we need to abandon smb4k :'-(
Do you by any chance have a backtrace available? This would help debugging the problem.
Until now I tried to figure out what would crash the system, and I was not able to find anything. Just now it came to my mind that maybe the problems you experience are connected to the fact that Smb4K tries to unmount the shares on connection loss and remounts them if the connection is established again. Could that be the case? I can make this behavior configurable. Would you be willing to test a new version and confirm that this fixes the problem?
> Until now I tried to figure out what would crash the system, and I was not > able to find anything. Just now it came to my mind that maybe the problems > you experience are connected to the fact that Smb4K tries to unmount the > shares on connection loss and remounts them if the connection is established > again. Could that be the case? I don't know. Maybe. So you couldn't reproduce the behavior? Did you try without a VPN by disconnecting the computer from the net? (I would like to test this but for the next 2 weeks I can't, since I am not allowed to go to work and I can not connect without VPN). > I can make this behavior configurable. Would you be willing to test a new > version and confirm that this fixes the problem? Of course. Tell me what I need to do. Still I wonder what exactly is the root cause that makes half of the system unresponsive permanently. Even if something is going wrong, it should never permanently block parts of the system, should it? Isn't there some timeout missing? Or some kind of evil busy loop or some kind of dead lock? Why don't I get an error dialog after some time?
Git commit 85141999823ec71eb27a26bffe812bc2c5fe00a7 by Alexander Reinholdt. Committed on 24/03/2020 at 19:50. Pushed by areinholdt into branch 'master'. Remove the automatic unmounting on loss of connection M +13 -16 core/smb4kmounter.cpp https://commits.kde.org/smb4k/85141999823ec71eb27a26bffe812bc2c5fe00a7
Git commit 63c1b7679a6b130b0ca61ef13a7b29a82e9c1818 by Alexander Reinholdt. Committed on 24/03/2020 at 19:51. Pushed by areinholdt into branch '3.0'. Remove the automatic unmounting on loss of connection (cherry picked from commit 85141999823ec71eb27a26bffe812bc2c5fe00a7) M +13 -16 core/smb4kmounter.cpp https://commits.kde.org/smb4k/63c1b7679a6b130b0ca61ef13a7b29a82e9c1818
(In reply to Alexander Reinholdt from comment #4) > Do you by any chance have a backtrace available? This would help debugging > the problem. Maybe "crash" is unprecise. In case of the error all applications that opened remote documents, Dolphin, smb4k and other desktop services get unresponsive permanently so I need to terminate them. Restarting them is futile since they immediately hang again. This makes the system unusable. Logging out and in does not solve the issue. Only system restart does. So I guess a backtrace is not available since the applications end by manual termination or system restart not by SIGSEV or alike.
I removed the automatic unmounting of the shares on loss of connection, because it caused Smb4K to freeze for at least a long time. I could not reproduce the crash, though. Tests were done without VPN, but with a "normal" connection. I would like to provide the new version, so you can test it. Would it be OK, to send the source, or do you need a package? If yes, which type and for which distribution (deb, rpm)?
(In reply to private from comment #9) > (In reply to Alexander Reinholdt from comment #4) > > Do you by any chance have a backtrace available? This would help debugging > > the problem. > > Maybe "crash" is unprecise. In case of the error all applications that > opened remote documents, Dolphin, smb4k and other desktop services get > unresponsive permanently so I need to terminate them. Restarting them is > futile since they immediately hang again. This makes the system unusable. > Logging out and in does not solve the issue. Only system restart does. I'm curious if my fix helps... This sound like it could also be that the mounted share is not reconnected. That would be a system problem then. > So I guess a backtrace is not available since the applications end by manual > termination or system restart not by SIGSEV or alike. OK.
> I would like to provide the new version, so you can test it. Would it be OK, > to send the source, or do you need a package? If yes, which type and for > which distribution (deb, rpm)? KDE Neon. So a DEB would be fine. BTW, is 3.0.3 the latest version?
(In reply to private from comment #12) > KDE Neon. So a DEB would be fine. OK, I'll prepare a package tomorrow morning and send it to you. > BTW, is 3.0.3 the latest version? Yes.
I was unable to send you the DEB package. I was informed that my message was blocked. Could you please send me your e-mail address privately or tell me how you would like to receive the package? Thanks.
Git commit fb305f8642a2f81b33a833c946a2a36c019f84d0 by Alexander Reinholdt. Committed on 12/04/2020 at 09:39. Pushed by areinholdt into branch 'master'. Improve the mount helper. When the system is offline, do not freeze when shares are unmounted. Also, discard all mount attempts in that case. M +49 -24 helpers/smb4kmounthelper.cpp https://commits.kde.org/smb4k/fb305f8642a2f81b33a833c946a2a36c019f84d0
Git commit 0f667151515c482d603d25ea8fa723699022a42c by Alexander Reinholdt. Committed on 12/04/2020 at 09:44. Pushed by areinholdt into branch '3.0'. Improve the mount helper. When the system is offline, do not freeze when shares are unmounted. Also, discard all mount attempts in that case. (cherry picked from commit fb305f8642a2f81b33a833c946a2a36c019f84d0) M +49 -24 helpers/smb4kmounthelper.cpp https://commits.kde.org/smb4k/0f667151515c482d603d25ea8fa723699022a42c
Git commit 560432348befec911869e484a3f04a58e20bc811 by Alexander Reinholdt. Committed on 12/04/2020 at 15:39. Pushed by areinholdt into branch 'master'. Fixed several issues and crashes. The crashes that occurred when remounting shares has been eliminated. The notification of the user after a mount or unmount has been fixed. The unmounting of shares when the system went offline has been fixed. For this to work, you also need the improved mount helper. Fixed hanging of the application in several places. Related: bug 419658, bug 415726 M +277 -198 core/smb4kmounter.cpp M +1 -2 core/smb4kmounter_p.h https://commits.kde.org/smb4k/560432348befec911869e484a3f04a58e20bc811