Skip to content
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

test: two unexpected failures when disk is nearly full #7609

Closed
bnoordhuis opened this issue Jul 8, 2016 · 17 comments
Closed

test: two unexpected failures when disk is nearly full #7609

bnoordhuis opened this issue Jul 8, 2016 · 17 comments
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. fs Issues and PRs related to the fs subsystem / file system. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. test Issues and PRs related to the tests.

Comments

@bnoordhuis
Copy link
Member

$ python tools/test.py parallel/test-fs-read-buffer-tostring-fail parallel/test-fs-readfile-tostring-fail
=== release test-fs-read-buffer-tostring-fail ===
Path: parallel/test-fs-read-buffer-tostring-fail
(node:23280) DeprecationWarning: fs.read's legacy String interface is deprecated. Use the Buffer API as mentioned in the documentation instead.

/home/bnoordhuis/src/v1.x/test/parallel/test-fs-read-buffer-tostring-fail.js:56
  throw err;
  ^
AssertionError: false == true
    at /home/bnoordhuis/src/v1.x/test/parallel/test-fs-read-buffer-tostring-fail.js:30:12
    at /home/bnoordhuis/src/v1.x/test/common.js:407:15
    at tryToStringWithEnd (fs.js:697:3)
    at callback (fs.js:666:9)
    at FSReqWrap.wrapper [as oncomplete] (fs.js:681:17)
Command: out/Release/node /home/bnoordhuis/src/v1.x/test/parallel/test-fs-read-buffer-tostring-fail.js
=== release test-fs-readfile-tostring-fail ===
Path: parallel/test-fs-readfile-tostring-fail
/home/bnoordhuis/src/v1.x/test/parallel/test-fs-readfile-tostring-fail.js:51
  throw err;
  ^
AssertionError: false == true
    at /home/bnoordhuis/src/v1.x/test/parallel/test-fs-readfile-tostring-fail.js:27:12
    at /home/bnoordhuis/src/v1.x/test/common.js:407:15
    at tryToString (fs.js:455:3)
    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)

Both tests try to create a largish file (~250 MB) but instead of failing with an ENOSPC error, they appear to be truncating the file.

They then fail when trying to read back the file. The toString() operation doesn't raise the expected error because the input is too small to trigger it.

@bnoordhuis bnoordhuis added the test Issues and PRs related to the tests. label Jul 8, 2016
@cjihrig
Copy link
Contributor

cjihrig commented Jul 8, 2016

By any chance are you running an older version of Node? I saw this behavior with an old version that didn't have kStringMaxLength defined. Once I defined kStringMaxLength, I got ENOSPC.

@bnoordhuis
Copy link
Member Author

Depends on your definition of 'older'. It was yesterday's master.

@cjihrig
Copy link
Contributor

cjihrig commented Jul 11, 2016

Sorry, I meant a much, much older version.

@Trott
Copy link
Member

Trott commented Jul 8, 2017

@nodejs/testing @nodejs/fs

@refack refack added the fs Issues and PRs related to the fs subsystem / file system. label Jul 8, 2017
@BridgeAR BridgeAR added the flaky-test Issues and PRs related to the tests with unstable failures on the CI. label Feb 9, 2018
@BridgeAR
Copy link
Member

BridgeAR commented Feb 9, 2018

@bnoordhuis are these still up to date?

@bnoordhuis
Copy link
Member Author

I think so. I don't have a problem with closing it out; the errors are confusing / misleading but it's something of an edge case.

@joyeecheung
Copy link
Member

Is it possible that this is a duplicate of #16601 ?

@bnoordhuis
Copy link
Member Author

I don't think so. The latest failure in #16601 is a timeout, not a failed assert. The one before that is a missing expected error, which probably also isn't this issue.

@davisjam
Copy link
Contributor

davisjam commented Mar 17, 2018

I can poke at this issue and try to fix the flakiness.

FWIW one of these tests is now here in master.

test/sequential/test-fs-readfile-tostring-fail.js

  1. I'm not sure where the assert @bnoordhuis indicated is failing though.

  2. I am not sure what has become of

test/parallel/test-fs-read-buffer-tostring-fail.js

Is it still in master?

Should I be looking on another branch?

@Trott Should I just look at #16601 instead?

@Trott
Copy link
Member

Trott commented Mar 17, 2018

test/parallel/test-fs-read-buffer-tostring-fail.js was removed in 3c2a936.

So this is now only about test/sequential/test-fs-readfile-tostring-fail.js.

@Trott
Copy link
Member

Trott commented Mar 17, 2018

I'm not sure where the assert @bnoordhuis indicated is failing though.

State of the file on master when @bnoordhuis opened this PR:

https://github.com/nodejs/node/blob/85ab4a5f1281c4e1dd06450ac7bd3250326267fa/test/parallel/test-fs-readfile-tostring-fail.js

Stack trace provided by @bnoordhuis above says that the assertion is firing on line 27, which is:

    assert.ok(err instanceof Error);

@gireeshpunathil
Copy link
Member

ping @davisjam - were you able to make any progress on this?

@davisjam
Copy link
Contributor

davisjam commented May 7, 2018

Afraid I haven't looked at it yet.

@gireeshpunathil
Copy link
Member

do you mind if I tag good first issue on this to help move this forward, if you are low on bandwidth?

@gireeshpunathil gireeshpunathil added the good first issue Issues that are suitable for first-time contributors. label May 7, 2018
@davisjam
Copy link
Contributor

davisjam commented May 7, 2018

@gireeshpunathil By all means.

@Trott
Copy link
Member

Trott commented May 7, 2018

(Just a suggestion: Might want to consider tagging it help wanted rather than good first issue.)

@gireeshpunathil gireeshpunathil added help wanted Issues that need assistance from volunteers or PRs that need help to proceed. and removed good first issue Issues that are suitable for first-time contributors. labels May 8, 2018
@apapirovski
Copy link
Member

I'm going to close this out, no one has really volunteered to fix these in the two years and it's a fairly edge case issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. fs Issues and PRs related to the fs subsystem / file system. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

9 participants