Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-46762

QSettings::sync() causes "QWarning setNativeLocks failed"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.4.1, 5.5.0 Beta
    • Core: Other
    • None
    • linux (RHEL 6.6) (Ubuntu 12.04)

    Description

      When QSettings::setValue() or QSetting::sync() is called, a qWarning may be emitted:

      setNativeLocks failed: Resource temporarily unavailable

      Despite the warning, settings seem to write/read correctly. This does not occur on all linux platforms I've tested. This warning only appeared after porting from Qt4.8 to Qt5.4.1

      My speculation is that this warning is emitted only when the settings .conf file is located on a network mounted drive. I think this because all the machines that exhibit this warning that I've tested use a network mounted drive for the home directory. I've tested this on virtual machines that I've created with local drives and they do not exhibit the problem.

      I've attached a "minimal" example that exhibits the issue. However, any application that writes settings seems to emit the warning:

      1. extract
      2. qmake
      3. make
      4. ./qsettingstest
      5. Press the Write Settings button
      6. See QWarning in terminal

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            thiago Thiago Macieira
            mmirsky Michael Mirsky
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes