Bug 394761 - sosreport hangs running lsof
Summary: sosreport hangs running lsof
Status: CLOSED DUPLICATE of bug 368261
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sos
Version: 5.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Navid Sheikhol-Eslami
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-21 19:15 UTC by Bryn M. Reeves
Modified: 2013-04-12 19:26 UTC (History)
2 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2007-11-22 10:16:07 UTC


Attachments (Terms of Use)

Description Bryn M. Reeves 2007-11-21 19:15:07 UTC
Description of problem:
The current sosreport passes the "-M" flag to lsof to prevent potential blocking
operations but that is insufficient. The sosreport progress meter also displays
100%, despite the fact that no progress is happening:

 Progress [###################100%##################][05:36/05:36]
 Progress [###################100%##################][05:40/05:40]

[...]

 Progress [###################100%##################][26:42/26:42]

13673 pts/8    Ss     0:00  |   \_ -bash
13711 pts/8    Sl+    0:02  |   |   \_ python /usr/sbin/sosreport
13908 pts/8    S+     0:00  |   |       \_ /usr/sbin/lsof -b +M -n -l
25471 pts/8    Z+     0:00  |   |       \_ [cp] <defunct>

I ran into this situation on a system where an admin had run a "umount -lf" of
an unresponsive NFS file system. This means that the mount is detached from the
namespace and "lazy-umounted" when all references to it close. Since entries in
/proc/<pid> directories may still point at entries in this file system the lsof
spawned by sosreport may block accessing them.

Version-Release number of selected component (if applicable):
sos-1.7-9.1.el5

How reproducible:
100% on this host.

Steps to Reproduce:
[ one example - there are probably lots more ]
1. Mount an nfs file system
2. Make the server go away
3. Try an operation on the fs (e.g. ls /mount/point)
4. Lazy/background umount (umount -fl /mount/point)
5. Run sosreport
  
Actual results:
sosreport appears to hang waiting for lsof. Progress reaches 100% but the clock
keeps on going up.


Expected results:
sosreport should never hang when run with the default options.

Comment 1 Navid Sheikhol-Eslami 2007-11-22 10:16:07 UTC

*** This bug has been marked as a duplicate of 368261 ***


Note You need to log in before you can comment on or make changes to this bug.