silent failure of bin/tahoe when root partition is out of space? #1279
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1279
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Kiba on IRC reported that after following quickstart.html from a darcs checkout,
bin/tahoe
printed nothing for any command (includingbin/tahoe --version-and-path
). Our theory is that this is due to lack of space on the root partition. The output ofpython2 -v bin/tahoe --version-and-path
included some warnings that .pyc files could not be generated (presumably due to lack of space).Attachment output.txt (7003 bytes) added
Output of 'python2 -v bin/tahoe --version-and-path' on Kiba's ArchLinux system
It's not clear whether Tahoe code is responsible, or one of our dependencies, or whether Python in general fails silently in low disk space situations.
The earliest we can print a warning without major contortions would be in source:src/allmydata/init.py. It would be best to import as little as possible before doing the check, which we could do by moving
fileutil.get_disk_stats
andget_available_space
into their own file (since source:src/allmydata/util/fileutil.py imports code from twisted and pycryptopp). If we apply the patch on #1274, then we can check disk space without importing pywin32 on Windows.OTOH, without knowing precisely what fails, we don't know which path to check. We could check the partition containing
allmydata.*file*
, and/or the one containingsys.executable
, I suppose.Replying to davidsarah:
I should have read output.txt more carefully. It must be Python, since the failure occurs before any Tahoe code or dependencies have been imported.
That means we can't fix this in Tahoe.
I guess the right thing to do is open a bug report with http://bugs.python.org and cross-link with this ticket...
Actually, if the problem is triggered by
python
's failed attempt to write.pyc
files, then perhaps we could work-around the problem by setting the blessedPYTHONDONTWRITEBYTECODE=1
environment variable, or passing the equivalent-B
option topython
(only available inpython >= 2.6
).Kiba: could you please run your filesystem out of space again and reproduce this problem after setting
PYTHONDONTWRITEBYTECODE=1
?We should consider using that setting for other reasons -- stale
.pyc
files that are left behind when their.py
file has been mv'ed or rm'ed are a source of confusion, and the.pyc
files can contain file locations which are stale because the.pyc
and.py
were both moved since the.pyc
was generated. Also, the presence of.pyc
's might encourage someone to delete or omit the corresponding.py
's, thus making it harder for people to get access to the running source code. Finally, the time spent to write.pyc
files is a performance penalty for startup. I wouldn't be surprised ifPYTHONDONTWRITEBYTECODE=1
doesn't improve startup performance even when.pyc
files are already present, too.See also #871 which is more about what happens when the disk fills up after the server has started.