From 4b8d258cff85678c7ac90c03e337f9316e1f7b98 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 15:09:55 +0100 Subject: lib/nfs/Connection: fix crash while canceling a failing Open() The method NfsConnection::CancellableCallback::Callback() will always invoke NfsConnection::Close() on the file handle, even if the void pointer is not a nfsfh. This can happen if the Open() was not successful, e.g. when the file does not exist. --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index b40023771..c1f967b74 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.19.7 (not yet released) +* input + - nfs: fix crash while canceling a failing file open operation * playlist - don't skip non-existent songs in "listplaylist" * fix memory allocator bug on Windows -- cgit v1.2.3 From a543627abd19f321ddd4259e222e6437e8312417 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 15:56:53 +0100 Subject: lib/nfs/Connection: fix memory leak (and assertion failure) nfs_destroy_context() will invoke all pending callbacks with err==-EINTR. In CancellableCallback::Callback(), this will invoke NfsConnection::DeferClose(), which however is only designed to be called from nfs_service(). In non-debug mode, this will leak memory because nfs_close_async() is never called. Workaround: before nfs_destroy_context(), invoke nfs_close_async() on all pending file handles. --- NEWS | 1 + 1 file changed, 1 insertion(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index c1f967b74..6e83245c4 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,7 @@ ver 0.19.7 (not yet released) * input - nfs: fix crash while canceling a failing file open operation + - nfs: fix memory leak on connection failure * playlist - don't skip non-existent songs in "listplaylist" * fix memory allocator bug on Windows -- cgit v1.2.3 From 02563a35f0ce4bb5154a68bd568d0263c76ec261 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 22:48:46 +0100 Subject: lib/nfs/Connection: fix reconnect after mount failure When mounting had not yet finished, SocketMonitor::IsDefined() was always false, due to the workaround at the beginning of the function that calls SocketMonitor::Steal(). This commit drops the IsDefined() check because it was never necessary and breaks reconnect. --- NEWS | 1 + 1 file changed, 1 insertion(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index 6e83245c4..d20dba397 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,7 @@ ver 0.19.7 (not yet released) * input - nfs: fix crash while canceling a failing file open operation - nfs: fix memory leak on connection failure + - nfs: fix reconnect after mount failure * playlist - don't skip non-existent songs in "listplaylist" * fix memory allocator bug on Windows -- cgit v1.2.3 From 82da364b8b9c6073e4af58cddc85357674a1a2e5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 23:27:57 +0100 Subject: lib/nfs/Connection: implement mount timeout --- NEWS | 1 + 1 file changed, 1 insertion(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index d20dba397..c84f4b891 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ ver 0.19.7 (not yet released) - nfs: fix crash while canceling a failing file open operation - nfs: fix memory leak on connection failure - nfs: fix reconnect after mount failure + - nfs: implement mount timeout (60 seconds) * playlist - don't skip non-existent songs in "listplaylist" * fix memory allocator bug on Windows -- cgit v1.2.3 From a48704925d6c3e5c01057192403e55f3663b315c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 14 Dec 2014 21:16:34 +0100 Subject: storage/nfs: add timeout --- NEWS | 2 ++ 1 file changed, 2 insertions(+) (limited to 'NEWS') diff --git a/NEWS b/NEWS index c84f4b891..34ab55db9 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,8 @@ ver 0.19.7 (not yet released) - nfs: fix memory leak on connection failure - nfs: fix reconnect after mount failure - nfs: implement mount timeout (60 seconds) +* storage + - nfs: implement I/O timeout (60 seconds) * playlist - don't skip non-existent songs in "listplaylist" * fix memory allocator bug on Windows -- cgit v1.2.3