Hi,
has anyone ever run "make check" from nbd against nbdkit with a python
plugin? I usually get segfaults during such a run, and sometimes various
other errors happen before the segfault, suggesting that some memory
corruption is underway.
AFAICS a pure python plugin should not be able to cause memory corruption.
Examples of nbdkit logs for running "make check" or subsets of it from
nbd against nbdkit:
nbdkit -n -f python script=ssd-ftl-wearleveling.py disksize=52428800
nbdkit: python[6]: error: ssd-ftl-wearleveling.py: callback failed: close
nbdkit: python[7]: error: invalid flush request: expecting offset and
length == 0
nbdkit: python[7]: error: write reply: Connection reset by peer
Segmentation fault
nbdkit -n -f python script=ssd-ftl-wearleveling.py disksize=52428800
Fatal Python error: GC object already tracked
Segmentation fault
nbdkit -n -f python script=ssd-ftl-wearleveling.py disksize=52428800
Segmentation fault
nbdkit -n -f python script=ssd-ftl-wearleveling.py disksize=52428800
nbdkit: python[1]: error: invalid flush request: expecting offset and
length == 0
nbdkit: python[1]: error: write reply: Broken pipe
nbdkit: python[3]: error: client sent NBD_OPT_ABORT to abort the connection
nbdkit: python[6]: error: ssd-ftl-wearleveling.py: callback failed: close
Traceback (most recent call last):
File "ssd-ftl-wearleveling.py", line 221, in close
pickle.dump(lbahist, f)
File "/usr/lib/python2.7/pickle.py", line 1370, in dump
Segmentation fault (core dumped)
My close function just dumps the disk image and write access history
with python pickle. It does not have any return statement, and because
of that I seriously doubt that said close function can fail.
I'm now trying to replicate this with example.py. Will report back.
Regards,
Carl-Daniel