[sage-devel] Re: Temporary files problems
https://manpages.ubuntu.com/manpages/bionic/man8/tmpreaper.8.html suggests "As long as there are files present inside a subdirectory, it won't get removed. You can use a non-writable, self-owned file, perhaps named ".tmpreaper", or, if you are su, a file that has the ext2fs *immutable* attribute set, to keep a subdirectory from being deleted." So perhaps we should just create such a file in TMP_DIR_FILENAME_BASE after creating it. On Monday, September 26, 2022 at 7:58:01 PM UTC-7 novo...@gmail.com wrote: > Hello! > > I've run into this while testing upgrades to Ubuntu 22.04 from 20.04, but > it seems that it comes from how temporary files are handled in Sage 9.7: > > TMP_DIR_FILENAME_BASE=tempfile.TemporaryDirectory() > > this temporary directory is created and then used ever after. But what if > it gets deleted? For example, what if someone uses tmpreaper or something > similar, when old files are removed from /tmp? Sage does not notice it, but > things break in a weird way, e.g. plots are not displayed and the error > message is not transparent. > > I believe this is exactly what is happening and I would appreciate some > attention to this matter ;-) > > Thank you! > Andrey > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/1aaefda0-0374-44a1-b1b3-afdf789ad4ccn%40googlegroups.com.
[sage-devel] Re: Temporary files problems
I also have this problem when doing sage: qu = findstat("Permutations", compute_my_brand_new_permutation_statistic); qu St00: a new statistic on Permutations sage: qu.submit() which writes the information for findstat into a temporary file, and then opens a webbrowser to display it. On Tuesday, 27 September 2022 at 06:47:16 UTC+2 novo...@gmail.com wrote: > I think it must be customizable, and also its use should be checked for > errors - if it does not exist anymore, it should be recreated... Public > SageCell servers probably see enough traffic to keep it alive, but people > with private servers are very likely to run into problems, e.g. when their > students are sleeping or pub crawling, all at once ;-) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/640371c4-c270-41da-8c98-b956631cn%40googlegroups.com.
[sage-devel] Re: Temporary files problems
I think it must be customizable, and also its use should be checked for errors - if it does not exist anymore, it should be recreated... Public SageCell servers probably see enough traffic to keep it alive, but people with private servers are very likely to run into problems, e.g. when their students are sleeping or pub crawling, all at once ;-) -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/53ebd0ef-dd25-4324-b2fd-0b44a478c577n%40googlegroups.com.
[sage-devel] Re: Temporary files problems
See also https://ask.sagemath.org/question/64192/temporary-html-files-location-in-sage-97/ — some browsers can't access local files in /tmp from the notebook, so plots do not appear. Perhaps TMP_DIR_FILENAME_BASE could be customizable. Other options? On Monday, September 26, 2022 at 7:58:01 PM UTC-7 novo...@gmail.com wrote: > Hello! > > I've run into this while testing upgrades to Ubuntu 22.04 from 20.04, but > it seems that it comes from how temporary files are handled in Sage 9.7: > > TMP_DIR_FILENAME_BASE=tempfile.TemporaryDirectory() > > this temporary directory is created and then used ever after. But what if > it gets deleted? For example, what if someone uses tmpreaper or something > similar, when old files are removed from /tmp? Sage does not notice it, but > things break in a weird way, e.g. plots are not displayed and the error > message is not transparent. > > I believe this is exactly what is happening and I would appreciate some > attention to this matter ;-) > > Thank you! > Andrey > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/77b4298e-9810-4432-8e4c-22d1934be009n%40googlegroups.com.