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

Workbench hang/crash: out of memory error #1634

Open
emlys opened this issue Sep 25, 2024 · 1 comment
Open

Workbench hang/crash: out of memory error #1634

emlys opened this issue Sep 25, 2024 · 1 comment
Labels
bug Something isn't working workbench For issues relating to the workbench front-end of invest

Comments

@emlys
Copy link
Member

emlys commented Sep 25, 2024

Observed a new out-of-memory error state in the workbench that I haven't seen before.

This was while testing https://github.com/emlys/invest/tree/feature/d8-routing, so there might be a memory leak that I need to fix; but the model run itself succeeds, so this still seems like a workbench issue.

When running SDR, the model would finish but the workbench tab would not update to indicate that. The UI was frozen ( "Running" spinner continues to spin, but I couldn't click on any buttons). Sometimes it would remain frozen indefinitely, sometimes it would crash with this message:

[1] [13:59:50.874] [undefined] send code  0 to  invest-exit-655112032
[1] [13:59:50.875] [undefined] invest exited with code: 0 and signal: null
[1] [13:59:50.875] [undefined] invest subprocess stdio streams closed
[1] 
[1] <--- Last few GCs --->
[1] l [66546:0x7f96e0008000]   130625 ms: Mark-Compact 78.8 (87.2) -> 78.8 (86.2) MB, 13.14 / 0.02 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2397 ms) (average mu = 0.999, current mu = 0.995) external f[66546:0x7f96e0008000]   141538 ms: Mark-Compact 78.8 (86.2) -> 78.8 (86.2) MB, 20.74 / 0.02 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2321 ms) (average mu = 0.998, current mu = 0.998) external f
[1] 
[1] <--- JS stacktrace --->
[1] 
[1] [66546:0925/140132.787717:ERROR:v8_initializer.cc(753)] V8 process OOM (Oilpan: Reserving memory.).
[1] [14:01:32.794] [undefined] render-process-gone
[1] Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
[1]     at s.send (node:electron/js2c/browser_init:2:94175)
[1]     at _.send (node:electron/js2c/browser_init:2:79325)
[1]     at /Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:205:23
[1]     at Array.forEach (<anonymous>)
[1]     at sendIpcToRenderer (/Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:203:42)
[1]     at Object.sendIpc (/Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:185:5)
[1]     at transport (/Users/emily/invest/workbench/node_modules/electron-log/src/transports/ipc.js:40:17)
[1]     at runTransport (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:44:5)
[1]     at runTransports (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:27:7)
[1]     at log (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:21:3)
[1] [14:01:32.797] [undefined] { reason: 'crashed', exitCode: 5 }
[1] Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
[1]     at s.send (node:electron/js2c/browser_init:2:94175)
[1]     at _.send (node:electron/js2c/browser_init:2:79325)
[1]     at /Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:205:23
[1]     at Array.forEach (<anonymous>)
[1]     at sendIpcToRenderer (/Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:203:42)
[1]     at Object.sendIpc (/Users/emily/invest/workbench/node_modules/electron-log/src/electronApi.js:185:5)
[1]     at transport (/Users/emily/invest/workbench/node_modules/electron-log/src/transports/ipc.js:40:17)
[1]     at runTransport (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:44:5)
[1]     at runTransports (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:27:7)
[1]     at log (/Users/emily/invest/workbench/node_modules/electron-log/src/log.js:21:3)

This is happening consistently each time I run SDR (but not NDR or SWY) on my branch. I added some logging and confirmed that the model exit signal was sent from the main process, but the renderer process didn't appear to receive it.

@emlys emlys added bug Something isn't working workbench For issues relating to the workbench front-end of invest labels Sep 25, 2024
@davemfish
Copy link
Contributor

The only other OOM error we've seen from the renderer is related to logging. #1497

I'm not sure if that applies here, but if the bug is in the Workbench, it's hard to think of what else besides logging could potentially consume too much memory.

If something else on the system is consuming all the memory, I could still imagine V8 crashing if it can't allocate what it needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working workbench For issues relating to the workbench front-end of invest
Projects
None yet
Development

No branches or pull requests

2 participants