Skip to content

module hangs forever in nfs.open #48

@piti-diablotin

Description

@piti-diablotin

Hi.
Thank you for providing this library.
I am investigating an issue with kodi and my NFS server.
NFS server is ubuntu 22.04 running nfs-kernel-server and /etc/exports is

/media/nfs	192.168.0.0/24(rw,async,all_squash,no_subtree_check,insecure)

I'm using libnfs-pyhton from pip package on ubuntu 22.04 (client)
I try to run the example 1:

import libnfs
nfs = libnfs.NFS('nfs://192.168.0.7:/media/nfs/')
a = nfs.open('/foo-test', mode='w+')
a.write("Test string")
a.close()
print(nfs.open('/foo-test', mode='r').read())

but the code freeze. a keyboard interrupt says

Traceback (most recent call last):
  File "/tmp/toto.py", line 3, in <module>
    a = nfs.open('/foo-test', mode='w+')
  File "/usr/local/lib/python3.10/dist-packages/libnfs/__init__.py", line 187, in open
    return NFSFH(self._nfs, path, mode=mode, codec=codec)
  File "/usr/local/lib/python3.10/dist-packages/libnfs/__init__.py", line 74, in __init__
    _status = nfs_open(self._nfs, path, _mode, self._nfsfh)
KeyboardInterrupt

It seems the libnfs-dev from ubuntu 22.04 is version 4.0.0
Is there any reason why this should not work ?
Do I have to build the libnfs 5.0.0 myself to get it working ?

As a side problem, I am investigating Kodi hanging on when trying to read NFS file. As far as I understood, kodi uses libnfs. And I can reproduce the problem of kodi freezing when trying to read NFS file with the simple example above.

Could give me some hints ?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions