abiosoft / abiosoft/colima

cmake stalls with defunct children

オープン
#1,256 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
30.8k
フォーク
613
PR マージ指標
30日以内にマージされた PR はありません

説明

### Description

I'm running x86 docker container on an arm vm (vz/rosetta) on a M4 Max MacBook Pro. Full details of env to follow, but, I'm running cmake on an open source project (`https://github.com/quickfix/quickfix.git`) and it will stall at various points with a defunct child process. The container is still responsive as I can exec another shell and inspect the running process. If I `strace` it, the pattern is always the same: a write to stdout & some system call (in either order) followed by SIGCHLD. Once I attach, it seems to kick the process into gear again and things move along. Without attaching, it never proceeds.

I have a rockylinux/8 docker image with some basic rpms installed
```
FROM rockylinux:8

RUN yum -y update && yum -y install \
passwd \
sudo \
man \
vim \
git \
libtool \
m4 \
automake \
make \
procps \
strace \
valgrind
```

I run the container and mount `/Users/` (from the vm) to `/home/` (in the container).

I use micromamba to manage a local env which contains the build requirements for quickfix - `mamba create -p ./venv openssl cmake gcc gxx python`. This lets me reuse the container for different projects and the mamba/conda environment is persistent in the project's directory in my Mac homedir.

Start command: `colima start -c 6 -m 12 -d 100 -t vz --vz-rosetta`

Sample strace output when cmake was stalled during an attempt to find python. `python` was a defunct subprocess of the cmake process with child pid `3712`
```
/bin/strace: Process 3448 attached
syscall_0xf0000ba7bf50(0xf0000ba7b800, 0xf0000ba7b800, 0xf0000ba7bf50, 0, 0x8000effff7df4c80, 0xd7) = 0x8000effff7df4fe0
write(0, "\1", 1) = 140737490066448
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=3712, si_uid=501, si_status=0, si_utime=6, si_stime=0} ---
```

I haven't heavily tested this setup yet, but, I get this with vz and not qemu, but, vz/rosetta is about 3x faster to build quickfix vs vz alone and nearly 10x faster than qemu, so, I'd like to figure out what is happening and increase reliability. Using strace to move it along is my current workaround.

Any thoughts on what might be happening or guidance on how to dig further? I'm sure I've forgotten some details, so, please ask for more specifics.

### Version

```
colima version 0.8.1
git commit: 96598cc5b64e5e9e1e64891642b91edc8ac49d16

runtime: docker
arch: aarch64
client: v27.5.0
server: v27.4.0
limactl version 1.0.3
qemu-img version 9.2.0
Copyright (c) 2003-2024 Fabrice Bellard and the QEMU Project developers
```

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

```
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
```

### Reproduction Steps

See general description

### Expected behaviour

I would expect cmake to complete and exit normally.

### Additional context

_No response_

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。