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

Investigate flaky parallel/test-trace-events-metadata #24129

Closed
Trott opened this issue Nov 6, 2018 · 11 comments
Closed

Investigate flaky parallel/test-trace-events-metadata #24129

Trott opened this issue Nov 6, 2018 · 11 comments
Labels
flaky-test Issues and PRs related to the tests with unstable failures on the CI. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events.

Comments

@Trott
Copy link
Member

Trott commented Nov 6, 2018

https://ci.nodejs.org/job/node-test-commit-linux/22895/nodes=ubuntu1604-64/console

00:09:00 not ok 1930 parallel/test-trace-events-metadata
00:09:00   ---
00:09:00   duration_ms: 0.412
00:09:00   severity: fail
00:09:00   exitcode: 1
00:09:00   stack: |-
00:09:00     assert.js:351
00:09:00         throw err;
00:09:00         ^
00:09:00     
00:09:00     AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
00:09:00     
00:09:00       assert(traces.some((trace) =>
00:09:00         trace.name === 'process_name' && trace.args.name === 'foo'))
00:09:00     
00:09:00         at fs.readFile.common.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-64/test/parallel/test-trace-events-metadata.js:67:7)
00:09:00         at /home/iojs/build/workspace/node-test-commit-linux/nodes/ubuntu1604-64/test/common/index.js:340:15
00:09:00         at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
00:09:00   ...

@nodejs/trace-events

@Trott Trott added trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events. flaky-test Issues and PRs related to the tests with unstable failures on the CI. labels Nov 6, 2018
@Trott
Copy link
Member Author

Trott commented Nov 6, 2018

Replicable under load (on macOS):

$ tools/test.py -j96 --repeat 192 test/parallel/test-trace-events-metadata.js 
=== release test-trace-events-metadata ===                    
Path: parallel/test-trace-events-metadata
assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/Users/trott/io.js/test/parallel/test-trace-events-metadata.js:67:7)
    at /Users/trott/io.js/test/common/index.js:340:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-trace-events-metadata.js
[00:18|% 100|+ 191|-   1]: Done   
$ 

@Trott
Copy link
Member Author

Trott commented Nov 6, 2018

(It's the setting of process.title that's not taking here.)

@cjihrig
Copy link
Contributor

cjihrig commented Nov 6, 2018

Replicable under load (on macOS):

and

(It's the setting of process.title that's not taking here.)

There's a possibility that this is related to (or at least could be improved by) libuv/libuv#2064. If so, a new release is being planned for later this week.

@Trott
Copy link
Member Author

Trott commented Nov 22, 2018

Alas, it appear that libuv fix is in libuv 1.24.0 which is also now on master, but this is still reproducible locally.

@Trott
Copy link
Member Author

Trott commented Nov 28, 2018

https://ci.nodejs.org/job/node-test-commit-linux/23528/nodes=debian9-64/console

20:15:43 not ok 1851 parallel/test-trace-events-metadata
20:15:43   ---
20:15:43   duration_ms: 0.335
20:15:43   severity: fail
20:15:43   exitcode: 1
20:15:43   stack: |-
20:15:43     assert.js:351
20:15:43         throw err;
20:15:43         ^
20:15:43     
20:15:43     AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
20:15:43     
20:15:43       assert(traces.some((trace) =>
20:15:43         trace.name === 'process_name' && trace.args.name === 'foo'))
20:15:43     
20:15:43         at fs.readFile.common.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/debian9-64/test/parallel/test-trace-events-metadata.js:68:7)
20:15:43         at /home/iojs/build/workspace/node-test-commit-linux/nodes/debian9-64/test/common/index.js:346:15
20:15:43         at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
20:15:43   ...

@Trott
Copy link
Member Author

Trott commented Dec 5, 2018

https://ci.nodejs.org/job/node-test-binary-arm/4667/RUN_SUBSET=2,label=pi3-docker/console

00:10:05 not ok 279 parallel/test-trace-events-metadata
00:10:05   ---
00:10:05   duration_ms: 3.871
00:10:05   severity: fail
00:10:05   exitcode: 1
00:10:05   stack: |-
00:10:05     assert.js:351
00:10:05         throw err;
00:10:05         ^
00:10:05     
00:10:05     AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
00:10:05     
00:10:05       assert(traces.some((trace) =>
00:10:05         trace.name === 'process_name' && trace.args.name === 'foo'))
00:10:05     
00:10:05         at fs.readFile.common.mustCall (/home/iojs/build/workspace/node-test-binary-arm/test/parallel/test-trace-events-metadata.js:68:7)
00:10:05         at /home/iojs/build/workspace/node-test-binary-arm/test/common/index.js:346:15
00:10:05         at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
00:10:05   ...

@Trott
Copy link
Member Author

Trott commented Dec 5, 2018

I wonder if V8 optimizes out the loop in this bit of code from the test, which is now causing this failure to show up once in a while because process.title setting is actually asynchronous.

setTimeout(() => { for (var i = 0; i < 100000; i++) { "test" + i } }, 1);

@Trott
Copy link
Member Author

Trott commented Dec 5, 2018

Load appears to not actually be a factor perhaps:

$ tools/test.py -j 1 --repeat 2048 test/parallel/test-trace-events-metadata.js
=== release test-trace-events-metadata ===                   
Path: parallel/test-trace-events-metadata
assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/Users/trott/io.js/test/parallel/test-trace-events-metadata.js:68:7)
    at /Users/trott/io.js/test/common/index.js:346:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-trace-events-metadata.js
=== release test-trace-events-metadata ===                   ^[[A
Path: parallel/test-trace-events-metadata
assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/Users/trott/io.js/test/parallel/test-trace-events-metadata.js:68:7)
    at /Users/trott/io.js/test/common/index.js:346:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-trace-events-metadata.js
=== release test-trace-events-metadata ===                    
Path: parallel/test-trace-events-metadata
assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/Users/trott/io.js/test/parallel/test-trace-events-metadata.js:68:7)
    at /Users/trott/io.js/test/common/index.js:346:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-trace-events-metadata.js
=== release test-trace-events-metadata ===                    
Path: parallel/test-trace-events-metadata
assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/Users/trott/io.js/test/parallel/test-trace-events-metadata.js:68:7)
    at /Users/trott/io.js/test/common/index.js:346:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-trace-events-metadata.js
[09:10|% 100|+ 2044|-   4]: Done                              
$

@richardlau
Copy link
Member

https://ci.nodejs.org/job/node-test-commit-linux/24231/nodes=fedora-last-latest-x64/testReport/junit/(root)/test/parallel_test_trace_events_metadata/

assert.js:351
    throw err;
    ^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(traces.some((trace) =>
    trace.name === 'process_name' && trace.args.name === 'foo'))

    at fs.readFile.common.mustCall (/home/iojs/build/workspace/node-test-commit-linux/nodes/fedora-last-latest-x64/test/parallel/test-trace-events-metadata.js:69:7)
    at /home/iojs/build/workspace/node-test-commit-linux/nodes/fedora-last-latest-x64/test/common/index.js:373:15
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:54:3)

@ofrobots
Copy link
Contributor

I can reproduce on my machine and am investigating.

ofrobots added a commit to ofrobots/node that referenced this issue Dec 27, 2018
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: nodejs#24129
@ofrobots
Copy link
Contributor

#25235

addaleax pushed a commit that referenced this issue Jan 9, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: #24129

PR-URL: #25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
refack pushed a commit to refack/node that referenced this issue Jan 14, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: nodejs#24129

PR-URL: nodejs#25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BridgeAR pushed a commit to BridgeAR/node that referenced this issue Jan 16, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: nodejs#24129

PR-URL: nodejs#25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BethGriggs pushed a commit that referenced this issue Apr 28, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: #24129

PR-URL: #25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BethGriggs pushed a commit that referenced this issue May 10, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: #24129

PR-URL: #25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this issue May 16, 2019
Multiple threads may be concurrently adding to the metadata_events list.
Protect access with a mutex.

Fixes: #24129

PR-URL: #25235
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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. trace_events Issues and PRs related to V8, Node.js core, and userspace code trace events.
Projects
None yet
Development

No branches or pull requests

4 participants