Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 5C704200C6A for ; Wed, 19 Apr 2017 20:08:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 5B19E160B9C; Wed, 19 Apr 2017 18:08:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7E0B6160B94 for ; Wed, 19 Apr 2017 20:08:00 +0200 (CEST) Received: (qmail 78169 invoked by uid 500); 19 Apr 2017 18:07:59 -0000 Mailing-List: contact user-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@accumulo.apache.org Delivered-To: mailing list user@accumulo.apache.org Received: (qmail 78159 invoked by uid 99); 19 Apr 2017 18:07:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Apr 2017 18:07:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 420071AF98A for ; Wed, 19 Apr 2017 18:07:59 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.897 X-Spam-Level: X-Spam-Status: No, score=-2.897 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id Ty8qr0PiGX8C for ; Wed, 19 Apr 2017 18:07:57 +0000 (UTC) Received: from mail-io0-f178.google.com (mail-io0-f178.google.com [209.85.223.178]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 1D5D15FC96 for ; Wed, 19 Apr 2017 18:07:57 +0000 (UTC) Received: by mail-io0-f178.google.com with SMTP id k87so30939893ioi.0 for ; Wed, 19 Apr 2017 11:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-transfer-encoding; bh=XaPk7LX/uT2SLfGm1I43BRlbSBXEvJOMlMvDgYYC8yY=; b=eGXw4SZ0thgWT+nBM33dEhWQf5pamCQIVJQh5yR/kKZZexiwnMAkn1HADYvr/Rm8YE rgunYDkbfb/AQxF+NvJFPxQ+ADEfBwRqEGxp8Rfd7txpvODjV4wqbHBqW4pahu8j+m7+ 0VP+b1PIhsxwdQ76PVpsJg+We201Jo6X4ItbzkYbA0BxiZDjzGKDHCO5Gev/+eAfdDKU A6twz4pmkUZ4aO792zHFYz0Oa5PBSOc9aIj2Mv8UkJvWQ9AqoTdlkXF7C4TZvbjzAxfv WS5XYy0GfBbZWCBrAuyiim/GHS9TaMeWe0VfaDwMQTAB+BRKXlnyEmmhg58B2r6dwV9I SHGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-transfer-encoding; bh=XaPk7LX/uT2SLfGm1I43BRlbSBXEvJOMlMvDgYYC8yY=; b=RCdNByTigOf2oY15APZIhpp3qeYKLDojIsD5n3GqX7d4imfW2poBCKFyEdn2EUIxPJ XbwL1eIyK/guFfdm+cq2oTiMnuX8jV7R5P+wkMuQ3V5QvwgFAg4+SNUT6JsCHZafTvUG JhF7E+z3NiIK5eFvGsXkCxgfTCw8nt9Nu9Jc2SIlmHNQUsig2r7PIia5fo4+GTtYMpA4 dTwJ5OGh40VlxMBwL4ni1WOlHqscxm7MOrXPY2E/00/o+xjZwUeHGYTuCQEpnj4ePHOL yRYkGMqe/MTXSg1hioi0kwa4EHPWN2bebzpD1hvYLPO+ASq4tT13s6ZKh3nPLFrqwVjK h4dQ== X-Gm-Message-State: AN3rC/6mDw70UyIn6qUpXdQe4pOPOWzH6HaXIKcaq7s/KbsF3KECGnse jJqj8vJIvoy9tF8J3KQ= X-Received: by 10.99.2.5 with SMTP id 5mr4125613pgc.205.1492625274620; Wed, 19 Apr 2017 11:07:54 -0700 (PDT) Received: from hw10447.local ([167.102.188.146]) by smtp.googlemail.com with ESMTPSA id y192sm5833064pfb.23.2017.04.19.11.07.53 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 11:07:53 -0700 (PDT) Message-ID: <58F7A777.6040100@gmail.com> Date: Wed, 19 Apr 2017 14:07:51 -0400 From: Josh Elser User-Agent: Postbox 3.0.11 (Macintosh/20140602) MIME-Version: 1.0 To: user@accumulo.apache.org Subject: Re: Batchscanner - error closing output stream because stream is closed References: <58F7A1AF.80803@gmail.com> <9ddb848c-d1a9-4330-a164-36c8d379a7da@incadencecorp.com> In-Reply-To: <9ddb848c-d1a9-4330-a164-36c8d379a7da@incadencecorp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit archived-at: Wed, 19 Apr 2017 18:08:01 -0000 19824 is an identifier that would tie it back to a specific BatchScanner instance, but that's not going to tell you where in the code it was created. I remember something with a finalize() method being invoked in a try-with-resources block (the finalizer closes the BS, and then the finally for the try-with-resources also tries to close() it). Let me see if I can find that issue -- we might have made a code-change in 1.7.3 for it. David Boyd wrote: > Josh: > > Thanks. I am using 1.7.2. That is why I asked about how to trace back to > a specific scan in > my code. I agree this sounds like a race condition but I have multiple > batch scanners potentially happening > including some down inside Geomesa. So figuring out from the trace which > scanner spawned the thread would > be helpful to generate an snippit. > > > > On 4/19/17 1:43 PM, Josh Elser wrote: >> David -- >> >> What version of Accumulo? Can you share a snippet of code (or, >> ideally, a executable example we can run) in which you're using the >> BatchScanner? >> >> Generally speaking, it appears that one of the BatchScanner threads >> was finished, trying to return the Thrift connection to the pool, but >> the underlying socket was already closed (assumably, by someone else). >> Sounds like a race condition, multiple close()'s happening perhaps. >> >> David Boyd wrote: >>> All: >>> >>> I am getting this stack trace periodically based on no pattern I can >>> determine from my application. >>> >>> Is this a message I should be worried about? >>> >>> What is a technique to trace this back to my code and the cause? >>> >>> Obviously something is closing things before the thread closes it. >>> >>> >>>> 2017-04-19 12:33:53,423 | WARN | [batch scanner 19824- 8 looking up 1 >>>> ranges at accumulodev:9997] | (TIOStreamTransport.java:112) - Error >>>> closing output stream. >>>> java.io.IOException: The stream is closed >>>> at >>>> org.apache.hadoop.net.SocketOutputStream.write(SocketOutputStream.java:118) >>>> >>>> >>>> at >>>> java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82) >>>> at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140) >>>> at java.io.FilterOutputStream.close(FilterOutputStream.java:158) >>>> at >>>> org.apache.thrift.transport.TIOStreamTransport.close(TIOStreamTransport.java:110) >>>> >>>> >>>> at >>>> org.apache.thrift.transport.TFramedTransport.close(TFramedTransport.java:89) >>>> >>>> >>>> at >>>> org.apache.accumulo.core.client.impl.ThriftTransportPool$CachedTTransport.close(ThriftTransportPool.java:309) >>>> >>>> >>>> at >>>> org.apache.accumulo.core.client.impl.ThriftTransportPool.returnTransport(ThriftTransportPool.java:571) >>>> >>>> >>>> at >>>> org.apache.accumulo.core.rpc.ThriftUtil.returnClient(ThriftUtil.java:151) >>>> >>>> at >>>> org.apache.accumulo.core.client.impl.TabletServerBatchReaderIterator.doLookup(TabletServerBatchReaderIterator.java:686) >>>> >>>> >>>> at >>>> org.apache.accumulo.core.client.impl.TabletServerBatchReaderIterator$QueryTask.run(TabletServerBatchReaderIterator.java:349) >>>> >>>> >>>> at org.apache.htrace.wrappers.TraceRunnable.run(TraceRunnable.java:57) >>>> at >>>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) >>>> >>>> >>>> at >>>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) >>>> >>>> >>>> at >>>> org.apache.accumulo.fate.util.LoggingRunnable.run(LoggingRunnable.java:35) >>>> >>>> >>>> at java.lang.Thread.run(Thread.java:745) >>> >>> >