sosreport fails with the error "Directory not found" in /var/tmp/sos.XXXX/.../system.slice.

Solution Verified - Updated -

Issue

  • sosreport fails with the following error:

    ...
    Directory not empty while finalizing archive /var/tmp/sos.EBb1B7/sosreport-qlktprvsctrl11-2019-10-21-pohtsmq
    
    Creating archive tarball failed.
    Traceback (most recent call last):
    File "/sbin/sosreport", line 19, in <module>
      main(sys.argv[1:])
    File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1384, in main
      sos.execute()
    File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1369, in execute
      self._cleanup()
    File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1322, in _cleanup
      self.archive.cleanup()
    File "/usr/lib/python2.7/site-packages/sos/archive.py", line 525, in cleanup
      shutil.rmtree(self._archive_root)
    File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib64/python2.7/shutil.py", line 247, in rmtree
      rmtree(fullname, ignore_errors, onerror)
    File "/usr/lib64/python2.7/shutil.py", line 256, in rmtree
      onerror(os.rmdir, path, sys.exc_info())
    File "/usr/lib64/python2.7/shutil.py", line 254, in rmtree
      os.rmdir(path)
    OSError: [Errno 39] Directory not empty: '/var/tmp/sos.XXXXX/sosreport-server-XXXXXX-XXXX/sys/fs/cgroup/cpu,cpuacct/system.slice'
    

Environment

  • Red Hat Enterprise Linux 7
  • sos

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In