Deploying webapp crashes every time
Issue Type: Bug
Deploying my node.js app to azure is not possible anymore. This currently stops me from publishing a new version.
Steps to reproduce:
- Right-click application in vscode
- Choose "deploy web app". Select web app and confirm deployment.
- Extension host crashes after a minute.
Running extension bisect, it figures out that the azure app service extension is the one that makes extension host crash.
When opening devtools, I see the stack trace at the bottom of this message. I have tried everything - restart computer and only have vscode open. I have successfully published the app many times before.
Stack trace: <--- Last few GCs --->[1611:0x2f00000000] 149598 ms: Scavenge 3788.9 (3961.1) -> 3785.6 (3962.3) MB, 7.3 / 0.0 ms (average mu = 0.919, current mu = 0.860) task [1611:0x2f00000000] 149643 ms: Scavenge 3790.5 (3962.6) -> 3787.3 (3964.1) MB, 5.9 / 0.0 ms (average mu = 0.919, current mu = 0.860) task [1611:0x2f00000000] 149691 ms: Scavenge 3792.1 (3964.1) -> 3789.0 (3964.1) MB, 7.8 / 0.0 ms (average mu = 0.919, current mu = 0.860) task <--- JS stacktrace --->FATAL ERROR: NewSpace::Rebalance Allocation failed - JavaScript heap out of memory 1: 0x1112e9905 node::Buffer::New(v8::Isolate*, char*, unsigned long, void ()(char, void*), void*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 2: 0x1112e9aa6 node::OnFatalError(char const*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 3: 0x111faebb3 v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 4: 0x111faeb0f v8::internal::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 5: 0x11205a205 v8::internal::Heap::PreciseCollectAllGarbage(int, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 6: 0x10ed132ce v8::internal::LocalHeap::InvokeGCEpilogueCallbacksInSafepoint() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 7: 0x10ed10640 v8::internal::LocalHeap::InvokeGCEpilogueCallbacksInSafepoint() [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 8: 0x10ecec650 v8::internal::Heap::MaxRegularHeapObjectSize(v8::internal::AllocationType) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework] 9: 0x10ecbb0e2 v8::internal::FactoryBasev8::internal::Factory::NewRawOneByteString(int, v8::internal::AllocationType) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]10: 0x10ef0e8be v8::internal::String::SlowFlatten(v8::internal::Isolate*, v8::internal::Handlev8::internal::ConsString, v8::internal::AllocationType) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]11: 0x10efd394d v8::internal::RegExp::Exec(v8::internal::Isolate*, v8::internal::Handlev8::internal::JSRegExp, v8::internal::Handlev8::internal::String, int, v8::internal::Handlev8::internal::RegExpMatchInfo, v8::internal::RegExp::ExecQuirks) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]12: 0x10efea42c v8::internal::Runtime::SetObjectProperty(v8::internal::Isolate*, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::Handlev8::internal::Object, v8::internal::StoreOrigin, v8::Maybev8::internal::ShouldThrow) [/Applications/Visual Studio Code.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework]13: 0x2f000b2298
Extension version: 0.9.11 VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:37:28.172Z) OS version: Darwin x64 20.6.0 Restricted Mode: No
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200) |
| GPU Status | 2d_canvas: enabled gpu_compositing: enabled metal: disabled_off multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on rasterization: enabled skia_renderer: disabled_off_ok video_decode: enabled webgl: enabled webgl2: enabled |
| Load (avg) | 3, 3, 3 |
| Memory (System) | 16.00GB (3.48GB free) |
| Process Argv | --crash-reporter-id aa66e8db-98e5-43a4-bd6e-e9982e81dbeb |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythontb:30283811
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30384385
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30410667
vscop804cf:30404767
vscop453:30404998
vsrem710cf:30405999
vscexrecpromp3t2:30407763
From my part, the issue has been resolved. First of all I found other ways of deploying the node app - via az command line. Secondly, the state that trigger the crash seemed to be the existance of symlink in node_modules - I've used yarn link to certain packages and probably this led to circular iterations some how.
Better Repro instructions:
So to repro this, I would suggest to:
- Create a simple node package (foo) on hard drive
- Run
yarn linkwhen standing in the root of this package - Create a sub folder to the package ("bar") and add bar to .npmignore
- In the sub folder "bar", create another node package (bar)
- Do
yarn add foowhen standing in bar (HERE we create a circular symlink that could possibly be the cause) - Create a simple hello world node web app on some other location on hard drive.
- Do
yarn link a foowhen standing in the root of the new node app. - Deploy the web app from visual studio
Thanks for the information. We've had issues with symlink in the past. Hopefully we can see what the CLI is doing to prevent these problems.
https://github.com/microsoft/vscode-azureappservice/issues/1299#issuecomment-560815719