You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For me, ZFSPool.sync intermittently fails with EINVAL. Lately it's been happening almost every time, at least on some servers. The more frequent failures might've been triggered by upgrading from Python 3.8 to 3.9. Using pdb and gdb together shows that when it fails, the pool_name argument passed to lzc_sync is an empty string. However, pdb shows that in the lowest Python stack frame, the pool.name property looks fine. So somehow that property isn't being passed from Python to C correctly. Notably, pool.name is a property, not an instance variable. From experiment, I found that if I eliminate the property access from the sync method then everything works. But I don't know why. Is there a rule against accessing Python properties from Cython code?
I'll open a PR with my fix; I just don't know why it works.
The text was updated successfully, but these errors were encountered:
asomers
added a commit
to asomers/py-libzfs
that referenced
this issue
Jul 14, 2022
Sometimes ZFSPool.sync doesn't pass the pool_name argument to lzc_sync
correctly. lzc_sync sees an empty string. Replacing the self.name
property access with the self.handle instance variable access seems to
fix the problem, though I don't understand why.
Fixestruenas#193
For me,
ZFSPool.sync
intermittently fails withEINVAL
. Lately it's been happening almost every time, at least on some servers. The more frequent failures might've been triggered by upgrading from Python 3.8 to 3.9. Using pdb and gdb together shows that when it fails, thepool_name
argument passed tolzc_sync
is an empty string. However, pdb shows that in the lowest Python stack frame, thepool.name
property looks fine. So somehow that property isn't being passed from Python to C correctly. Notably,pool.name
is a property, not an instance variable. From experiment, I found that if I eliminate the property access from thesync
method then everything works. But I don't know why. Is there a rule against accessing Python properties from Cython code?I'll open a PR with my fix; I just don't know why it works.
The text was updated successfully, but these errors were encountered: