tartelet icon indicating copy to clipboard operation
tartelet copied to clipboard

Sporadic crashes

Open tonyarnold opened this issue 1 year ago • 1 comments

What happened?

Tartelet is crashing for me on my CI boxes.

What are the steps to reproduce?

There's no way to reliably reproduce the issue, but it happens at least once a day.

Here is the crash report:

Tartelet-2024-09-04-181504.ips.zip

What is the expected behavior?

Tartlet doesn't crash.

tonyarnold avatar Sep 09 '24 11:09 tonyarnold

@simonbs do you keep copies of the dSYMs so that I might be able to help fix this?

tonyarnold avatar Sep 09 '24 11:09 tonyarnold

I am getting the same crash trace. Both are Tartelet 0.9.0 on MacOS 14.6 & 15.1

Tartelet-2024-11-08-013250.ips.zip

Would be great if this could be investigated.

kuhnroyal avatar Nov 08 '24 09:11 kuhnroyal

Seeing that there is a 0.10.0 in the repo

kuhnroyal avatar Nov 08 '24 10:11 kuhnroyal

I don't have a lot of time to investigate this, unfortunately, but if anyone does, I'd be happy to review a PR with a fix 🤗

simonbs avatar Nov 08 '24 10:11 simonbs

Do you have the Symbols from the 0.9.0 build?

kuhnroyal avatar Nov 08 '24 10:11 kuhnroyal

Actually the 0.10.0 build (the MARKETING_VERSION was not bumped before the release).

kuhnroyal avatar Nov 08 '24 10:11 kuhnroyal

I do not seem to have the symbols anymore, unfortunately. If you'd like to look into this, you may need to create and sign a new build.

simonbs avatar Nov 08 '24 10:11 simonbs

I created a new unsigned build with debug symbols and managed to deploy it to one of my runners. Will see if it happens again.

kuhnroyal avatar Nov 08 '24 18:11 kuhnroyal

Hmm this doesn't seem to work, too many things related to signing in order to access the Keychain and Github Key. Would be great if you can just create a new version with symbols.

kuhnroyal avatar Nov 08 '24 19:11 kuhnroyal

Got it working and got a crash on the runner with a stack:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000018be20300 __exceptionPreprocess + 176
	1   libobjc.A.dylib                     0x000000018b906cd8 objc_exception_throw + 88
	2   Foundation                          0x000000018cfd71a4 -[NSConcreteTask launchWithDictionary:error:] + 4224
	3   Tartelet.debug.dylib                0x0000000105bf5f08 $s9ShellData07ProcessA0V13runExecutable6atPath13withArguments11environmentS2S_SaySSGSDyS2SGtYaKFSSyYaKXEfU_TY0_ + 688
	4   Tartelet.debug.dylib                0x0000000105bf61f9 $s9ShellData07ProcessA0V13runExecutable6atPath13withArguments11environmentS2S_SaySSGSDyS2SGtYaKFSSyYaKXEfU_TATQ0_ + 1
	5   libswift_Concurrency.dylib          0x00000002667d0b59 $ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlFTQ1_ + 1
	6   Tartelet.debug.dylib                0x0000000105bf652d $ss27withTaskCancellationHandler9operation8onCancel9isolationxxyYaKXE_yyYbXEScA_pSgYitYaKlFTwbTQ1_ + 1
	7   Tartelet.debug.dylib                0x0000000105bf58d1 $s9ShellData07ProcessA0V13runExecutable6atPath13withArguments11environmentS2S_SaySSGSDyS2SGtYaKFTQ1_ + 1
	8   Tartelet.debug.dylib                0x0000000105bf6785 $s9ShellData07ProcessA0V0A6Domain0A0AadEP13runExecutable6atPath13withArguments11environmentS2S_SaySSGSDyS2SGtYaKFTWTQ0_ + 1
	9   Tartelet.debug.dylib                0x0000000105bf753d $s11ShellDomain0A0PAAE13runExecutable6atPath13withArgumentsS2S_SaySSGtYaKFTQ1_ + 1
	10  Tartelet.debug.dylib                0x0000000105bf6655 $s9ShellData07ProcessA0V0A6Domain0A0AadEP13runExecutable6atPath13withArgumentsS2S_SaySSGtYaKFTWTQ0_ + 1
	11  Tartelet.debug.dylib                0x000000010645e2c1 $s18VirtualMachineData4TartV14executeCommand33_9EACAB9CD8D1742D82D3EBC575B07CB5LL13withArgumentsSSSaySSG_tYaKFTQ3_ + 1
	12  Tartelet.debug.dylib                0x000000010645fbf9 $s18VirtualMachineData4TartV12getIPAddress02ofaB5NamedS2S_tYaKFTQ1_ + 1
	13  Tartelet.debug.dylib                0x0000000106460d49 $s18VirtualMachineData04TartaB0C12getIPAddressSSyYaKFTQ1_ + 1
	14  Tartelet.debug.dylib                0x00000001064612e1 $s18VirtualMachineData04TartaB0C0aB6Domain0aB0AadEP12getIPAddressSSyYaKFTWTQ0_ + 1
	15  Tartelet.debug.dylib                0x000000010645c8f1 $s18VirtualMachineData08RetryingaB15IPAddressReaderV04readE02ofSS0aB6Domain0aB0_p_tYaKFTQ1_ + 1
	16  Tartelet.debug.dylib                0x000000010645d23d $s18VirtualMachineData08RetryingaB15IPAddressReaderV0aB6Domain0abeF0AadEP04readE02ofSSAD0aB0_p_tYaKFTWTQ0_ + 1
	17  Tartelet.debug.dylib                0x0000000105ba7c99 $s20VirtualMachineDomain0aB9SSHClientV12getIPAddress33_77B38256CCDAA31D34F1F8798D7E08B8LL2ofSSAA0aB0_p_tYaKFTQ1_ + 1
	18  Tartelet.debug.dylib                0x0000000105ba7479 $s20VirtualMachineDomain0aB9SSHClientV7connect2to17SSHConnectionTypeQzAA0aB0_p_tYaKFTQ1_ + 1
	19  Tartelet.debug.dylib                0x0000000105ba3c41 $s20VirtualMachineDomain013SSHConnectingaB0C7connect33_7D4ED3D71B01983AFA3DA2825F26BEB5LL2tos6ResultOyAA05StartaB5ValueAELLOAA0paB5ErrorAELLOGAA0aB0_p_tYaKFTQ1_ + 1
	20  Tartelet.debug.dylib                0x0000000105ba38d5 $s20VirtualMachineDomain013SSHConnectingaB0C5startyyYaKFyScgys6ResultOyAA05StartaB5Value33_7D4ED3D71B01983AFA3DA2825F26BEB5LLOAA0gaB5ErrorAHLLOGs0Q0_pGzYaKXEfU_ALyYaKcfU0_TQ1_ + 1
	21  Tartelet.debug.dylib                0x0000000105ba6925 $s20VirtualMachineDomain013SSHConnectingaB0C5startyyYaKFyScgys6ResultOyAA05StartaB5Value33_7D4ED3D71B01983AFA3DA2825F26BEB5LLOAA0gaB5ErrorAHLLOGs0Q0_pGzYaKXEfU_ALyYaKcfU0_TATQ0_ + 1
	22  libswift_Concurrency.dylib          0x000000026680d035 _ZL23completeTaskWithClosurePN5swift12AsyncContextEPNS_10SwiftErrorE + 1
)

Coming from this line: https://github.com/shapehq/tartelet/blob/main/Packages/Shell/Sources/ShellData/ProcessShell.swift#L21

I will try to symbolicate this now, never done this, will see.

kuhnroyal avatar Nov 10 '24 12:11 kuhnroyal

So it seems there is a bad file descriptor error when running tart ip NAME during VM startup.

kuhnroyal avatar Nov 10 '24 13:11 kuhnroyal

I think this is the culprit https://github.com/swiftlang/swift/issues/57827 We are just running out of file descriptors for the Pipes.

kuhnroyal avatar Nov 12 '24 10:11 kuhnroyal