Return-Path: X-Original-To: apmail-accumulo-dev-archive@www.apache.org Delivered-To: apmail-accumulo-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 81DDF17BFA for ; Thu, 30 Oct 2014 02:42:28 +0000 (UTC) Received: (qmail 77613 invoked by uid 500); 30 Oct 2014 02:42:28 -0000 Delivered-To: apmail-accumulo-dev-archive@accumulo.apache.org Received: (qmail 77575 invoked by uid 500); 30 Oct 2014 02:42:28 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 77562 invoked by uid 99); 30 Oct 2014 02:42:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2014 02:42:27 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of josh.elser@gmail.com designates 209.85.216.53 as permitted sender) Received: from [209.85.216.53] (HELO mail-qa0-f53.google.com) (209.85.216.53) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Oct 2014 02:42:22 +0000 Received: by mail-qa0-f53.google.com with SMTP id n8so3092347qaq.40 for ; Wed, 29 Oct 2014 19:42:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=fu9wH122mYgKc/jolo4sIwNLQWNtWqCvpECwhAa8yCI=; b=I5q7aCZOBbNlNGs41VZslATqvWDi/uTiPUfXqciQSFJUxVSA1sIn4SKzz7nskNo5pR kFHI4cu9fT6F+eJpo3Ta/2QjYyXSL6S8bQH8tqq9LfsHdPRX75oCogOWTJswgbbZyyz1 pgyB+SsOmgCRs2oWhmgnhkeYDT/bEKOgsMM3wG2MlEbNgxCPGTijqgrCFG1f7ujLV3qH lvHK9P9o1Kk8GTzwthnqeMqw6UBOCoAPVN+3QeFbccnozi4EmAkMHkRdEIXalL2vGa4h rTiWsGCgl3OraOF7iAsbX4Dyg89yAnkj02P64dmLEGnLPurst27aAoXRZWlUTTXTvSn0 3lcw== X-Received: by 10.140.93.43 with SMTP id c40mr10803061qge.58.1414636922104; Wed, 29 Oct 2014 19:42:02 -0700 (PDT) Received: from HW10447.local (pool-173-59-224-228.bltmmd.fios.verizon.net. [173.59.224.228]) by mx.google.com with ESMTPSA id r1sm5735014qam.30.2014.10.29.19.42.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Oct 2014 19:42:01 -0700 (PDT) Message-ID: <5451A576.3000605@gmail.com> Date: Wed, 29 Oct 2014 22:41:58 -0400 From: Josh Elser User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: dev@accumulo.apache.org Subject: Re: New Defects reported by Coverity Scan for Accumulo References: <54517f69ed712_5f369eb31c303b2@scan.coverity.com.mail> <54518137.60208@gmail.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Yeah, I think coverity will actually mark in their UI when it's a findbugs item (at least I recall seeing something). Christopher wrote: > Are these issues ones that are not already possible to find with FindBugs? > It seems to me that some of them probably do overlap with FindBugs. I > wouldn't mind bumping up the sensitivity of FindBugs in the build if we can > resolve the outstanding issues by doing so, as we go, to prevent new issues > from being introduced. > > > -- > Christopher L Tubbs II > http://gravatar.com/ctubbsii > > On Wed, Oct 29, 2014 at 8:07 PM, Josh Elser wrote: > >> Do we want to set up Coverity to send these types of messages to dev@a.a.o >> automatically? >> >> -------- Original Message -------- >> Subject: New Defects reported by Coverity Scan for Accumulo >> Date: Wed, 29 Oct 2014 16:59:37 -0700 >> From: scan-admin@coverity.com >> To: josh.elser@gmail.com >> >> >> Hi, >> >> Please find the latest report on new defect(s) introduced to Accumulo >> found with Coverity Scan. >> >> 4 new defect(s) introduced to Accumulo found with Coverity Scan. >> 18 defect(s), reported by Coverity Scan earlier, were marked fixed in the >> recent build analyzed by Coverity Scan. >> >> New defect(s) Reported-by: Coverity Scan >> Showing 4 of 4 defect(s) >> >> >> ** CID 1250066: Unguarded read (GUARDED_BY_VIOLATION) >> /minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java: >> 852 in org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl. >> getMiniDfs()() >> >> ** CID 1250064: Arguments in wrong order (SWAPPED_ARGUMENTS) >> >> ** CID 1250062: Dm: Dubious method used (FB.DM_DEFAULT_ENCODING) >> /server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java: >> 109 in org.apache.accumulo.server.util.RandomizeVolumes. >> randomize(org.apache.accumulo.core.client.Connector, java.lang.String)() >> >> ** CID 1250058: DLS: Dead local store (FB.DLS_DEAD_LOCAL_STORE) >> /server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java: >> 176 in org.apache.accumulo.tserver.log.LogSorter$LogProcessor.writeBuffer(java.lang.String, >> java.util.List, int)() >> >> >> ____________________________________________________________ >> ____________________________________________ >> *** CID 1250066: Unguarded read (GUARDED_BY_VIOLATION) >> /minicluster/src/main/java/org/apache/accumulo/minicluster/impl/MiniAccumuloClusterImpl.java: >> 852 in org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl. >> getMiniDfs()() >> 846 } >> 847 } >> 848 return stats; >> 849 } >> 850 >> 851 public MiniDFSCluster getMiniDfs() { >> >>> CID 1250066: Unguarded read (GUARDED_BY_VIOLATION) >>>>> Accessing "this.miniDFS" without holding lock >>>>> "MiniAccumuloClusterImpl.this". Elsewhere, "org.apache.accumulo. >>>>> minicluster.impl.MiniAccumuloClusterImpl.miniDFS" is accessed with >>>>> "MiniAccumuloClusterImpl.this" held 3 out of 4 times. >>>>> >>>> 852 return this.miniDFS; >> 853 } >> >> ____________________________________________________________ >> ____________________________________________ >> *** CID 1250064: Arguments in wrong order (SWAPPED_ARGUMENTS) >> /fate/src/main/java/org/apache/accumulo/fate/zookeeper/RetryFactory.java: >> 36 in org.apache.accumulo.fate.zookeeper.RetryFactory.create()() >> 30 this.startWait = startWait; >> 31 this.maxWait = maxWait; >> 32 this.waitIncrement = waitIncrement; >> 33 } >> 34 >> 35 public Retry create() { >> >>> CID 1250064: Arguments in wrong order (SWAPPED_ARGUMENTS) >>>>> The positions of arguments in the constructor for >>>>> "org.apache.accumulo.fate.zookeeper.Retry" do not match the ordering >>>>> of the parameters: >>>>> >>>> * "maxWait" is passed to "waitIncrement" >> * "waitIncrement" is passed to "maxWait" >> 36 return new Retry(maxRetries, startWait, maxWait, waitIncrement); >> 37 } >> >> ____________________________________________________________ >> ____________________________________________ >> *** CID 1250062: Dm: Dubious method used (FB.DM_DEFAULT_ENCODING) >> /server/base/src/main/java/org/apache/accumulo/server/util/RandomizeVolumes.java: >> 109 in org.apache.accumulo.server.util.RandomizeVolumes. >> randomize(org.apache.accumulo.core.client.Connector, java.lang.String)() >> 103 directory = oldLocation.substring(Path. >> SEPARATOR.length()); >> 104 } >> 105 Key key = entry.getKey(); >> 106 Mutation m = new Mutation(key.getRow()); >> 107 >> 108 String newLocation = vm.choose(ServerConstants.getBaseUris()) >> + Path.SEPARATOR + ServerConstants.TABLE_DIR + Path.SEPARATOR + tableId + >> Path.SEPARATOR + directory; >> >>> CID 1250062: Dm: Dubious method used (FB.DM_DEFAULT_ENCODING) >>>>> Found reliance on default encoding: String.getBytes(). >>>>> >>>> 109 m.put(key.getColumnFamily(), key.getColumnQualifier(), new >> Value(newLocation.getBytes())); >> 110 if (log.isTraceEnabled()) { >> 111 log.trace("Replacing " + oldLocation + " with " + >> newLocation); >> 112 } >> 113 writer.addMutation(m); >> 114 try { >> >> ____________________________________________________________ >> ____________________________________________ >> *** CID 1250058: DLS: Dead local store (FB.DLS_DEAD_LOCAL_STORE) >> /server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java: >> 176 in org.apache.accumulo.tserver.log.LogSorter$LogProcessor.writeBuffer(java.lang.String, >> java.util.List, int)() >> 170 sortStop = System.currentTimeMillis(); >> 171 } >> 172 } >> 173 } >> 174 >> 175 private void writeBuffer(String destPath, List> >> buffer, int part) throws IOException { >> >>> CID 1250058: DLS: Dead local store (FB.DLS_DEAD_LOCAL_STORE) >>>>> Dead store to part. >>>>> >>>> 176 Path path = new Path(destPath, >> String.format("part-r-%05d", part++)); >> 177 FileSystem ns = fs.getVolumeByPath(path).getFileSystem(); >> 178 >> 179 @SuppressWarnings("deprecation") >> 180 MapFile.Writer output = new MapFile.Writer(ns.getConf(), ns, >> path.toString(), LogFileKey.class, LogFileValue.class); >> 181 try { >> >> >> ____________________________________________________________ >> ____________________________________________ >> To view the defects in Coverity Scan visit, http://scan.coverity.com/ >> projects/736?tab=overview >> >> To unsubscribe from the email notification for new defects, >> http://scan5.coverity.com/cgi-bin/unsubscribe.py >> >> >> >> >