Important: Please read the Qt Code of Conduct -

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 host

    QThread *thread = new QThread();
       QObject *runner = new QObject(nullptr);
        qInfo() << "Starting tests thread";
       QObject::connect(thread, &QThread::started, runner, [ thread ]() {
           qDebug() << "thread started" << thread;

    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
    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.

Log in to reply