sosreport hangs after printing "Setting up plugins ..."

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7
    • sosreport

Issue

  • sosreport command hangs after printing the following messages

    Setting up archive ...
    Setting up plugins ...
    

Resolution

Follow the procedure described in the Diagnostic Steps section.
If this is a match, proceed further.

  • Remove the secret-sos package from the system. This package is deprecated and not maintained any more.

    # yum -y remove secret-sos
    

Root Cause

When secret-sos package is installed, executing sosreport leads to automatically running a plugin shipped by secret-sos.
This plugin checks all files on the file system against against the RPM database, which is extremely time consuming.

Diagnostic Steps

  1. Verify that secret-sos package is present

    # rpm -qa secret-sos
    secret-sos-0.1-1.el7.noarch
    
  2. Execute sosreport command

    # sosreport
    [...]
    [... command stuck not printing anything ...]
    
  3. Once sosreport command seems to be stuck, strace the command during 1 minute from another terminal

    # timeout 1m strace -fttTvyy -o /tmp/sosreport.strace -p $(pgrep sosreport)
    strace: Process 1841 attached
    strace: Process 1841 detached
    
  4. Stop the sosreport command using Ctrl-C

    # sosreport
    [... command stuck not printing anything ...]
    ^C
    
  5. Search in the strace for how many times the RPM database was processed

    # grep -c " stat(\"/var/lib/rpm/Basenames\"" /tmp/sosreport.strace 
    363
    

    In the example above, one of the file of the RPM database was processed 363 during 1 minute, which is huge and very likely denotes the issue due to having secret-sos package installed.

  • Component
  • sos

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.