Bug 798006 - Drift detection hangs on reading named pipes on filesystem
Drift detection hangs on reading named pipes on filesystem
Product: JBoss Operations Network
Classification: JBoss
Component: Drift (Show other bugs)
JON 3.0.0
Unspecified Unspecified
unspecified Severity high
: ER01
: JON 3.3.0
Assigned To: Jay Shaughnessy
Mike Foley
Depends On: 880815
  Show dependency treegraph
Reported: 2012-02-27 14:38 EST by Mike Foley
Modified: 2014-12-11 09:00 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 880815 (view as bug list)
Last Closed: 2014-12-11 09:00:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mike Foley 2012-02-27 14:38:32 EST
Description of problem:  Drift detection hangs on special 'fifo' files with 'prw' file permissions.  Issue detected as part of verifying https://bugzilla.redhat.com/show_bug.cgi?id=789454

Version-Release number of selected component (if applicable):  JON 3.01

How reproducible:  100% by mfoley and jshaughn

Steps to Reproduce:
1.  Setup a Drift Definition on a directory, such as '/tmp' that contains files with permissions 'prw'

2.  Click the button to detect drift.
3.  Drift hangs.  Snapshot #0 is never created.
Actual results:  Drift detection hangs.

Expected results:  Snapshot #0 is created and problematic filetypes are avoided in a robust manner.

Additional info:

[root@foleymonsterbox1 icedteaplugin-mfoley]# ls -al
<mfoley> total 24
<mfoley> drwx------.  2 mfoley mfoley  4096 Jan 13 16:40 .
<mfoley> drwxrwxrwt. 42 root   root   20480 Feb 27 13:23 ..
<mfoley> prw-------.  1 mfoley mfoley     0 Jul 12  2011 24966-icedteanp-appletviewer-to-plugin
<mfoley> prw-------.  1 mfoley mfoley     0 Jul 12  2011 24966-icedteanp-plugin-to-appletviewer
<mfoley> prw-------.  1 mfoley mfoley     0 Jun  2  2011 2564-icedteanp-appletviewer-to-plugin
<mfoley> prw-------.  1 mfoley mfoley     0 Jun  2  2011 2564-icedteanp-plugin-to-appletviewer
<mfoley> prw-------.  1 mfoley mfoley     0 Jan 13 16:44 29849-icedteanp-appletviewer-to-plugin
<mfoley> prw-------.  1 mfoley mfoley     0 Jan 13 16:44 29849-icedteanp-plugin-to-appletviewer
Comment 1 Mike Foley 2012-02-27 17:05:53 EST
this is an edge case that can be avoided with includes/excludes ... in the unlikely situation that someone wants to monitor a directory with these unusual file types 

preliminary discussion with developer indicated the fix could be a bit heavy-handed to open every file to see if it is actually readable (btw, trying to read this named pipe file is what causes drift to hang) 

re inclusion into JON 3.01 (we are past code freeze now, and in the endgame) 
-is it a regression?  NO
-is it a customer issue?  NO
-is it urgent?
-is it a main line primary use-case?  NO

ergo, recommend a push of target release to jon 3.1 or later.
Comment 3 Mike Foley 2012-02-27 18:51:46 EST
documenting that i tested drift on directories with symbolic links ... and that worked.
Comment 4 Mike Foley 2012-03-05 11:39:56 EST
JON 3.1 medium priority, per triage meeting (crouch, foley, loleary)
Comment 5 Ian Springer 2012-05-14 17:08:26 EDT
I think the solution to this, would be to change th following code in DriftDetector.doDirectoryScan():

  if (!file.canRead()) {
                            if (log.isDebugEnabled()) {
                                log.debug("Skipping " + file.getPath() + " since we do not have read access.");


  if (!file.isFile()) {
                            if (log.isDebugEnabled()) {
                                log.debug("Skipping " + file.getPath() + " since it is not a regular file.");

Since File.isFile() should only return true for regular files or symlinks to regular files, which I believe are the only things we care about.

I'm assigning this to Jay, since he worked on the related bug 789454, so he can comment.
Comment 7 Jay Shaughnessy 2014-04-21 16:39:33 EDT
commit 7e9ce1d0a3953248a7dcc66b2025447b1cf1a019
Author: Jay Shaughnessy <jshaughn@redhat.com>
Date:   Mon Apr 21 16:37:35 2014 -0400

    Protect against drift detection on not "normal" files.
Comment 8 Simeon Pinder 2014-07-31 11:52:09 EDT
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993
Comment 9 Mike Foley 2014-08-05 14:31:45 EDT
failed qe.

the drift feature is broken in jon 3.3

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