-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[DAP] "Sentinel kind: Expired" when looking at large maps #54897
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
Comments
/cc @bkonyi |
Unfortunately, this is probably working as intended. The VM service uses a ring buffer to allocate IDs to objects it sends over the service protocol but the ring buffer currently only has the capacity for 8192 objects. If the ring buffer wraps around, older object IDs are overwritten and will give an We can work around this by requesting subsets of large collections to avoid causing the object ID buffer to immediately wrap around. This is something we do in the DevTools debugger, but I'm not sure we do in the Dart-Code VSCode plugin (cc @DanTup to confirm). We may end up increasing the size of the object ID ring buffer at some point. However, that would have implications on memory usage and possibly GC performance, and still wouldn't completely solve the problem for very large collections. |
I have a change at https://dart-review.googlesource.com/c/sdk/+/364860 that improves this slightly, by not failing the entire request just because we couldn't fetch the strings: However, we should also support paging here and limiting the calls we make so that we're not blowing the buffer that results in sentinels like this. |
…error to clients getObject and invoke would `throw` if the response was a sentinel and that wasn't handled correctly, which meant sometimes an entire variables request would fail instead of only the individual values (eg. in a map/list) being shown as erroring. This improves #54897 (you'll no longer see the entire request fail), but it still needs paging adding too. Change-Id: Ic3ed3bee7c1dd647ebae843007bd30b0e1fda590 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364860 Reviewed-by: Helin Shiah <helinx@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com>
Unfortunately it turns out that VS Code does not support paging for maps ("named variables") only for lists ("indexed variables"): So since the other parts of this are addressed above, I'm going to close this as done. If it turns out large maps are a problem, we can try to resurrect the VS Code issue. |
When running Flutter I came across this error, while looking at a data structure that was large. This happened while I was debugging and had put a breakpoint on as was wanting to investigate a large variable and its map values.
Steps to reproduce(in flutter, if you need I can provide the code here)
When it stops. Goto the variables (run and debug). Expand out globals. expand out complexObject. Expand out dicByDayOfFloorIDs, expand "0", expand values. and then you will see the message "[Sentinel kind: Expired, valueAsString: ] from invoke()"
Running on a mac
Apple M1 Max
64 GB
Macintosh HD
14.2.1 (23C71)
macOS (desktop) • macos • darwin-arm64 • macOS 14.2.1 23C71 darwin-arm64
building for MacOS
here is flutter doctor -v
[✓] Flutter (Channel beta, 3.19.0-0.4.pre, on macOS 14.2.1 23C71 darwin-arm64, locale en-NZ)
• Flutter version 3.19.0-0.4.pre on channel beta at /Users/xxx
• Upstream repository https://github.com/xxx
• Framework revision flutter/flutter@b7e7d46 (10 days ago), 2024-02-02 08:21:06 -0600
• Engine revision 98820f0a77
• Dart version 3.3.0 (build 3.3.0-279.3.beta)
• DevTools version 2.31.0
Let me know if you need any more information?
The text was updated successfully, but these errors were encountered: