I've seen this only once and it was not repeatable.
The full stack trace is 56 mb. Here is the start:
runtime: program exceeds 10000-thread limit
fatal error: thread exhaustion
runtime stack:
runtime.throw({0x7ff7f250ec52?, 0xd8ddbff658?})
runtime/panic.go:1229 +0x4d fp=0xd8ddbff620 sp=0xd8ddbff5f0 pc=0x7ff7f1a64fcd
runtime.checkmcount()
runtime/proc.go:977 +0x8e fp=0xd8ddbff648 sp=0xd8ddbff620 pc=0x7ff7f1a329ae
runtime.mReserveID()
runtime/proc.go:993 +0x2f fp=0xd8ddbff670 sp=0xd8ddbff648 pc=0x7ff7f1a329ef
runtime.startm(0x3c659e748008?, 0x0, 0x0)
runtime/proc.go:3088 +0xf7 fp=0xd8ddbff6b8 sp=0xd8ddbff670 pc=0x7ff7f1a364f7
runtime.handoffp(0x3c659e748008)
runtime/proc.go:3147 +0x2e9 fp=0xd8ddbff6e0 sp=0xd8ddbff6b8 pc=0x7ff7f1a369a9
runtime.retake(0x10dc417faad54)
runtime/proc.go:6715 +0x265 fp=0xd8ddbff750 sp=0xd8ddbff6e0 pc=0x7ff7f1a3f0a5
runtime.sysmon()
runtime/proc.go:6597 +0x3fa fp=0xd8ddbff7e8 sp=0xd8ddbff750 pc=0x7ff7f1a3ec5a
runtime.mstart1()
runtime/proc.go:1935 +0x9d fp=0xd8ddbff810 sp=0xd8ddbff7e8 pc=0x7ff7f1a34c5d
runtime.mstart0()
runtime/proc.go:1888 +0x6a fp=0xd8ddbff838 sp=0xd8ddbff810 pc=0x7ff7f1a34baa
runtime.mstart()
runtime/asm_amd64.s:426 +0xc fp=0xd8ddbff840 sp=0xd8ddbff838 pc=0x7ff7f1a6accc
goroutine 1 gp=0x3c659e7b4000 m=nil [sync.WaitGroup.Wait]:
runtime.gopark(0x7ff7f1a62e85?, 0x18?, 0xf0?, 0xb1?, 0x3c659ed0f038?)
runtime/proc.go:462 +0xce fp=0x3c659ed0efe8 sp=0x3c659ed0efc8 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.semacquire1(0x3c659ea7a070, 0x0, 0x1, 0x0, 0x19)
runtime/sema.go:192 +0x245 fp=0x3c659ed0f050 sp=0x3c659ed0efe8 pc=0x7ff7f1a45b05
sync.runtime_SemacquireWaitGroup(0x3c659ea7a060?, 0xe0?)
runtime/sema.go:114 +0x2e fp=0x3c659ed0f088 sp=0x3c659ed0f050 pc=0x7ff7f1a6650e
sync.(*WaitGroup).Wait(0x3c659ea7a068)
sync/waitgroup.go:206 +0x85 fp=0x3c659ed0f0b0 sp=0x3c659ed0f088 pc=0x7ff7f1a75f25
github.com/microsoft/typescript-go/internal/core.(*parallelWorkGroup).RunAndWait(0x3c659e85e690?)
github.com/microsoft/typescript-go/internal/core/workgroup.go:46 +0x45 fp=0x3c659ed0f0e8 sp=0x3c659ed0f0b0 pc=0x7ff7f1b90c85
github.com/microsoft/typescript-go/internal/compiler.(*filesParser).parse(0x3c659e85e690, 0x3c659f09a0e0?, {0x3c659f51c000?, 0x3c659f20eba0?, 0x3c659f511d10?})
github.com/microsoft/typescript-go/internal/compiler/filesparser.go:201 +0x37 fp=0x3c659ed0f128 sp=0x3c659ed0f0e8 pc=0x7ff7f1fd8437
github.com/microsoft/typescript-go/internal/compiler.processAllProgramFiles({{0x7ff7f26a2b58, 0x3c659e85e640}, 0x3c659e9e02c0, 0x0, 0x0, 0x0, {0x0, 0x0}, {0x0, 0x0}}, ...)
github.com/microsoft/typescript-go/internal/compiler/fileloader.go:152 +0x7d6 fp=0x3c659ed0f8e0 sp=0x3c659ed0f128 pc=0x7ff7f1fd2ff6
github.com/microsoft/typescript-go/internal/compiler.NewProgram({{0x7ff7f26a2b58, 0x3c659e85e640}, 0x3c659e9e02c0, 0x0, 0x0, 0x0, {0x0, 0x0}, {0x0, 0x0}})
github.com/microsoft/typescript-go/internal/compiler/program.go:258 +0x137 fp=0x3c659ed0fae8 sp=0x3c659ed0f8e0 pc=0x7ff7f1fddf17
github.com/microsoft/typescript-go/internal/execute.performCompilation({0x7ff7f26a5400, 0x3c659e876ea0}, 0x3c659e9e02c0, 0x3c659e9cc080, 0x7ff7f268a868, {0x7ff7f26972e0, 0x3c659e825e30}, 0x3c659e843180, {0x0, 0x0})
github.com/microsoft/typescript-go/internal/execute/tsc.go:311 +0x2a9 fp=0x3c659ed0fc80 sp=0x3c659ed0fae8 pc=0x7ff7f21e47a9
github.com/microsoft/typescript-go/internal/execute.tscCompilation({0x7ff7f26a5400, 0x3c659e876ea0}, 0x3c659e9e0000, {0x0, 0x0})
github.com/microsoft/typescript-go/internal/execute/tsc.go:228 +0x100a fp=0x3c659ed0fe98 sp=0x3c659ed0fc80 pc=0x7ff7f21e36aa
github.com/microsoft/typescript-go/internal/execute.CommandLine({0x7ff7f26a5400, 0x3c659e876ea0}, {0x3c659e816050, 0x2, 0x3}, {0x0, 0x0})
github.com/microsoft/typescript-go/internal/execute/tsc.go:36 +0x145 fp=0x3c659ed0fed0 sp=0x3c659ed0fe98 pc=0x7ff7f21e2165
main.runMain()
github.com/microsoft/typescript-go/cmd/tsgo/main.go:23 +0x10c fp=0x3c659ed0ff30 sp=0x3c659ed0fed0 pc=0x7ff7f21e6d2c
main.main()
github.com/microsoft/typescript-go/cmd/tsgo/main.go:10 +0x13 fp=0x3c659ed0ff48 sp=0x3c659ed0ff30 pc=0x7ff7f21e6bf3
runtime.main()
runtime/proc.go:290 +0x2c7 fp=0x3c659ed0ffe0 sp=0x3c659ed0ff48 pc=0x7ff7f1a317c7
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659ed0ffe8 sp=0x3c659ed0ffe0 pc=0x7ff7f1a6ca21
goroutine 2 gp=0x3c659e7b4780 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e7b7fa8 sp=0x3c659e7b7f88 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.forcegchelper()
runtime/proc.go:375 +0xb8 fp=0x3c659e7b7fe0 sp=0x3c659e7b7fa8 pc=0x7ff7f1a31ab8
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e7b7fe8 sp=0x3c659e7b7fe0 pc=0x7ff7f1a6ca21
created by runtime.init.7 in goroutine 1
runtime/proc.go:363 +0x1a
goroutine 18 gp=0x3c659e8081e0 m=nil [GC sweep wait]:
runtime.gopark(0x7ff7f309e601?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e813f88 sp=0x3c659e813f68 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.bgsweep(0x3c659e80a000)
runtime/mgcsweep.go:324 +0x151 fp=0x3c659e813fc8 sp=0x3c659e813f88 pc=0x7ff7f1a17791
runtime.gcenable.gowrap1()
runtime/mgc.go:214 +0x17 fp=0x3c659e813fe0 sp=0x3c659e813fc8 pc=0x7ff7f1a08ad7
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e813fe8 sp=0x3c659e813fe0 pc=0x7ff7f1a6ca21
created by runtime.gcenable in goroutine 1
runtime/mgc.go:214 +0x66
goroutine 19 gp=0x3c659e8083c0 m=nil [GC scavenge wait]:
runtime.gopark(0x486598?, 0xed3d2f9?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e815f78 sp=0x3c659e815f58 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.(*scavengerState).park(0x7ff7f309f120)
runtime/mgcscavenge.go:425 +0x49 fp=0x3c659e815fa8 sp=0x3c659e815f78 pc=0x7ff7f1a15209
runtime.bgscavenge(0x3c659e80a000)
runtime/mgcscavenge.go:658 +0x59 fp=0x3c659e815fc8 sp=0x3c659e815fa8 pc=0x7ff7f1a15799
runtime.gcenable.gowrap2()
runtime/mgc.go:215 +0x17 fp=0x3c659e815fe0 sp=0x3c659e815fc8 pc=0x7ff7f1a08a97
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e815fe8 sp=0x3c659e815fe0 pc=0x7ff7f1a6ca21
created by runtime.gcenable in goroutine 1
runtime/mgc.go:215 +0xa5
goroutine 34 gp=0x3c659e900000 m=nil [GOMAXPROCS updater (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e80ff88 sp=0x3c659e80ff68 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.updateMaxProcsGoroutine()
runtime/proc.go:7095 +0xe7 fp=0x3c659e80ffe0 sp=0x3c659e80ff88 pc=0x7ff7f1a40067
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e80ffe8 sp=0x3c659e80ffe0 pc=0x7ff7f1a6ca21
created by runtime.defaultGOMAXPROCSUpdateEnable in goroutine 1
runtime/proc.go:7083 +0x37
goroutine 20 gp=0x3c659e808780 m=nil [finalizer wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e83fe20 sp=0x3c659e83fe00 pc=0x7ff7f1a650ee
runtime.runFinalizers()
runtime/mfinal.go:210 +0x107 fp=0x3c659e83ffe0 sp=0x3c659e83fe20 pc=0x7ff7f1a079e7
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e83ffe8 sp=0x3c659e83ffe0 pc=0x7ff7f1a6ca21
created by runtime.createfing in goroutine 1
runtime/mfinal.go:172 +0x3d
goroutine 21 gp=0x3c659e808d20 m=nil [cleanup wait]:
runtime.gopark(0x101000000000000?, 0x63?, 0x3?, 0x0?, 0x7ff7f2ef17a0?)
runtime/proc.go:462 +0xce fp=0x3c659e7bbf68 sp=0x3c659e7bbf48 pc=0x7ff7f1a650ee
runtime.goparkunlock(...)
runtime/proc.go:468
runtime.(*cleanupQueue).dequeue(0x7ff7f309f340)
runtime/mcleanup.go:522 +0xd4 fp=0x3c659e7bbfa0 sp=0x3c659e7bbf68 pc=0x7ff7f1a041f4
runtime.runCleanups()
runtime/mcleanup.go:718 +0x45 fp=0x3c659e7bbfe0 sp=0x3c659e7bbfa0 pc=0x7ff7f1a04865
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e7bbfe8 sp=0x3c659e7bbfe0 pc=0x7ff7f1a6ca21
created by runtime.(*cleanupQueue).createGs in goroutine 1
runtime/mcleanup.go:672 +0xa5
goroutine 35 gp=0x3c659e9001e0 m=nil [GC worker (idle)]:
runtime.gopark(0x10dc3e1d2e728?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:462 +0xce fp=0x3c659e811f40 sp=0x3c659e811f20 pc=0x7ff7f1a650ee
runtime.gcBgMarkWorker(0x3c659ec00150)
runtime/mgc.go:1791 +0xeb fp=0x3c659e811fc8 sp=0x3c659e811f40 pc=0x7ff7f1a0b60b
runtime.gcBgMarkStartWorkers.gowrap1()
runtime/mgc.go:1695 +0x17 fp=0x3c659e811fe0 sp=0x3c659e811fc8 pc=0x7ff7f1a0b4f7
runtime.goexit({})
runtime/asm_amd64.s:1771 +0x1 fp=0x3c659e811fe8 sp=0x3c659e811fe0 pc=0x7ff7f1a6ca21
created by runtime.gcBgMarkStartWorkers in goroutine 1
runtime/mgc.go:1695 +0x105
I've seen this only once and it was not repeatable.
The full stack trace is 56 mb. Here is the start:
runtime program exceeds 10000-threa.zip