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
[NFS] Implement nfs timeout / advancedsettings #15686
Conversation
jenkins build this please |
xbmc/filesystem/NFSFile.cpp
Outdated
{ | ||
uint32_t timeout = CServiceBroker::GetSettingsComponent()->GetAdvancedSettings()->m_nfsTimeout; | ||
if (~timeout) | ||
nfs_set_timeout(context, timeout); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will break compiling on Ubuntu Xenial (16.04) with enabled nfs support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the version does not support nfs_set_timeout ? If so, do we have the libnfs version somewhere during compile time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nfs_set_timeout
is available since 2.0.0 (sahlberg/libnfs@b01776c)
Ubuntu Xenial (16.04) provides 1.9.8 (https://packages.ubuntu.com/xenial/libnfs-dev)
3019596
to
03fb5fd
Compare
cmake/modules/FindNFS.cmake
Outdated
@@ -34,7 +34,10 @@ find_package_handle_standard_args(NFS | |||
if(NFS_FOUND) | |||
set(NFS_LIBRARIES ${NFS_LIBRARY}) | |||
set(NFS_INCLUDE_DIRS ${NFS_INCLUDE_DIR}) | |||
set(NFS_DEFINITIONS -DHAS_FILESYSTEM_NFS=1) | |||
|
|||
string(REPLACE "." ";" VERSION_LIST ${NFS_VERSION}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows this fails with the following error,
CMake Error at cmake/modules/FindNFS.cmake:38 (string):
string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
cmake/scripts/common/Macros.cmake:366 (find_package)
cmake/scripts/common/Macros.cmake:432 (find_package_with_ver)
CMakeLists.txt:177 (core_optional_dep)
6d567d7
to
711124c
Compare
@Rechi pls. review again, thx! |
Ok, thx for the fix, will add it. |
49cce93
to
186d856
Compare
jenkins build this please |
Any update on this ? |
@peak3d do you want to progress this, close it or put it on the backburner? |
I'll check tomorrow |
Any news on this? |
@peak3d did you ever check this? :) |
Jenkins build this please |
Bump version to untagged commit hash to support features implemented in xbmc#15686
Jenkins build this please |
Bump version to untagged commit hash to support features implemented in xbmc#15686
Bump version to untagged commit hash to support features implemented in xbmc#15686
Bump version to untagged commit hash to support features implemented in xbmc#15686
Jenkins build this please |
1 similar comment
Jenkins build this please |
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
[NFS] Implement nfs timeout / advancedsettings
Description
If NFS mount is configured in Kodi client, but NFS server is down, we currently run into many deadlock situations:
Issue is, that our main thread, ProcessSlow() deadlocks the complete kodi application in that case.
Because of this the NFS timeout is with this PR limited to 5 seconds by default, but can be reconfigured using the advancedsettings (in seconds):
The above examle sets the timeout to 2 sec.
A value of 0 does not set any timeout and NFS waits forever (default behaviour without this PR).
Valid nfstimeout values are between 0 and 3600 seconds.
Motivation and Context
Deadlocks here and there if my NFS server goes into sleep, or if I move with my phone away from home.
How Has This Been Tested?
Types of change