docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

rosetta error: unexpected valid thread with no suspend owner while resuming during php composer install #6698

Open dmnlk opened 1 year ago

dmnlk commented 1 year ago

Expected behavior

complete composer install

Actual behavior

  - Installing doctrine/orm (2.14.0): Extracting archive
rosetta error: unexpected valid thread with no suspend owner while resuming threads

Information

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

[PASS] DD0027: is there available disk space on the host?
[PASS] DD0028: is there available VM disk space?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0038: is the connection to Docker working?
[PASS] DD0014: are the backend processes running?
[PASS] DD0007: is the backend responding?
[PASS] DD0008: is the native API responding?
[PASS] DD0009: is the vpnkit API responding?
[PASS] DD0010: is the Docker API proxy responding?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
[PASS] DD0018: does the host support virtualization?
[PASS] DD0001: is the application running?
[PASS] DD0017: can a VM be started?
[PASS] DD0016: is the LinuxKit VM running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0031: does the Docker API work?
[PASS] DD0032: do Docker networks overlap with host IPs?
No fatal errors detected.

Steps to reproduce the behavior

check 「Use rosetta for x86/64 emulation on Apple Silicon」

I know this is an experimental feature. I am not sure if it has anything to do with the type of package, but I will give it to you as a report.

thaJeztah commented 1 year ago

Thanks! Would you be able to provide a "minimal as possible" Dockerfile (or other ways to reproduce) ? Or do you have a public GitHub repository that can be used to reproduce the issue?

From the looks of it (disclaimer: I work at docker, but not on the team working on this feature), it may be an issue in rosetta itself, but having steps to reproduce would be useful to investigate.

dzuelke commented 1 year ago

I am currently investigating a similar issue; a composer install apparently finishes successfully, but the exit status is still non-zero. No error message thrown like in the above example though. Must be something inside the php executable.

Will also try and come up with a minimal reproduce case.

dzuelke commented 1 year ago

Possibly related: https://github.com/docker/roadmap/issues/384

jackos commented 1 year ago

I had this issue with building an x86 on m1 mac running ventura 13.1, during cargo rust compilation which is multithreading heavy, I had set docker desktop to use 1 cpu core and it worked:

Screenshot 2023-02-14 at 10 03 08 am
girlbossceo commented 1 year ago

I was able to reproduce this bug by also building a large Rust application (e.g. Matrix Conduit) targeting amd64, using a Fedora Rawhide image (Rosetta 2) and nightly Rust toolchain. The provided solution above is a tolerable workaround but quite slow.

maxwindiff commented 1 year ago

I was able to reproduce this by building https://github.com/google/xls/commit/77902c8ae5845818ad217e80ce80283267f86a4f using the command docker build . --platform linux/amd64 -f Dockerfile-ubuntu-20.04.

...
#0 2586.8 [2,799 / 2,862] Linking xls/dslx/interpreter_main [for tool]; 2s processwrapper-sandbox ... (2 actions, 1 running)
#0 2587.8 [2,805 / 2,876] Linking xls/dslx/interpreter_main [for tool]; 3s processwrapper-sandbox ... (5 actions, 4 running)
#0 2588.9 [2,815 / 2,876] Compiling xls/passes/useless_assert_removal_pass.cc [for tool]; 2s processwrapper-sandbox ... (5 actions running)
#0 2591.1 [2,816 / 2,876] Compiling xls/passes/proc_state_optimization_pass.cc [for tool]; 4s processwrapper-sandbox ... (5 actions, 4 running)
#0 2592.9 [2,818 / 2,876] Compiling xls/passes/proc_state_optimization_pass.cc [for tool]; 5s processwrapper-sandbox ... (5 actions running)
#0 2593.8 ERROR: /home/xls-developer/xls/xls/delay_model/models/BUILD:51:12: Executing genrule //xls/delay_model/models:model_sky130_source [for tool] failed: (Trace/breakpoint trap): bash failed: error executing command (from target //xls/delay_model/models:model_sky130_source) /bin/bash -c ... (remaining 1 argument skipped)
#0 2593.8 
#0 2593.8 Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
#0 2593.8 rosetta error: unexpected valid thread with no suspend owner while resuming threads
#0 2593.8 /bin/bash: line 1: 11822 Trace/breakpoint trap   bazel-out/k8-opt-exec-2B5CBBC6/bin/xls/delay_model/generate_delay_lookup --model_name=sky130 --precedence=kMedium xls/delay_model/models/sky130.textproto
#0 2593.8      11823 Done                    | external/llvm_toolchain_llvm/bin/clang-format > bazel-out/k8-opt-exec-2B5CBBC6/bin/xls/delay_model/models/model_sky130.cc
#0 2593.9 [2,819 / 2,876] Compiling xls/passes/proc_state_optimization_pass.cc [for tool]; 6s processwrapper-sandbox ... (4 actions running)
#0 2594.4 INFO: Elapsed time: 2593.837s, Critical Path: 81.20s
#0 2594.4 INFO: 2823 processes: 159 internal, 2664 processwrapper-sandbox.
#0 2594.4 FAILED: Build did NOT complete successfully

Docker Desktop 4.19.0 (106363), 2021 14" MacBook Pro 32GB, MacOS 13.3.1 (a).