QSettings sync() causes QWarning: setNativeLocks failed: Resource temporarily unavailable

  • I recently ported a Qt4 application to Qt5.4.1 (also tested Qt5.5.0 beta). I've experienced a handful of odd behavior since then. One of the issues involves QSettings sync() on Linux (mainly RHEL 6.6) . Specifically, I receive a QWarning immediately after calling sync() on my QSettings object:

    setNativeLocks failed: Resource temporarily unavailable

    The code that saves settings was not touched in the port from Qt4->Qt5, and appeared only after the upgrade. As far as I can tell, the settings seem to save despite the warning.

    I've tested this on a number of machines. The linux machines that it appears on have have a network mounted home directory. However, I've tried on virtual machines that are not network mounted, and the problem doesn't occur. This leads me to believe that it has something to do with writing the conf file over the network.

    Is there anything I can do to resolve this warning on my end? Is this a bug?

    I'd be glad to answer any more information if it will help to diagnose the problem. Thanks for your help!

  • Lifetime Qt Champion


    Can you test with Qt 5.5 ?

  • SGaist,

    Yeah, I can try. Downloading Qt 5.5 beta source now.


  • Compiled and rebuilt with Qt5.5.0 (beta). Sadly, the problem persists.

  • Lifetime Qt Champion

    Then you should check the bug report system to see if it's something known. If not, please consider opening a new report providing a minimal compilable example reproducing the behavior

  • I couldn't find a similar bug report, so I created one: QT_BUG.

  • Lifetime Qt Champion

    Thanks for sharing

  • For future reference, the bug I logged was marked as a duplicate.

    Here is the link to the original, QTBUG-43454.