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

New failures (compared to Chrome) when enabling Dart2Wasm testing on Firefox #54140

Closed
mkustermann opened this issue Nov 23, 2023 · 7 comments
Closed
Assignees
Labels
area-dart2wasm Issues for the dart2wasm compiler.

Comments

@mkustermann
Copy link
Member

mkustermann commented Nov 23, 2023

The tests

co19/Language/Functions/element_type_A02_t03 RuntimeError (expected Pass)
co19/Language/Functions/element_type_A02_t04 RuntimeError (expected Pass)
co19/Language/Functions/element_type_A02_t06 RuntimeError (expected Pass)
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t01 RuntimeError (expected Pass)
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t06 RuntimeError (expected Pass)
language/async/return_throw_test RuntimeError (expected Pass)
language/regress/regress21795_test RuntimeError (expected Pass)
language/regress/regress23244_test RuntimeError (expected Pass)
language/stack_trace/full1_test RuntimeError (expected Pass)
language/stack_trace/full2_test RuntimeError (expected Pass)
language/stack_trace/rethrow_error_test/none RuntimeError (expected Pass)
language/stack_trace/rethrow_error_test/withtraceparameter RuntimeError (expected Pass)
language/stack_trace/rethrow_nonerror_test RuntimeError (expected Pass)
language/stack_trace/stack_trace_test RuntimeError (expected Pass)

are failing on configurations

dart2wasm-linux-firefox

The typed data tests are seemingly flaky:

co19/LibTest/typed_data/Int8List/isNotEmpty_A01_t02
co19/LibTest/typed_data/Int8List/operator_equality_A01_t01
co19/LibTest/typed_data/Uint16List/Uint16List_A01_t01
co19/LibTest/typed_data/Uint16List/elementSizeInBytes_A01_t02
co19/LibTest/typed_data/Uint16List/operator_equality_A01_t01
co19/LibTest/typed_data/Uint8ClampedList/isEmpty_A01_t02
co19/LibTest/typed_data/Uint8ClampedList/operator_equality_A01_t01
co19/LibTest/typed_data/Uint8List/add_A01_t01
co19/LibTest/typed_data/Uint8List/clear_A01_t01
@mkustermann mkustermann added the area-dart2wasm Issues for the dart2wasm compiler. label Nov 23, 2023
@mkustermann
Copy link
Member Author

Probably minor things.

/cc @osa1

@osa1 osa1 self-assigned this Nov 23, 2023
@osa1
Copy link
Member

osa1 commented Nov 23, 2023

The ones about the stack traces are because of different toString outputs for JS stack traces.

When throwing an exception we get the stack trace with new Error().stack.toString(), which for the same exception generates this in Firefox:

["_125@http://0.0.0.0:8000/test.mjs:161:29",
 "StackTrace.current@http://0.0.0.0:8000/test.wasm:wasm-function[108]:0x11acb",
 "a@http://0.0.0.0:8000/test.wasm:wasm-function[713]:0x205d4",
 ... ]

and this in Chrome:

['Error',
 '    at _125 (http://0.0.0.0:8000/test.mjs:161:29)',
 '    at StackTrace.current (http://0.0.0.0:8000/test.wasm:wasm-function[108]:0x11acb)',
 '    at a (http://0.0.0.0:8000/test.wasm:wasm-function[713]:0x205d4)',
 ... ]

The first line "Error" doesn't exist in Firefox, so when we drop the first 3 lines to show the stack trace of the throw (instead of the JS code that generates the stack trace) we end up dropping the throws frame.

I'm not sure how to fix yet, but it seems a bit strange that Chrome generates the "Error" in string representation of a stack trace. I wonder if this is something we can change in Chrome.

@osa1
Copy link
Member

osa1 commented Nov 23, 2023

co19/Language/Functions/element_type_A02_t03 (and probably other element_type tests) are actually failing with Chrome and d8 as well, but I think there's a problem somewhere in the test runner, it doesn't realize that the test is failing. In Chrome, after printing the test failure, in the console there doesn't seem to be uncaught exceptions reported. In Firefox it shows an uncaught exception, which is probably why it's correctly marking the test as failing.

@osa1
Copy link
Member

osa1 commented Nov 23, 2023

Fix for stack traces: https://dart-review.googlesource.com/c/sdk/+/338000

@osa1
Copy link
Member

osa1 commented Nov 24, 2023

co19/Language/Functions/element_type_A02_t03 (and probably other element_type tests) are actually failing with Chrome and d8 as well, but I think there's a problem somewhere in the test runner, it doesn't realize that the test is failing.

The problem is that the exception that reports a test failure is sometimes thrown not from main but from a queueMicrotask callback. This happens when main is an async function, and probably in some other cases as well.

Related issue: #52561

@sgrekhov
Copy link
Contributor

See also #54159

@osa1
Copy link
Member

osa1 commented Dec 5, 2023

After fixes in co19 and dart2wasm stack traces on Firefox, currently these tests from the original list are still failing:

co19/Language/Functions/element_type_A02_t03
co19/Language/Functions/element_type_A02_t04
co19/Language/Functions/element_type_A02_t06
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t01
co19/Language/Libraries_and_Scripts/Scripts/top_level_main_t06
language/async/return_throw_test
language/regress/regress23244_test

However these tests are now failing with d8 and Chrome as well, so Firefox specific issues seem to be resolved.

@osa1 osa1 closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-dart2wasm Issues for the dart2wasm compiler.
Projects
None yet
Development

No branches or pull requests

3 participants