Skip to content

test-snapshot-reproducible is failing in the main branch #53579

Description

@joyeecheung

The snapshot reproducibility test has been failing in dynamically linked builds since yesterday. From CI history it was still green at cd8e61f (https://ci.nodejs.org/job/node-test-commit-linux-containered/44116/), but started failing no later than 4c730ae (https://ci.nodejs.org/job/node-test-commit-linux-containered/44117/), that means either one of the two commits in cd8e61f...4c730ae caused the regression, or some infra update happened yesterday caused the regression.

Activity

  1. joyeecheung commented on Jun 25, 2024

    @joyeecheung
    MemberAuthor
  2. joyeecheung commented on Jun 25, 2024

    @joyeecheung
    MemberAuthor

    Looks like 4c730ae broke the test. Opened to revert it for now to make the CI green #53582.

  3. changed the title [-]test-snapshot-reproducible is failing[/-] [+]test-snapshot-reproducible is failing in the main branch[/+] on Jun 25, 2024
  4. joyeecheung commented on Jun 25, 2024

    @joyeecheung
    MemberAuthor

    I haven't been able to reproduce this locally yet, but from the logs:

    20:38:52     + [
    20:38:52     +   {
    20:38:52     +     offset: '0x40',
    20:38:52     +     slice1: '000000b30b6c5ab8eea9aa31322e342e',
    20:38:52     +     slice2: '000000fe0a668db8eea9aa31322e342e'
    20:38:52     +   },
    20:38:52     +   {
    20:38:52     +     offset: '0x101640',
    20:38:52     +     slice1: 'ec805d44660000000000000000a028c0',
    20:38:52     +     slice2: 'ec805d44660000000000000000a03886'
    20:38:52     +   },
    20:38:52     +   {
    20:38:52     +     offset: '0x101650',
    20:38:52     +     slice1: 'd4655500000000000000000000000000',
    20:38:52     +     slice2: '8c215600000000000000000000000000'
    20:38:52     +   }
    20:38:52     + ]
    

    I suspect the unreproducibility comes from the hash of the flags - at least, it seems to be in the header of the main context snapshot.

  5. richardlau commented on Jun 25, 2024

    @richardlau
    Member

    I haven't been able to reproduce this in a "normal" build (Linux) but can with 4c730ae when building with configure --shared-openssl.

  6. added
    testIssues and PRs related to Node.js core tests and test infrastructure.
    snapshotIssues and PRs related to the startup snapshot.
    on Jun 25, 2024
  7. joyeecheung commented on Jun 26, 2024

    @joyeecheung
    MemberAuthor

    I am still unable to reproduce it with ./configure --shared-openssl or ./configure --with-intl=small-icu, neither on macOS nor on Ubuntu 23.04...but I could try logging into one of the containers to debug.

  8. joyeecheung commented on Jun 26, 2024

    @joyeecheung
    MemberAuthor

    Ah, I could reproduce it now, it needs a separately installed shared openssl.

  9. legendecas commented on Jun 26, 2024

    @legendecas
    Member

    I can reproduce this on a local docker ubuntu container:

    $ uname -a
    Linux e3f5b61fd0a2 6.6.31-linuxkit #1 SMP Thu May 23 08:36:57 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux
    $ ./configure --shared-openssl --shared-openssl-libpath=/usr/lib/aarch64-linux-gnu/ --shared-openssl-includes=/usr/include
    $ make
    $ ./out/Release/node test/parallel/test-snapshot-reproducible.js
    0x0: Write magic 143da19
    0x4: Write metadata
    0x39: Write snapshot blob
    0x185085: Write IsolateDataSerializeInfo
    0x186538: Write EnvSerializeInfo
    0x1873d1: Write CodeCacheInfo
    0x0: Write magic 143da19
    0x4: Write metadata
    0x39: Write snapshot blob
    0x185085: Write IsolateDataSerializeInfo
    0x186538: Write EnvSerializeInfo
    0x1873d1: Write CodeCacheInfo
    node:assert:126
      throw new AssertionError(obj);
      ^
    
    AssertionError [ERR_ASSERTION]: Expected values to be strictly deep-equal:
    + actual - expected
    
    + [
    +   {
    +     offset: '0x40',
    +     slice1: '0001000000f63cf2004cb3bf2331322e',
    +     slice2: '00010000004a3dfd284cb3bf2331322e'
    +   },
    +   {
    +     offset: '0x111680',
    +     slice1: '805d44660000000000000000707179fc',
    +     slice2: '805d4466000000000000000000b9fbf6'
    +   }
    + ]
    - []
        at Object.<anonymous> (/workspace/test/parallel/test-snapshot-reproducible.js:69:8)
        at Module._compile (node:internal/modules/cjs/loader:1467:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
        at Module.load (node:internal/modules/cjs/loader:1282:32)
        at Module._load (node:internal/modules/cjs/loader:1098:12)
        at TracingChannel.traceSync (node:diagnostics_channel:315:14)
        at wrapModuleLoad (node:internal/modules/cjs/loader:215:24)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:5)
        at node:internal/main/run_main_module:30:49 {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: [
        {
          offset: '0x40',
          slice1: '0001000000f63cf2004cb3bf2331322e',
          slice2: '00010000004a3dfd284cb3bf2331322e'
        },
        {
          offset: '0x111680',
          slice1: '805d44660000000000000000707179fc',
          slice2: '805d4466000000000000000000b9fbf6'
        }
      ],
      expected: [],
      operator: 'deepStrictEqual'
    }
    
    Node.js v23.0.0-pre
  10. joyeecheung commented on Jun 27, 2024

    @joyeecheung
    MemberAuthor

    Locally this patch fixes it for me (it is rather curious why this only shows up in dynamically linked builds, though..): https://chromium-review.googlesource.com/c/v8/v8/+/5662576
    Trying it in the CI: https://ci.nodejs.org/job/node-test-commit-linux-containered/44167/

  11. added a commit that references this issue on Jul 7, 2024
  12. added a commit that references this issue on Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    snapshotIssues and PRs related to the startup snapshot.testIssues and PRs related to Node.js core tests and test infrastructure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions