Created attachment 9948 [details] test program libsmbclient doesn't handle if the connection to the server is terminated. I have attached a test program that demonstrates the issue with an idle disconnect; basically, it does smbc_stat(); sleep(130); smbc_stat(); smbc_stat(). The first and third stat()s succeed, the second fails with ECONNABORTED. It would be nice if libsmbclient could reconnect internally for the second stat(). I have attached the test program, the output and the samba server's conf (note deadtime = 1 to force idle disconnects). Thanks!
Created attachment 9949 [details] test output
Created attachment 9950 [details] samba server conf
This has significant user interface consequences in GNOME: What I see bad behavior in Deja Dup, which is a backup program that can store backups to Windows shares. It runs automatically at night, and if I happen to have mounted the shared drive where it stores stuff before I leave work, I arrive the next morning and see a "software caused connection abort" error message and the backup has failed. I think what's happening is that the server times out, and the connection doesn't recover gracefully. I found this bug report https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1321354 which suggests running a script to look at the gvfs mounts every 5 minutes. This works -- I think it keeps the server from timing out, and my backups are working without an error as long as the script is running. It greatly improves the responsiveness of Nautilus as well. Related: https://bugzilla.gnome.org/show_bug.cgi?id=578139
Ok, I'm merging this one with 11079. That bug has a proposed patch attached. Let's coordinate on that bug report and work though the issues there. Jeremy. *** This bug has been marked as a duplicate of bug 11079 ***