-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Investigate test-fs-readfile-tostring-fail failures on FreeBSD #43833
Comments
FWIW It looks like this first appeared in https://ci.nodejs.org/job/node-test-commit-freebsd/nodes=freebsd12-x64/44906/ which was 21 hours ago. The next job, https://ci.nodejs.org/job/node-test-commit-freebsd/nodes=freebsd12-x64/44907/ ran and passed on test-digitalocean-freebsd12-x64-2 but then all subsequent runs on test-digitalocean-freebsd12-x64-2 have failed this test. So this could be a very recent regression (but then I can't explain why it's not showing up on test-digitalocean-freebsd12-x64-1). |
Just hit this. On the face of it, the failure looks impossible (reading a string bigger than V8 allows) so there's probably something else going on. I don't know how easy it is to run a single pummel test but it'd be interesting to see what this prints: diff --git a/test/pummel/test-fs-readfile-tostring-fail.js b/test/pummel/test-fs-readfile-tostring-fail.js
index 1a1e7d62175..e49ec2d880e 100644
--- a/test/pummel/test-fs-readfile-tostring-fail.js
+++ b/test/pummel/test-fs-readfile-tostring-fail.js
@@ -33,6 +33,7 @@ for (let i = 0; i < 201; i++) {
stream.end();
stream.on('finish', common.mustCall(function() {
fs.readFile(file, 'utf8', common.mustCall(function(err, buf) {
+ console.log(buf?.length, err, buf);
assert.ok(err instanceof Error);
if (err.message !== 'Array buffer allocation failed') {
const stringLengthHex = kStringMaxLength.toString(16); |
@bnoordhuis I left out printing
I think we're running out of disk space and the file written is smaller than expected? Shouldn't we expect the writable to emit an error in that case?
|
I've opened #43850 -- the test is failing because there is not enough disk space on the machine to write the temporary file but for whatever reason we don't get any errors about that emitted on the WriteStream which means we end up with a more cryptic, unexpected test failure. The actual fix for this issue is sorting out the free disk space but the test can be improved in indicating what went wrong. |
Well here's where all the space has gone -- the
|
Running a cleanup ( |
[iojs@test-digitalocean-freebsd12-x64-2 ~]$ ccache -c
Cleaned cache
[iojs@test-digitalocean-freebsd12-x64-2 ~]$ du -hs /home/iojs/.ccache/
4.7G /home/iojs/.ccache/
[iojs@test-digitalocean-freebsd12-x64-2 ~]$ ccache -s
cache directory /home/iojs/.ccache
primary config /home/iojs/.ccache/ccache.conf
secondary config (readonly) /usr/local/etc/ccache.conf
stats updated Fri Jul 15 21:12:31 2022
cache hit (direct) 9475977
cache hit (preprocessed) 114687
cache miss 138909
cache hit rate 98.57 %
called for link 314484
called for preprocessing 16011
compile failed 9
ccache internal error 83981
preprocessor error 7
cache file missing 510
bad compiler arguments 5
autoconf compile/link 103
no input file 5352
cleanups performed 32
files in cache 91923
cache size 5.0 GB
max cache size 5.0 GB
[iojs@test-digitalocean-freebsd12-x64-2 ~]$ df -h .
Filesystem Size Used Avail Capacity Mounted on
zroot/usr/home 32G 10G 21G 33% /usr/home
[iojs@test-digitalocean-freebsd12-x64-2 ~]$ |
Two most recent builds (after the ccache clean up) on test-digitalocean-freebsd12-x64-2 have passed 🎉 : |
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: #43850 Refs: #43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: #43850 Refs: #43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: #43850 Refs: #43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: #43850 Refs: #43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: nodejs#43850 Refs: nodejs#43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Check that all of the bytes were written to the temporary file before reading it to catch the case where there is insufficient disk space. PR-URL: nodejs/node#43850 Refs: nodejs/node#43833 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Test
test-fs-readfile-tostring-fail
Platform
FreeBSD
Console output
Build links
Additional information
This appears to be happening consistently on test-digitalocean-freebsd12-x64-2. I haven't seen it happen yet on test-digitalocean-freebsd12-x64-1 -- according to https://ci.nodejs.org/job/node-test-commit-freebsd/nodes=freebsd12-x64/buildTimeTrend recent runs on test-digitalocean-freebsd12-x64-1 are green/yellow:
FWIW I rebooted test-digitalocean-freebsd12-x64-2 about an hour ago but that hasn't fixed the problem.
The text was updated successfully, but these errors were encountered: