terminal icon indicating copy to clipboard operation
terminal copied to clipboard

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

Open Darkster1 opened this issue 3 years ago • 10 comments

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.

Darkster1 avatar Aug 28 '21 00:08 Darkster1

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 avatar Sep 02 '21 17:09 zadjii-msft

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 avatar Sep 02 '21 17:09 ghost

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

Darkster1 avatar Sep 03 '21 13:09 Darkster1

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

Darkster1 avatar Sep 03 '21 16:09 Darkster1

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 avatar Sep 05 '21 14:09 Darkster1

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 avatar Dec 09 '21 22:12 DanPinGF

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 avatar Dec 15 '21 20:12 Darkster1

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 avatar Sep 26 '22 05:09 Darkster1

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 avatar Dec 14 '22 22:12 zadjii-msft

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 avatar Dec 19 '22 01:12 ghost