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

Tracing tests fail on wasm since Rust 1.82.0 #3123

Open
hds opened this issue Oct 29, 2024 · 0 comments
Open

Tracing tests fail on wasm since Rust 1.82.0 #3123

hds opened this issue Oct 29, 2024 · 0 comments

Comments

@hds
Copy link
Contributor

hds commented Oct 29, 2024

Bug Report

The tracing crate tests are failing when being run on wasm since Rust 1.82.0.

For example:
https://github.com/tokio-rs/tracing/actions/runs/11579459399/job/32235756245?pr=3122

This is likely related to a similar issue in Tokio tokio-rs/tokio#6910. A comment from Alex Crichton suggests that until a fix is available for wasm-bindgen, we can
either pin Rust to 1.81 or update Node to 20.x on the CI runners.

In Tokio, the wasm tests have been pinned to Rust 1.81.0 for the time being, a similar approach is probably a good mitigation here.

Version

  • tracing master branch
  • Rust 1.82.0

Platform

Crates

  • tracing

Description

It's only the tests in the tracing crate that fail, the other crates' tests all pass fine.

The first test to fail is tests/collector.rs, but that may just be the first test that can run under wasm.

The output is (taken from the PR 3122 link above:

Running tests/collector.rs (/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/debug/deps/collector-8e3da526b5224461.wasm)
                                                  
Set timeout to 20 seconds...
Executing bindgen...                              
                                                  
running 3 tests

Stacktrace:
    ptr1=0x35dcbe813299
    ptr2=(nil)
  [03] : 0x315e73720ba9 <Module map = 0x258183f2a231>
  [02] : 0x3faebe9015b9 <undefined>
  [01] : 0x315e7371f479 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [00] : 0x3faebe9015b9 <undefined>
--------- s o u r c e   c o d e ---------
function (request, parent, isMain) {\x0a  let relResolveCacheIdentifier;\x0a  if (parent) {\x0a    debug('Module._load REQUEST %s parent: %s', request, parent.id);\x0a    // Fast path for (lazy loaded) modules in the same directory. The indirect\x0a    // caching is required to allow cache invalidation without changing the...

-----------------------------------------
}

[19]: runMain(aka executeUserEntryPoint) [0x2209bc73eea9] [node:internal/modules/run_main:128] [bytecode=0x136784902d1 offset=87](this=0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>,0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">) {
  // expression stack (top to bottom)
  [12] : 0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>
  [11] : 0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [10] : 0x3faebe901339 <null>
  [09] : 0x3faebe901729 <true>
  [08] : 0x3faebe901729 <true>
  [07] : 0x3faebe901339 <null>
  [06] : 0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [05] : 0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>
  [04] : 0x2209bc719571 <JSFunction Module._load (sfi = 0x1df36d361c81)>
  [03] : 0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>
  [02] : 0x3faebe901789 <false>
  [01] : 0x315e7371f479 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [00] : 0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
--------- s o u r c e   c o d e ---------
function executeUserEntryPoint(main = process.argv[1]) {\x0a  const resolvedMain = resolveMainPath(main);\x0a  const useESMLoader = shouldUseESMLoader(resolvedMain);\x0a  if (useESMLoader) {\x0a    runMainESM(resolvedMain || main);\x0a  } else {\x0a    // Module._load is the monkey-patchable CJS module loader.\x0a    const { Module } = require('inte...

-----------------------------------------
}

[20]: /* anonymous */(aka /* anonymous */) [0x315e737072e1] [node:internal/main/run_main_module:28] [bytecode=0x13678485929 offset=112](this=0x3faebe9015b9 <undefined>,0x2209bc702ef1 <process map = 0x258183f290c1>,0x2209bc703661 <JSFunction requireBuiltin (sfi = 0x1b5e2994fc59)>,0x2209bc7035e1 <JSFunction internalBinding (sfi = 0x1b5e2994f211)>,0x0a7e4960ecb1 <Object map = 0x258183f26889>) {
  // expression stack (top to bottom)
  [09] : 0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>
  [08] : 0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [07] : 0x0136784856c1 <String[27]: #internal/modules/cjs/loader>
  [06] : 0x2209bc718bf9 <JSFunction Module (sfi = 0x1df36d3612b1)>
  [05] : 0x2209bc73eea9 <JSFunction executeUserEntryPoint (sfi = 0x1df36d375289)>
  [04] : 0x315e73716679 <String[111]: c"/home/runner/work/tracing/tracing/target/wasm32-unknown-unknown/wbg-tmp-collector-8e3da526b5224461.wasm/run.cjs">
  [03] : 0x2209bc7084b1 <JSFunction getOptionValue (sfi = 0x318cf4cca9a1)>
  [02] : 0x0a7e49601369 <JSFunction markBootstrapComplete (sfi = 0x1df36d36f221)>
  [01] : 0x0a7e496012b9 <JSFunction prepareMainThreadExecution (sfi = 0x1df36d36e489)>
  [00] : 0x2209bc703ad9 <JSBoundFunction (BoundTargetFunction 0x2209bc7036e9)>
--------- s o u r c e   c o d e ---------
function 'use strict';\x0a\x0aconst { RegExpPrototypeExec } = primordials;\x0a\x0aconst {\x0a  prepareMainThreadExecution,\x0a  markBootstrapComplete,\x0a} = require('internal/process/pre_execution');\x0aconst { getOptionValue } = require('internal/options');\x0a\x0aconst mainEntry = prepareMainThreadExecution(true);\x0a\x0amarkBootstrapComple...

-----------------------------------------
}

[21]: InternalFrame [pc: 0x16946dc]
[22]: EntryFrame [pc: 0x1694403]
=====================
hds added a commit that referenced this issue Oct 29, 2024
There is an incompatibility with the version of Node available on our
test runners and wasm32 in Rust 1.82 (#3123).

To unblock the CI, this change pins Rust to 1.81 for the tests using the
`wasm32-unknown-unknown` target. This is the same strategy used in Tokio
to mitigate tokio-rs/tokio#6910 until a more permanent fix can be put in
place.

This change also bumps the MSRV on the `tracing-examples` crate from
1.63.0 to 1.64.0 to avoid triggering a lint about the MSRV after a
change in Tokio 1.41.0 which bumps the required Rust version for the
`try_join!` macro. The Tokio MSRV is 1.70 now, so needing this bump for
the examples seems reasonable.
hds added a commit that referenced this issue Oct 30, 2024
There is an incompatibility with the version of Node available on our
test runners and wasm32 in Rust 1.82 (#3123).

To unblock the CI, this change pins Rust to 1.81 for the tests using the
`wasm32-unknown-unknown` target. This is the same strategy used in Tokio
to mitigate tokio-rs/tokio#6910 until a more permanent fix can be put in
place.

This change also bumps the MSRV on the `tracing-examples` crate from
1.63.0 to 1.64.0 to avoid triggering a lint about the MSRV after a
change in Tokio 1.41.0 which bumps the required Rust version for the
`try_join!` macro. The Tokio MSRV is 1.70 now, so needing this bump for
the examples seems reasonable.
hds added a commit that referenced this issue Nov 5, 2024
There is an incompatibility with the version of Node available on our
test runners and wasm32 in Rust 1.82 (#3123).

To unblock the CI, this change pins Rust to 1.81 for the tests using the
`wasm32-unknown-unknown` target. This is the same strategy used in Tokio
to mitigate tokio-rs/tokio#6910 until a more permanent fix can be put in
place.

This change also bumps the MSRV on the `tracing-examples` crate from
1.63.0 to 1.64.0 to avoid triggering a lint about the MSRV after a
change in Tokio 1.41.0 which bumps the required Rust version for the
`try_join!` macro. The Tokio MSRV is 1.70 now, so needing this bump for
the examples seems reasonable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant