-
Notifications
You must be signed in to change notification settings - Fork 188
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
Stray .nfs file preventing deletion of waveforms extension folder #3348
Comments
What is the |
It is probably in the recording and sorting that keeps a reference file handle. Probably related to: |
Added the traceback :) |
Also the same issue happens if I load sorting output from mountainsort5, so I don't think it's related to KS4 as being discussed in #3295. |
What is the actually context of this use (ie I could imagine recomputing waveforms later, but why do compute(waveforms) compute(waveforms) twice in a row?)? Does the error still happen if you do: analyzer.compute(['random_spikes', 'waveforms', 'templates']) The waveforms file could be left open I guess during writing, so I'm wondering if computing another extensions right after waveforms ensures the file is closed. |
it seems that the memmap for writing the waveforms is open but I haven't found an explicit close yet? But I think @samuelgarcia or @alejoe91 know this part of the code base the best to know if the close is located somewhere else. But maybe this is causing your specific problem. |
The context is, I'm developing code about the analyzer extensions and sometimes just end up running the same code twice :p The MRE just reproduces it for me, it isn't necessarily how one would come across it in the wild. And no, I've encountered this error with a large list of extensions being computed after waveforms. If I compute the extensions once, then restart the kernel and reload the analyzer, I can get away with an initial re-compute of waveforms with no errors. But then on the second try of a given kernel there's usually an error, although sometimes it also takes until the third run (??). |
Would you be willing to try the same with zarr. the |
Yup, you're exactly right. It works as expected with zarr, no OSError. |
Okay, then I think we would need to close the memmap to fix that, but I think the general idea would be we create the memmap and leave it open so you can use the waveforms for other extensions without needing to reopen it./reload the data So I'm not sure if/when we could do that. We will just have to wait to see what Alessio and Sam think for this. |
Thanls for reporting and investigating. |
Hi all — I'm on a Linux / NFS system (CentOS 7 specifically, on my school's HPCC), and I encounter an OSError every time I try to re-compute the waveforms extension of a sorting analyzer. The core problem is that there's a stray .nfs temporary file hanging out in the waveforms folder. If I do
ls -a [that folder]
I can see it clearly, it's always something like.nfs9eb83351caf602ec00005734
.I can see that it's python using the file with
lsof
:and if I call
kill
on that process, my notebook's kernel crashes, so I'm pretty sure it's coming from spikeinterface.The offending function is at
/spikeinterface/core/sortinganalyzer.py:2090
:shutil.rmtree(extension_folder)
.Traceback
MRE:
Not sure how to go about debugging this but any advice is welcome. This is v0.101.0. Thanks!
The text was updated successfully, but these errors were encountered: