libnfs-python icon indicating copy to clipboard operation
libnfs-python copied to clipboard

Segmentation fault and other Exceptions in python 3.6.0

Open 2mf opened this issue 8 years ago • 4 comments

I'm getting segfaults in python 3.6.0 but no further exception. I'm looking into that but can you please check that as well.

2mf avatar Feb 12 '17 08:02 2mf

eample:

>>> import libnfs
>>> n = libnfs.NFS('nfs://192.168.0.123/data/')
>>> n.listdir('.')
Segmentation fault
>>> import libnfs
>>> n = libnfs.NFS('nfs://192.168.0.123/data/')
>>> n.open('foobar.txt','w+')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/mf/.pyenv/versions/profile36/lib/python3.6/site-packages/libnfs/__init__.py", line 187, in open
    return NFSFH(self._nfs, path, mode=mode, codec=codec)
  File "/home/mf/.pyenv/versions/profile36/lib/python3.6/site-packages/libnfs/__init__.py", line 81, in __init__
    raise ValueError(_errmsg)
ValueError: open failed: Bad address

2mf avatar Feb 12 '17 09:02 2mf

I had these same errors with python 2.7 under Ubuntu 14.04 using the libnfs1 package. I upgraded to ubuntu 16.04 and libnsf8 package and all works well now.

lie-nielsen avatar May 10 '17 18:05 lie-nielsen

Well, we use debian jessie amd64 with python 2.7.x it works but not with python 3.6.x we face those problems. So we decided to use a kernel mount instead. My guess is that it is a unicode issue in python 3 as of all string are unicode and in python 2 not.

2mf avatar May 10 '17 20:05 2mf

reproduced in mac os with latest code. does not reproduce with ubuntu

jony89 avatar Oct 13 '24 09:10 jony89