Return-Path: X-Original-To: apmail-incubator-chukwa-dev-archive@www.apache.org Delivered-To: apmail-incubator-chukwa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 08445E5BC for ; Tue, 20 Nov 2012 08:03:01 +0000 (UTC) Received: (qmail 38288 invoked by uid 500); 20 Nov 2012 08:03:00 -0000 Delivered-To: apmail-incubator-chukwa-dev-archive@incubator.apache.org Received: (qmail 38220 invoked by uid 500); 20 Nov 2012 08:02:59 -0000 Mailing-List: contact chukwa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-dev@incubator.apache.org Received: (qmail 38202 invoked by uid 99); 20 Nov 2012 08:02:59 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2012 08:02:59 +0000 Date: Tue, 20 Nov 2012 08:02:59 +0000 (UTC) From: "Eric Yang (JIRA)" To: chukwa-dev@incubator.apache.org Message-ID: <1922109533.5643.1353398579525.JavaMail.jiratomcat@arcas> In-Reply-To: <1802546305.57494.1351798032506.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (CHUKWA-668) Infinite loop in FileTailingAdaptor MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CHUKWA-668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Yang updated CHUKWA-668: ----------------------------- Status: Patch Available (was: Open) +1 looks good. > Infinite loop in FileTailingAdaptor > ----------------------------------- > > Key: CHUKWA-668 > URL: https://issues.apache.org/jira/browse/CHUKWA-668 > Project: Chukwa > Issue Type: Bug > Components: Data Collection > Affects Versions: 0.6.0 > Reporter: Sourygna Luangsay > Assignee: Sourygna Luangsay > Fix For: 0.6.0 > > Attachments: chukwa-668-2.patch, chukwa-668.patch > > > In LWFTAdaptor.java, lastSlurpTime is never updated, triggering an infinite loop if we use the > adaptor FileTailingAdaptor and subclass adaptors. > Loop occurs like this: > 1) lastSlurpTime is never changed and thus always 0. > 2) we append some data to the log file and we do a normal slurp > 3) after this slurp, we have: len == fileReadOffset && fixedNameLastModified > lastSlurpTime > thus we think log file has rotated when it hasn't: fileReadOffset is reset to 0 > 4) we get: len > fileReadOffset and so we do a slurp of len bytes. > 5) we are in the same situation as 3) -> infinite loop: the agent never stops sending chunks > to the collector although log files does not change. > It seems like this bug comes from CHUKWA-646. The first patch tailfile.patch seemed to do it > right but in the second patch, the line "lastSlurpTime = System.currentTimeMillis();" just > disapeared from LWFTAdaptor.java. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira