-
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
Crash when debugging sunflower sample #2150
Comments
This comment was originally written by @mhausner At what chagelist/revision of the Dart runtime is this happening? If this is before r5436, it most likely is due to optimized code. After this change, the debugger knows how to deoptimize functions when breakpoints are set in optimized code. |
This comment was originally written by podivilov@google.com I still see the crash at r5464. Matthias, could you please take a look? ASSERT(bpt->breakpoint_kind_ == PcDescriptors::kReturn) is failed: #0 *__GI_abort () at abort.c:128 Set owner to @mhausner. |
This comment was originally written by @mhausner Thank you Pavel. I will take a look today. |
This comment was originally written by podivilov@google.com Please note that in debug mode it stops at "void drawFrame() {" for some reason. You need to hit F11 twice to observe the crash. |
This comment was originally written by @mhausner I cannot reproduce the crash/assert mentioned above. I do however have an explanation why the breakpoint got set in the line "void drawFrame()". The line info was off because the debugger indeed set the breakpoint at the wrong location. I have a fix for that that I'll send for review in a moment. When I run Dartium in --single-process mode, I get a different assertion when the debugger breaks at line 19:
Fatal error in ../../src/objects-inl.h, line 1461CHECK(index < GetInternalFieldCount() && index >= 0) failedAbort trap I am not sure this has anything to do with the debugger. If I run Dartium in regular mode (not single process) then everything works fine and I can single-step through the entire Sunflower code, including the closure that gets called when the slider value changes. Please try again once the breakpoint location bug is fixed. |
This comment was originally written by @mhausner Please try with a VM at r5501 or newer and let me know whether the crash can be reproduced. |
This comment was originally written by podivilov@google.com At r5512 it still crashes.
|
This comment was originally written by @mhausner Strange. I cannot reproduce the crash. The debugger correctly steps into drawFrame() and i can step through that function as well. This is on the mac with the command line: ./xcodebuild/Debug/Chromium.app/Contents/MacOS/Chromium If I start Dartium in single process mode, like so: ./xcodebuild/Debug/Chromium.app/Contents/MacOS/Chromium --single-process I do see a crash even in item 3) in your list, stepping over line 31. The crash is in v8 code though. This is what the console output is: Fatal error in ../../src/objects-inl.h, line 1461CHECK(index < GetInternalFieldCount() && index >= 0) failedWhat could I be doing wrong for me not to see the crash? Are you seeing this on Linux or on the Mac? I've had bugs before that only showed on one OS but not the other. In that case it was an uninitialized variable. |
This comment was originally written by lod...@google.com For me, currently, on Linux, with the Dartium version that comes with the |
This comment was originally written by @mhausner The inaccurate breakpoint locations are an known issue I have on my list of things to improve. In particular at the end of functions, the line number is off. Sunflower is a neat small piece of Dart code that seems to contain a number of interesting corner cases for the debugger. I wouldn't call the Sunflower code odd. The debugger code is just not ready for prime time just yet. |
This comment was originally written by podivilov@google.com Looks like this problem shows up on linux only. Latest linux build still crashes in sunflower's main() on "ASSERT(bpt->breakpoint_kind_ == PcDescriptors::kReturn)". Added OpSys-Linux label. |
This comment was originally written by @mhausner Ok, I figured it out. It's a use-after-free bug. Linux seems to poison the freed block but not MacOS. I'll have a fix out shortly. |
Revisions updated by `dart tools/rev_sdk_deps.dart`. dartdoc (https://github.com/dart-lang/dartdoc/compare/793d575..4757339): 47573391 2023-06-21 Sam Rawlins Remove dependency on code_builder (#3451) 370cb2c4 2023-06-21 Sam Rawlins Remove all use of package:build (#3448) 70c2897b 2023-06-20 Sam Rawlins Simplify some code in PackageBuilder (#3447) 1a8403ec 2023-06-20 Sam Rawlins Rank libraries lower than classes and class members (#3446) lints (https://github.com/dart-lang/lints/compare/4b79906..79581ff): 79581ff 2023-06-20 Devon Carew update core and recommended from the recent review (#136) test (https://github.com/dart-lang/test/compare/3d5afed..cdc8178): cdc8178b 2023-06-21 Nate Bosch Ignore a false positive for unreachable_from_main (#2041) vector_math (https://github.com/google/vector_math.dart/compare/a3aca09..c147038): c147038 2023-06-20 Lukas Klingsbo `Vector2` constructor benchmark (#297) web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/af72652..7fb82f2): 7fb82f2 2023-06-21 Brian Quinlan Add a note explaining why the onerror doesn't generate a more detailed exception (#273) webdev (https://github.com/dart-lang/webdev/compare/b58edb7..6fe17fe): 6fe17fe8 2023-06-21 Elliott Brooks Prepare Webdev `3.0.5` release (#2151) 3b7f266c 2023-06-21 Elliott Brooks Small fixes for the `release` script (#2150) 45446ec9 2023-06-20 Elliott Brooks Reset DWDS to `19.0.2-wip` (#2149) 91cbd183 2023-06-20 Elliott Brooks Prepare DWDS for release to version 19.0.1 (#2145) a7b81589 2023-06-20 Elliott Brooks Don't run proper_release_test with the rest of the test common tests (#2146) aa586d29 2023-06-20 Elliott Brooks Fix DCM errors in `chrome_proxy_service.dart` (#2148) Change-Id: I27850a0b8b1241b03f07a5832555d4da6dfbff44 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/310962 Auto-Submit: Devon Carew <devoncarew@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This issue was originally filed by podivilov@google.com
Open samples/sunflower/sunflower.html in Dartium. Open the developer tools, refresh to see the source files, and place a breakpoint in sunflower.dart on line 19 (PHI = ...). Then refresh.
The text was updated successfully, but these errors were encountered: