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

Flaky failures of "corelib_2/bigint_from_test" in dartkb #34901

Closed
sjindel-google opened this issue Oct 23, 2018 · 5 comments
Closed

Flaky failures of "corelib_2/bigint_from_test" in dartkb #34901

sjindel-google opened this issue Oct 23, 2018 · 5 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@sjindel-google
Copy link
Contributor

FAILED: dartkb-vm debug_x64 corelib_2/bigint_from_test
Expected: Pass
Actual: RuntimeError

--- Command "vm_compile_to_kernel" (took 01.000657s):
DART_CONFIGURATION=DebugX64 /b/s/w/ir/pkg/vm/tool/gen_kernel --no-aot --platform=out/DebugX64/vm_platform_strong.dill -o /b/s/w/ir/out/DebugX64/generated_compilations/dartkb/tests_corelib_2_bigint_from_test/out.dill /b/s/w/ir/tests/corelib_2/bigint_from_test.dart --packages=/b/s/w/ir/.packages -Ddart.developer.causal_async_stacks=true --gen-bytecode --drop-ast

exit code:
0

--- Command "vm" (took 02.000254s):
DART_CONFIGURATION=DebugX64 out/DebugX64/dart --enable_interpreter --sync-async --ignore-unrecognized-flags --packages=/b/s/w/ir/.packages /b/s/w/ir/out/DebugX64/generated_compilations/dartkb/tests_corelib_2_bigint_from_test/out.dill

exit code:
255

stderr:
Unhandled exception:
Expect.equals(expected: <-4294967296>, actual: <-4316718722>) fails.
#0      Expect._fail (package:expect/expect.dart)
#1      Expect.equals (package:expect/expect.dart)
#2      testInt (file:///b/s/w/ir/tests/corelib_2/bigint_from_test.dart)
#3      main (file:///b/s/w/ir/tests/corelib_2/bigint_from_test.dart)
#4      _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart)
#5      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart)

--- Re-run this test:
python tools/test.py -m debug -c dartkb -n dartkb-mixed-linux-debug-x64 corelib_2/bigint_from_test
@sjindel-google sjindel-google changed the title Flaky failures of "corelib_2/bigint_from_test" in dartkb debug Flaky failures of "corelib_2/bigint_from_test" in dartkb Oct 23, 2018
@alexmarkov
Copy link
Contributor

The test corelib_2/bigint_test fails for the same reason more reliably.

These tests fail in mixed mode (with --enable-interpreter) due to switching from non-intrinsic implementation of BigInt methods to intrinsics on the fly: when BigInt code starts running it is interpreted and intrinsics are not used, for example _estimateQuotientDigit returns 1. Meanwhile, _mulAdd could be compiled and it uses intrinsic implementation which would process 2 digits. BigInt implementation does not account for switching to intrinsic implementation on the fly and mixing intrinsic and non-intrinsic implementations of BigInt methods.

If Dart asserts are enabled, these tests fail on assertions

assert(d0 == d1);
and
assert(d == _digitsPerStep);

@crelier could you please take a look?

@alexmarkov alexmarkov removed their assignment Oct 23, 2018
@alexmarkov alexmarkov added area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Oct 23, 2018
dart-bot pushed a commit that referenced this issue Oct 23, 2018
Issue: #34901
Change-Id: Iaa0d082a0d4e0ddd034f51f49fc9b722a0ca3fd4
Reviewed-on: https://dart-review.googlesource.com/c/81281
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
@crelier
Copy link
Contributor

crelier commented Oct 24, 2018

In order to verify a fix for this issue, I'd like to reproduce it first, but I am not able to get this assert fault, either for bigint_test or bigint_from_test.
I sometimes get a timeout, or an exhausted heap, but never an assert fault. I suppose I am not enabling the asserts the correct way?
python tools/test.py -m debug -c dartkb --vm-options "--enable-interpreter --enable-asserts" corelib_2/bigint_test

@alexmarkov
Copy link
Contributor

I can reliably reproduce assertion using your command (after removing .status file entries) if I build platform with bytecode:

rm -rf out
tools/gn.py -m debug,release -a x64 --bytecode
tools/build.py -m debug,release -a x64 runtime

@crelier
Copy link
Contributor

crelier commented Oct 24, 2018

Ah, of course, my platform was missing bytecode. Thanks!

@crelier
Copy link
Contributor

crelier commented Oct 25, 2018

Fixed by 7de2510

@crelier crelier closed this as completed Oct 25, 2018
dart-bot pushed a commit that referenced this issue Oct 25, 2018
Update status file.

Change-Id: I43b222562488c90c9438fd792dc2505b14d5d373
Reviewed-on: https://dart-review.googlesource.com/c/81334
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants