Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
6.5.0
-
None
-
macbook air m2, docker with emulated linux/amd64 platform
Description
I find out that that QProcess fails or sticks and virtualised docker containers under macOS.
Here is minimal example to reproduce:
#include <iostream> #include <memory> #include <QProcess> #include <QString> int main() { QString program = "sleep"; QStringList arguments = {"2"}; auto process = std::make_unique<QProcess>(); process->start(program, arguments); if (!process->waitForFinished()) { std::cout << process->errorString().toStdString() << std::endl; return 1; } }
alpine container (stucks):
FROM alpine:latest RUN apk add qt5-qtbase-dev g++ ADD main.cpp / RUN g++ main.cpp -I /usr/include/qt5/ -I /usr/include/qt5/QtCore/ -lQt5Core
archlinux container (fails):
FROM archlinux:latest RUN pacman -Syu --noconfirm && \ pacman -S --noconfirm qt6-base gcc && \ yes | pacman -Scc ADD main.cpp / RUN g++ main.cpp -I /usr/include/qt6/ -I /usr/include/qt6/QtCore/ -lQt6Core
build and run container:
docker build -t buildtools --platform linux/amd64 --rm . docker run --platform linux/amd64 -it --rm buildtools ./a.out
On arch I got:
Resource error (fork failure): Invalid argument
strace show similar output for both of them:
1 getcwd(0x40007ffa70,4096) = 2 1 statx(-100,"/usr/local/sbin/sleep",0,0xfff,0x0000004000800950) = -1 errno=2 (No such file or directory) 1 statx(-100,"/usr/local/bin/sleep",0,0xfff,0x0000004000800950) = -1 errno=2 (No such file or directory) 1 statx(-100,"/usr/sbin/sleep",0,0xfff,0x0000004000800950) = -1 errno=2 (No such file or directory) 1 statx(-100,"/usr/bin/sleep",0,0xfff,0x0000004000800950) = 0 1 access("/usr/bin/sleep",X_OK) = 0 1 waitid(0x3,2147483647,0,0x5) = -1 errno=9 (Bad file descriptor) 1 clone(0x1011,child_stack=0x0000000000000000,parent_tidptr=0x0000004000800b20,tls=0x0000000000000000,child_tidptr=0x0000000000000000) = -1 errno=22 (Invalid argument) ...
I continue my investigation at this problem, but maybe you have any idea how to fix this?