Running scripts crash when terminal (host) crashes, please keep 'm running! #14998

Closed
opened 2026-01-31 04:25:34 +00:00 by claunia · 10 comments
Owner

Originally created by @Darkster1 on GitHub (Aug 28, 2021).

I'm coding some scripts that I run via this terminal app, it's great because having all running instances in one Window is easier then having multiple windows open.

But when the terminal crashes it takes all running scrips down with it.

Please allow running programs (like nodejs) to keep running when the terminal rans into an issue (in their own windows) instead of forcefully closing 'm all down.
I made a few save state functions that save the scripts state every now and then but even that isn't 100% because a few times the save files where left with "NULL"'s in there only.

I don't know when the terminal crashes it's quite Russian Roulette and there's no error message on screen usually when I see my mouse cursor change to the "loading one" I know what time it is... the last time I tried killing werfault.exe but sadly that didn't block / stop the terminal from being purged neither.

I like the terminal app but there are certainly a few things that need to be taken care off or I'd rather use multiple instances / windows of cmd open instead of having them in one window crashing.

I'd suggest a save state for running instances anyways cuz that would be best (for example when Windows decides to reboot (even when updates set to manual) it would be nice to resume where left off.

Originally created by @Darkster1 on GitHub (Aug 28, 2021). I'm coding some scripts that I run via this terminal app, it's great because having all running instances in one Window is easier then having multiple windows open. But when the terminal crashes it takes all running scrips down with it. Please allow running programs (like nodejs) to keep running when the terminal rans into an issue (in their own windows) instead of forcefully closing 'm all down. I made a few save state functions that save the scripts state every now and then but even that isn't 100% because a few times the save files where left with "NULL"'s in there only. I don't know when the terminal crashes it's quite Russian Roulette and there's no error message on screen usually when I see my mouse cursor change to the "loading one" I know what time it is... the last time I tried killing werfault.exe but sadly that didn't block / stop the terminal from being purged neither. I like the terminal app but there are certainly a few things that need to be taken care off or I'd rather use multiple instances / windows of cmd open instead of having them in one window crashing. I'd suggest a save state for running instances anyways cuz that would be best (for example when Windows decides to reboot (even when updates set to manual) it would be nice to resume where left off.
Author
Owner

@zadjii-msft commented on GitHub (Sep 2, 2021):

when the terminal crashes

I'd much rather just make sure the Terminal doesn't crash 😉 Does the Terminal crash fairly reproducibly for you? If so, I'd love a Feedback hub trace to try and get at the root cause: /feedback

@zadjii-msft commented on GitHub (Sep 2, 2021): > when the terminal crashes I'd much rather just make sure the Terminal doesn't crash 😉 Does the Terminal crash fairly reproducibly for you? If so, I'd love a Feedback hub trace to try and get at the root cause: /feedback
Author
Owner

@ghost commented on GitHub (Sep 2, 2021):

Hi there!

Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?

Thanks!

image image

@ghost commented on GitHub (Sep 2, 2021): Hi there!<br><br>Can you please send us feedback with the Feedback Hub with this issue and paste the link here so we can more easily find your crash information on the back end?<br><br>Thanks!<br><br>![image](https://user-images.githubusercontent.com/18221333/62478757-b69d0d00-b760-11e9-9626-1fa33c91e7c5.png) ![image](https://user-images.githubusercontent.com/18221333/62478649-6de55400-b760-11e9-806e-5aab7e085a9f.png)
Author
Owner

@Darkster1 commented on GitHub (Sep 3, 2021):

I have done that allready, looking it up I'll edit it to this reply asap.

@Darkster1 commented on GitHub (Sep 3, 2021): I have done that allready, looking it up I'll edit it to this reply asap.
Author
Owner

@Darkster1 commented on GitHub (Sep 3, 2021):

Guess, the feedback wasn't sent the first time. Here's a new one.
ak.ms/AAdoyam

@Darkster1 commented on GitHub (Sep 3, 2021): Guess, the feedback wasn't sent the first time. Here's a new one. ak.ms/AAdoyam
Author
Owner

@Darkster1 commented on GitHub (Sep 5, 2021):

I hope the above helps, maybe FBH included some logging, otherwise this is an example of wwhat gets logged in the Windows Event Viewer:

Faulting application name: WindowsTerminal.exe, version: 1.10.2107.12003, time stamp: 0x60ecd68c
Faulting module name: Windows.UI.Xaml.dll, version: 10.0.22000.120, time stamp: 0xce0f77c7
Exception code: 0xc000027b
Fault offset: 0x000000000086b0bc
Faulting process ID: 0x40a4
Faulting application start time: 0x01d7a1b485af6d9d
Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe
Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll
Report ID: c6ebc0d9-3c63-4842-ace1-1d1304d10b59
Faulting package full name: Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe
Faulting package-relative application ID: App

and
[code]
Fault bucket 1564995641997311336, type 5
Event Name: MoBEX
Response: Not available
Cab Id: 0

Problem signature:
P1: Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe
P2: praid:App
P3: 1.10.2107.12003
P4: 60ecd655
P5: ucrtbase.dll
P6: 10.0.22000.1
P7: 00e78ce9
P8: 000000000007dd7e
P9: c0000409
P10: 0000000000000007

@Darkster1 commented on GitHub (Sep 5, 2021): I hope the above helps, maybe FBH included some logging, otherwise this is an example of wwhat gets logged in the Windows Event Viewer: ``` Faulting application name: WindowsTerminal.exe, version: 1.10.2107.12003, time stamp: 0x60ecd68c Faulting module name: Windows.UI.Xaml.dll, version: 10.0.22000.120, time stamp: 0xce0f77c7 Exception code: 0xc000027b Fault offset: 0x000000000086b0bc Faulting process ID: 0x40a4 Faulting application start time: 0x01d7a1b485af6d9d Faulting application path: C:\Program Files\WindowsApps\Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe\WindowsTerminal.exe Faulting module path: C:\Windows\System32\Windows.UI.Xaml.dll Report ID: c6ebc0d9-3c63-4842-ace1-1d1304d10b59 Faulting package full name: Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe Faulting package-relative application ID: App and [code] Fault bucket 1564995641997311336, type 5 Event Name: MoBEX Response: Not available Cab Id: 0 ``` Problem signature: P1: Microsoft.WindowsTerminalPreview_1.10.1933.0_x64__8wekyb3d8bbwe P2: praid:App P3: 1.10.2107.12003 P4: 60ecd655 P5: ucrtbase.dll P6: 10.0.22000.1 P7: 00e78ce9 P8: 000000000007dd7e P9: c0000409 P10: 0000000000000007 ```
Author
Owner

@DanPinGF commented on GitHub (Dec 9, 2021):

Hmm... from what I know so far, the MoBEX error probably has to do with Data Execution Prevention (DEP) forcing Terminal to shut down due to suspicious behavior. Likely appears to be some sort of heap corruption.

@DanPinGF commented on GitHub (Dec 9, 2021): Hmm... from what I know so far, the MoBEX error probably has to do with Data Execution Prevention (DEP) forcing Terminal to shut down due to suspicious behavior. Likely appears to be some sort of heap corruption.
Author
Owner

@Darkster1 commented on GitHub (Dec 15, 2021):

That might explain some weird nodejs heap out of memory errors (while there was sufficient memory, only just a high CPU load). The system was quite old anyways and died a week ago, replaced motherboard, memory etc and haven't seen the behaviour anymore so maybe it was a faulty mb, still the feature to grab console's running in the background (hidden) or "left behind" if the terminal does crash for some reason would be a nice one I guess.
I had written a DLL that could be injected into the ghost processes to read respawn a console window (kind a dirty, but it worked).
Ow that DLL was created after this post so it doesn't have anything todo with the issues.

@Darkster1 commented on GitHub (Dec 15, 2021): That might explain some weird nodejs heap out of memory errors (while there was sufficient memory, only just a high CPU load). The system was quite old anyways and died a week ago, replaced motherboard, memory etc and haven't seen the behaviour anymore so maybe it was a faulty mb, still the feature to grab console's running in the background (hidden) or "left behind" if the terminal does crash for some reason would be a nice one I guess. I had written a DLL that could be injected into the ghost processes to read respawn a console window (kind a dirty, but it worked). Ow that DLL was created after this post so it doesn't have anything todo with the issues.
Author
Owner

@Darkster1 commented on GitHub (Sep 26, 2022):

Any updates on this, for some reason the terminal crashes sooo often and nowhere I can configure it ot LEAVE child processes RUNNING! please FIX this.... googling arround only finds the opposite "how to kill child processes" they are killed in fact and they should'nt! Thanks

@Darkster1 commented on GitHub (Sep 26, 2022): Any updates on this, for some reason the terminal crashes sooo often and nowhere I can configure it ot LEAVE child processes RUNNING! please FIX this.... googling arround only finds the opposite "how to kill child processes" they are killed in fact and they should'nt! Thanks
Author
Owner

@zadjii-msft commented on GitHub (Dec 14, 2022):

Heyo so we looped back on this as a team.

The right solution here is the Terminal shouldn't crash, not "we should try and orphan our processes when we crash so they can keep them running".

If you're still seeing crashes in the Terminal, we'll probably need a fresh feedback hub link, with a trace of the crash, to actually find a stack.

My other crazy theory is that this isn't the Terminal crashing at all - this is the Store killing the Terminal to install an update. If this isn't something that happens frequently, then it might just be correlated with updates. We actually just pushed a minor version update, which might trigger this again.

(notes: this did get promoted to MSFT:35766163, but there's seemingly no crashes associated with this device, at least none that I can find).

@zadjii-msft commented on GitHub (Dec 14, 2022): Heyo so we looped back on this as a team. The right solution here is _the Terminal shouldn't crash_, not "we should try and orphan our processes when we crash so they can keep them running". If you're still seeing crashes in the Terminal, we'll probably need a fresh feedback hub link, with a trace of the crash, to actually find a stack. My other crazy theory is that this isn't the Terminal crashing **at all** - this is the _Store killing the Terminal to install an update_. If this isn't something that happens frequently, then it might just be correlated with updates. We actually just pushed a minor version update, which might trigger this again. (notes: this did get promoted to MSFT:35766163, but there's seemingly no crashes associated with this device, at least none that I can find).
Author
Owner

@ghost commented on GitHub (Dec 19, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Dec 19, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14998