-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Large jupyter cell output causes OOM crash #168142
Comments
I have exactly the same issue with a large amount of image output inside vscode running a notebook. I am going to set up standard Jupyter and see if I can duplicate the problem there. |
I can reproduce this issue, sometimes it crashed but sometimes it becomes responsive after waiting for minutes. Profiling this and it turns out that the process is stuck at sending output buffers to the webview From the comment it seems we might be aware of this vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts Lines 1341 to 1343 in 5cc938b
|
FWIW: I apologize, I meant to get back to this and post my results. I did as I said, I fired up a standard jupyter hub, and ran the same notebooks. No issues. I've been running that since on all work, and again no issues. Hope that helps. |
Looks like there's a cell with thousands of output items. I created a smaller version of the notebook which slows down VS Code but does not crash it so we can investigate this: big-small.ipynb.zip Profiling, it seems that no one call cause the the issue. Instead the issue appears to be that we're performing certain operations thousands of times as fast as possible Here's sending a profile of where we're sending outputs to the webview one by one: And here's us rendering outputs in the webview one by one: The actual rendering is relatively fast by there's a lot of overhead to handling each message Two proposals:
|
For microsoft#168142 Follow up on 9fd77b4. Applies the same optimization to `updateOutput` as well
This seems fixed after 9fd77b4. Opening the original notebook, I no longer see an OOM crash or lengthy freeze The notebook does still jump around a little while loading content and there's likely plenty of further optimization opportunities, but I'm closing this since the original issue seemed to be resolved |
Type: Performance Issue
When opening a specific notebook file, which has a cell with a lot of image output, vscode would use up a lot of memory in an attempt to display it, before crashing with an OOM error.
Though oddly enough sometimes it recovers, and successfully renders the content of the cell but the probability of it happening is slim.
This happens on a clean installation of vscode and vscode insiders, both local and browser versions.
This doesn't seem to happen on the regular jupyter client.
Reproduction steps:
Results
Vscode will chew through all available system memory, before crashing.
Expectations
VSCode doesn't crash
VS Code version: Code 1.73.1 (6261075, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.22623
Modes:
Sandboxed: No
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Process Info
Workspace Info
Extensions (37)
The text was updated successfully, but these errors were encountered: