QThread::start: Thread creation error (Operation not permitted)
-
Hi there!
What can be wrong with the build, threads stopped working at all. What is in general wrong?Some more details:
This simple code works fine development environment and in docker on my hostQThread *thread = new QThread(); QObject *runner = new QObject(nullptr); qInfo() << "Starting tests thread"; QObject::connect(thread, &QThread::started, runner, [ thread ]() { qDebug() << "thread started" << thread; }); thread->start();
This is output i get:
Starting tests thread
thread started QThread(0x1608c00)But on the target machine the same build in docker fails:
Starting tests thread
QThread::start: Thread creation error (Operation not permitted) -
It was docker issue guys. Do not run fedora:latest container on Centos7 host. Downgrading to fedora:34 helped. I found similar issue here https://bugs.archlinux.org/task/69576.
Important symptom - ldd myapp in the container returned "ldd: error: you do not have read permission for 'myapp'". And the threads did not start. While the previous images work well. So I checked what has changed except my code and dependencies, and the only thing was fedora:latest became 35.