-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
dart:ffi function_stress_test on Windows 64 #36138
Comments
First, there is no |
Alternatively, we can add some instrumentation to the VM to extract the GC stats without the convoluted stderr-redirection and parsing. |
After implementing stderr capture on Windows the following two failures appeared. set DART_CONFIGURATION=DebugX64 & set DART_SUPPRESS_WER=1 & out\DebugX64\dart.exe --no-background-compilation --deterministic --optimization-counter-threshold=500 --verbose-gc --ignore-unrecognized-flags --packages=C:\src\dart-sdk\sdk\.packages C:\src\dart-sdk\sdk\tests\standalone_2\ffi\function_stress_test.dart
exit code:
3
stderr:
[ | | | | | new gen | new gen | new gen | old gen | old gen | old gen | sweep | safe- | roots/| stbuf/| tospc/| weaks/| ]
[ GC isolate | space (reason) | GC# | start | time | used (kB) | capacity kB | external| used (kB) | capacity (kB) | external kB | thread| point |marking| reset | sweep |swplrge| data ]
[ | | | (s) | (ms) |before| after|before| after| b4 |aftr| before| after | before| after |before| after| (ms) | (ms) | (ms) | (ms) | (ms) | (ms) | ]
[ kernel-servic, Scavenge(new space), 1, 0.69, 17.8, 2048, 1772, 2048, 2048, 5503, 5499, 25427, 25427, 26020, 26020, 0, 0, 0.00, 0.00, 0.05, 0.05, 1.93, 0.01, 158, 0, 0, 183, ]
[ kernel-servic, Scavenge(new space), 2, 0.72, 33.9, 2048, 245, 2048, 8192, 5499, 0, 25427, 27199, 26020, 27636, 0, 5499, 0.00, 0.00, 0.14, 0.06, 4.16, 0.01, 155, 0, 0, 0, ]
[ | | | | | new gen | new gen | new gen | old gen | old gen | old gen | sweep | safe- | roots/| stbuf/| tospc/| weaks/| ]
[ GC isolate | space (reason) | GC# | start | time | used (kB) | capacity kB | external| used (kB) | capacity (kB) | external kB | thread| point |marking| reset | sweep |swplrge| data ]
[ | | | (s) | (ms) |before| after|before| after| b4 |aftr| before| after | before| after |before| after| (ms) | (ms) | (ms) | (ms) | (ms) | (ms) | ]
[ vm-service , Scavenge( full), 1, 0.77, 3.1, 512, 40, 2048, 2048, 0, 0, 4835, 4835, 5264, 5264, 0, 0, 0.00, 0.00, 0.03, 0.09, 0.03, 0.01, 213, 0, 0, 34, ]
[ vm-service , MarkSweep( full), 2, 0.78, 11.9, 40, 40, 2048, 2048, 0, 0, 4835, 3928, 5264, 4996, 0, 0, 0.00, 0.00, 3.57, 0.00, 0.37, 7.95, 36, 0, 15, 15, ]
[ kernel-servic, Scavenge(new space), 3, 0.79, 52.6, 8192, 0, 8192, 32768, 0, 0, 27199, 34840, 27636, 35052, 5499, 5499, 0.00, 0.00, 0.05, 1.65, 11.10, 0.01, 2246, 0, 0, 0, ]
c:\src\dart-sdk\sdk\runtime\vm\raw_object.h: 235: error: expected: IsWellFormed()
version=2.2.1-edge.407eb5a784c284a2e3656861d6bda0fcbcac1417 (Fri Mar 8 17:52:03 2019 +0100) on "windows_x64"
thread=16152, isolate=function_stress_test.dart:main()(0000000004E54210)
[0x00000001405d9b2c] dart::Profiler::DumpStackTrace
[0x00000001405d9b2c] dart::Profiler::DumpStackTrace
[0x000000000e46e9e8] Unknown symbol
-- End of DumpStackTrace
--- Re-run this test:
python tools/test.py -n dartk-win-debug-x64 standalone_2/ffi/function_stress_test
set DART_CONFIGURATION=DebugX64 & set DART_SUPPRESS_WER=1 & out\DebugX64\dart.exe --no-background-compilation --deterministic --optimization-counter-threshold=-1 --verbose-gc --ignore-unrecognized-flags --packages=C:\src\dart-sdk\sdk\.packages C:\src\dart-sdk\sdk\tests\standalone_2\ffi\function_stress_test.dart
exit code:
255
stdout:
Expect 2 > 1.
Expect 6 > 5.
stderr:
[ | | | | | new gen | new gen | new gen | old gen | old gen | old gen | sweep | safe- | roots/| stbuf/| tospc/| weaks/| ]
[ GC isolate | space (reason) | GC# | start | time | used (kB) | capacity kB | external| used (kB) | capacity (kB) | external kB | thread| point |marking| reset | sweep |swplrge| data ]
[ | | | (s) | (ms) |before| after|before| after| b4 |aftr| before| after | before| after |before| after| (ms) | (ms) | (ms) | (ms) | (ms) | (ms) | ]
[ kernel-servic, Scavenge(new space), 1, 0.73, 18.6, 2048, 1778, 2048, 2048, 5503, 5499, 25394, 25394, 25764, 25764, 0, 0, 0.00, 0.00, 0.05, 0.05, 1.95, 0.01, 158, 0, 0, 183, ]
[ kernel-servic, Scavenge(new space), 2, 0.75, 24.9, 2048, 240, 2048, 8192, 5499, 0, 25394, 27171, 25764, 27556, 0, 5499, 0.00, 0.00, 0.14, 0.07, 4.12, 0.01, 155, 0, 0, 0, ]
[ | | | | | new gen | new gen | new gen | old gen | old gen | old gen | sweep | safe- | roots/| stbuf/| tospc/| weaks/| ]
[ GC isolate | space (reason) | GC# | start | time | used (kB) | capacity kB | external| used (kB) | capacity (kB) | external kB | thread| point |marking| reset | sweep |swplrge| data ]
[ | | | (s) | (ms) |before| after|before| after| b4 |aftr| before| after | before| after |before| after| (ms) | (ms) | (ms) | (ms) | (ms) | (ms) | ]
[ vm-service , Scavenge( full), 1, 0.82, 3.2, 512, 41, 2048, 2048, 0, 0, 4844, 4844, 5264, 5264, 0, 0, 0.00, 0.00, 0.04, 0.08, 0.03, 0.01, 214, 0, 0, 35, ]
[ vm-service , MarkSweep( full), 2, 0.82, 6.5, 41, 41, 2048, 2048, 0, 0, 4844, 3939, 5264, 4996, 0, 0, 0.00, 0.00, 3.98, 0.00, 0.21, 2.27, 36, 0, 15, 15, ]
[ kernel-servic, Scavenge(new space), 3, 0.82, 52.6, 8192, 0, 8192, 32768, 0, 0, 27171, 34807, 27556, 35184, 5499, 5499, 0.00, 0.00, 0.05, 1.61, 11.71, 0.01, 2246, 0, 0, 0, ]
[ | | | | | new gen | new gen | new gen | old gen | old gen | old gen | sweep | safe- | roots/| stbuf/| tospc/| weaks/| ]
[ GC isolate | space (reason) | GC# | start | time | used (kB) | capacity kB | external| used (kB) | capacity (kB) | external kB | thread| point |marking| reset | sweep |swplrge| data ]
[ | | | (s) | (ms) |before| after|before| after| b4 |aftr| before| after | before| after |before| after| (ms) | (ms) | (ms) | (ms) | (ms) | (ms) | ]
[ function_stre, Scavenge(new space), 1, 1.08, 5.6, 2048, 37, 2048, 2048, 0, 0, 4586, 4586, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.07, 0.03, 0.01, 221, 0, 0, 32, ]
[ function_stre, Scavenge(new space), 2, 1.14, 3.0, 2048, 0, 2048, 2048, 0, 0, 4586, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.04, 0.07, 0.03, 0.01, 219, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 3, 1.20, 2.8, 2048, 0, 2048, 2048, 0, 0, 4623, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 4, 1.27, 2.8, 2048, 0, 2048, 2048, 0, 0, 4623, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 5, 1.33, 2.8, 2048, 0, 2048, 2048, 0, 0, 4623, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 6, 1.39, 2.9, 2048, 0, 2048, 2048, 0, 0, 4623, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 7, 1.45, 2.8, 2048, 0, 2048, 2048, 0, 0, 4623, 4623, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 8, 1.59, 2.8, 2048, 2, 2048, 2048, 0, 0, 4690, 4690, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.00, 9, 0, 0, 2, ]
[ function_stre, Scavenge(new space), 9, 1.60, 2.8, 2048, 0, 2048, 2048, 0, 0, 4691, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.01, 0.04, 0.01, 7, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 10, 1.60, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.00, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 11, 1.61, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.00, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 12, 1.63, 5.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.03, 0.02, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 13, 1.64, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.01, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 14, 1.65, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.00, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 15, 1.66, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 16, 1.67, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 17, 1.68, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 18, 1.68, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 19, 1.69, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 20, 1.70, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 21, 1.71, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 22, 1.72, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 23, 1.73, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 24, 1.74, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 25, 1.75, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 26, 1.76, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.00, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 27, 1.76, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 28, 1.77, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 29, 1.78, 2.7, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
[ function_stre, Scavenge(new space), 30, 1.79, 2.8, 2048, 0, 2048, 2048, 0, 0, 4693, 4693, 5008, 5008, 0, 0, 0.00, 0.00, 0.02, 0.01, 0.00, 0.01, 0, 0, 0, 0, ]
Unhandled exception:
Expect.equals(expected: <-2147483648>, actual: <2147483648>) fails.
#0 Expect._fail (package:expect/expect.dart:655:5)
#1 Expect.equals (package:expect/expect.dart:126:5)
#2 testBoxPointer (file:///C:/src/dart-sdk/sdk/tests/standalone_2/ffi/function_stress_test.dart:85:10)
#3 test (file:///C:/src/dart-sdk/sdk/tests/standalone_2/ffi/function_stress_test.dart:22:11)
<asynchronous suspension>
#4 main (file:///C:/src/dart-sdk/sdk/tests/standalone_2/ffi/function_stress_test.dart:43:11)
<asynchronous suspension>
#5 _startIsolate.<anonymous closure> (dart:isolate/runtime/lib/isolate_patch.dart:300:19)
#6 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/lib/isolate_patch.dart:171:12)
--- Re-run this test:
python tools/test.py -n dartk-win-debug-x64 standalone_2/ffi/function_stress_test Which shows that the integer is not correctly sign extended. Already tracked in #36122. (Note that this only shows up with GCWatcher.dummy() otherwise stderr is captured and not displayed.) |
How is the first crash related to #36098? The failing assertion is "IsWellFormed()', not "UNREACHABLE()". |
You are right, I missed that. I've seen the @sjindel-google have you ever seen it in the code in which you ported the stubs to IL? |
The stack frame that has a dangling pointer is the FFI trampoline stack frame.
The FFI stack frame is regarded as a normal frame if an allocation stub is called in it, and thus it is scanned. This should be fixed with the IL CL (update: yes it is fixed in the IL CL). |
Enables dart:ffi on Windows 64 bit. Note that function_stress_test.dart fails in two different ways, these are known bugs. #36138 Closes: #35771 Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Samir Jindel <sjindel@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
This reverts commit 7f812de. Reason for revert: Flutter build is broken on Golem. Original change's description: > [vm/ffi] Support Windows 64 bit > > Enables dart:ffi on Windows 64 bit. > > Note that function_stress_test.dart fails in two different ways, these are known bugs. #36138 > > Closes: #35771 > Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660 > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647 > Commit-Queue: Daco Harkes <dacoharkes@google.com> > Reviewed-by: Samir Jindel <sjindel@google.com> > Reviewed-by: Martin Kustermann <kustermann@google.com> TBR=kustermann@google.com,sjindel@google.com,dacoharkes@google.com Change-Id: I5be4538e3c99632a852e4dfb856248eb437fb3ea No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96683 Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Enables dart:ffi on Windows 64 bit. Note that function_stress_test.dart fails in two different ways, these are known bugs. #36138 Relanding: Fixed compilation on Android. Closes: #35771 Change-Id: I7d0c8b64ca8c1726b7d264d4fd9213299a9f7df6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96781 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
With stubs in IL, I'm getting:
|
Same issue as I mentioned last week. Looks like 0x80000000 is not sign extended into 0xFFFFFFFF80000000. You already filed an issue for that: #36122. |
The FFI trampoline is not supposed to sign-extend it here. The return value is 64-bits already. |
I see, but it does work correctly on Linux? |
Yes, it does; the status file enables it on Linux. |
The way of capturing stderr on Linux/MacOS does not work on Windows.
Test failure:
@sjindel-google
The text was updated successfully, but these errors were encountered: