Automattic / Automattic/hostmgr

Failed to set posix_spawn_file_actions for fd -1 at index 0 with errno 9

Open
#22 0 comments 0 reactions 0 assignees View on GitHub
bug hostmgr
Dominant language
Swift
Stars
12
Forks
3
Avg merge
4h 50m
Merged PRs (30d)
4

Description

I just run into an odd VM crash, which I don't think I ever saw before. Reporting here for future keeping, just in case:

```
🚀 Launching VM xcode-13.4.1
-- | --
  | VM cloned in 12.81 seconds
  | 2022-06-23T02:57:38+0000 debug com.automattic.hostmgr : Total System Memory: 32768 MB
  | 2022-06-23T02:57:38+0000 debug com.automattic.hostmgr : Allocating 28672 MB to VM
  | 2022-06-23T02:57:39+0000 debug com.automattic.hostmgr : Allocating 6 cores to VM
  | 2022-06-23T02:57:40+0000 debug com.automattic.hostmgr : Setting Hypervisor type to apple
  | 2022-06-23T02:57:40+0000 debug com.automattic.hostmgr : Setting Networking type to shared
  | 2022-06-23 03:11:22.319 hostmgr[50383:86351613] *** 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 0x00007fff20a4629b __exceptionPreprocess + 242
  | 1 libobjc.A.dylib 0x00007fff2077fd92 objc_exception_throw + 48
  | 2 Foundation 0x00007fff217dcb84 -[NSConcreteTask launchWithDictionary:error:] + 5297
  | 3 hostmgr 0x000000010b455db4 $sSo6NSTaskC8ShellOutE10launchBash33_839723A297212BDF262C1834C3E29C1FLL4with12outputHandle05errorN0S2S_So06NSFileN0CSgAKtKF + 1284
  | 4 hostmgr 0x000000010b4557ce $s8ShellOut05shellB02to9arguments2at7process12outputHandle05errorI0S2S_SaySSGSSSo6NSTaskCSo06NSFileI0CSgANtKF + 382
  | 5 hostmgr 0x000000010b45e452 $s6prlctl29DefaultParallelsCommandRunnerVAA0cdE0A2aDPAAyS2Sd_tKFTWTm + 98
  | 6 hostmgr 0x000000010b45e3cd $s6prlctl29DefaultParallelsCommandRunnerVAA0cdE0A2aDPAAyS2Sd_tKFTW + 29
  | 7 hostmgr 0x000000010b4599aa $s6prlctl9ParallelsV18lookupAllVMDetailsSDySSAA0E0VGyKF + 170
  | 8 hostmgr 0x000000010b458e34 $s6prlctl9ParallelsV12lookupAllVMsSayAA2VMVGyKF + 36
  | 9 hostmgr 0x000000010b459fc7 $s6prlctl9ParallelsV16lookupRunningVMsSayAA0D2VMVGyKF + 23
  | 10 hostmgr 0x000000010ae692c1 $s7hostmgr14VMCloneCommandV7startVM2vm4wait0D4Datey6prlctl07StoppedE0V_Sb10Foundation0H0VtKFTf4nnnd_n + 257
  | 11 hostmgr 0x000000010ae67620 $s7hostmgr14VMCloneCommandV3runyyKF + 5808
  | 12 hostmgr 0x000000010ae68200 $s7hostmgr14VMCloneCommandV14ArgumentParser08ParsableC0AadEP3runyyKFTW + 48
  | 13 hostmgr 0x000000010aea8b4e $s14ArgumentParser15ParsableCommandPAAE4mainyySaySSGSgFZ + 78
  | 14 hostmgr 0x000000010ae484d2 main + 146
  | 15 libdyld.dylib 0x00007fff208eff3d start + 1
  | 16 ??? 0x000000000000000a 0x0 + 10
  | )
  | libc++abi: terminating with uncaught exception of type NSException
  | /usr/local/etc/buildkite-agent/hooks/command: line 29: 50383 Abort trap: 6 hostmgr vm clone $IMAGE_ID --destination $TMP_VM_NAME --start --wait --networking-type shared
  | # ↳ Command completed in 14m14.328866599s
  | 🚨 Error: The command exited with status 134
  | user command error: The global command hook exited with status 134
```

Link to the failed build: https://buildkite.com/automattic/wordpress-ios/builds/8510#01818e6e-f82d-476c-9183-15019bf51920

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the failed Buildkite run and the stack frames through VMCloneCommand.startVM, Parallels.lookupRunningVMs, DefaultParallelsCommandRunner, and ShellOut.launchBash. Determine why a file descriptor of -1 reaches posix_spawn_file_actions; the issue does not specify a fix, reproduction beyond the linked failure, or what completion should look like.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
cli, infrastructure
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.