-
Notifications
You must be signed in to change notification settings - Fork 24
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
Temp file usage causing exceptions and disk storage leaks - Patch attached #289
Comments
This was referenced Apr 12, 2020
Thank you. Can you please create a pull request with the patch? Is the core of the solution to use a directory for the file?
|
Not sure what the actual mechanics are to "create a pull request with the
patch". I'm doing my work on Linux instances in Google Cloud, starting
with an anonymous git clone onto the system, doing the commit to the local
repository, generating a patch from that, then scping it to my Mac where I
can log directly into github. Most of my work with git as a maintainer was
for the kernel, where we lobbed patch files up the line.
I mucked with this for quite a while looking for a clean fix. The key was,
as you say, to use a self-deleting TemporaryDirectory populated with
non-self-deleting temporary files.
/K.
…On Sun, Apr 12, 2020 at 2:08 PM alexandrupaler ***@***.***> wrote:
Thank you. Can you please create a pull request with the patch? Is the
core of the solution to use a directory for the file?
self._tdir = tempfile.TemporaryDirectory()
self.storage = tempfile.NamedTemporaryFile(mode='w',dir=self._tdir.name, delete=False)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#289 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AGNZVF5QP6YWTMLXQOSXQNDRMIUVRANCNFSM4MGRYMLQ>
.
--
Kevin D. KISSELL
Technical Director, HPC and Quantum
Google Cloud Office of the CTO
|
No problem. Thank you again. I created #290 where I applied your patch. |
#290 merge should have solved this issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Cirq bindings and python tests used python tempfile constructs incorrectly, causing exceptions when the deconstructor tries to use the os bindings after the global os object is freed, and one of the test modules simply leaked files. Fixing this cleanly touches several files, though mostly with a simple substiution once the data_storage_interface fix is done. Zipped patch file attached.
0001-Changes-to-temporary-storage-management-to-fix-error.patch.zip
The text was updated successfully, but these errors were encountered: