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 C2CD0200C3A for ; Fri, 31 Mar 2017 12:13:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C1708160B8C; Fri, 31 Mar 2017 10:13:47 +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 B2F0A160B9F for ; Fri, 31 Mar 2017 12:13:46 +0200 (CEST) Received: (qmail 41822 invoked by uid 500); 31 Mar 2017 10:13:45 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 41692 invoked by uid 99); 31 Mar 2017 10:13:45 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Mar 2017 10:13:45 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 72E46C05E9 for ; Fri, 31 Mar 2017 10:13:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id bLoTThjPjKiB for ; Fri, 31 Mar 2017 10:13:43 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id A413D5FBEB for ; Fri, 31 Mar 2017 10:13:42 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E6C95E06CD for ; Fri, 31 Mar 2017 10:13:41 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id A11D321DD8 for ; Fri, 31 Mar 2017 10:13:41 +0000 (UTC) Date: Fri, 31 Mar 2017 10:13:41 +0000 (UTC) From: "Ivan Veselovsky (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (IGNITE-4862) NPE in reading data from IGFS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 31 Mar 2017 10:13:47 -0000 [ https://issues.apache.org/jira/browse/IGNITE-4862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949291#comment-15949291 ] Ivan Veselovsky edited comment on IGNITE-4862 at 3/31/17 10:12 AM: ------------------------------------------------------------------- The following properties should be set to reproduce the problem: {code} {code} The following exception happens on the Ignite node at the same time: {code} Exception in thread "igfs-#50%null%" java.lang.NullPointerException at org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable.read(HadoopIgfsSecondaryFileSystemPositionedReadable.java:104) at org.apache.ignite.internal.processors.igfs.IgfsLazySecondaryFileSystemPositionedReadable.read(IgfsLazySecondaryFileSystemPositionedReadable.java:64) at org.apache.ignite.internal.processors.igfs.IgfsDataManager.secondaryDataBlock(IgfsDataManager.java:419) at org.apache.ignite.internal.processors.igfs.IgfsDataManager$4.applyx(IgfsDataManager.java:357) at org.apache.ignite.internal.processors.igfs.IgfsDataManager$4.applyx(IgfsDataManager.java:346) at org.apache.ignite.internal.util.lang.IgniteClosureX.apply(IgniteClosureX.java:38) at org.apache.ignite.internal.util.future.GridFutureChainListener.applyCallback(GridFutureChainListener.java:78) at org.apache.ignite.internal.util.future.GridFutureChainListener.access$000(GridFutureChainListener.java:30) at org.apache.ignite.internal.util.future.GridFutureChainListener$1.run(GridFutureChainListener.java:65) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} The problem is that class `org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable` was designed fro single-threaded access, but in fact was accessed by multiple threads. That lead to unexpected situation, when org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable#in returned null , that caused a bunch of further errors. Fixed by making HadoopIgfsSecondaryFileSystemPositionedReadable thread safe (underlying secondary file system input stream has its own mechanisms to preserve consistency upon multithreaded access.) was (Author: iveselovskiy): The following properties should be set to reproduce the problem: {code} {code} The following exception happens on the Ignite node at the same time: {code} Exception in thread "igfs-#50%null%" java.lang.NullPointerException at org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable.read(HadoopIgfsSecondaryFileSystemPositionedReadable.java:104) at org.apache.ignite.internal.processors.igfs.IgfsLazySecondaryFileSystemPositionedReadable.read(IgfsLazySecondaryFileSystemPositionedReadable.java:64) at org.apache.ignite.internal.processors.igfs.IgfsDataManager.secondaryDataBlock(IgfsDataManager.java:419) at org.apache.ignite.internal.processors.igfs.IgfsDataManager$4.applyx(IgfsDataManager.java:357) at org.apache.ignite.internal.processors.igfs.IgfsDataManager$4.applyx(IgfsDataManager.java:346) at org.apache.ignite.internal.util.lang.IgniteClosureX.apply(IgniteClosureX.java:38) at org.apache.ignite.internal.util.future.GridFutureChainListener.applyCallback(GridFutureChainListener.java:78) at org.apache.ignite.internal.util.future.GridFutureChainListener.access$000(GridFutureChainListener.java:30) at org.apache.ignite.internal.util.future.GridFutureChainListener$1.run(GridFutureChainListener.java:65) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} The problem is that class `org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable` was designed fro single-threaded access, but in fact was accessed by multiple threads. That lead to unexpected situation, when org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsSecondaryFileSystemPositionedReadable#in returned null , that caused a bunch of further errors. Fixed by making HadoopIgfsSecondaryFileSystemPositionedReadable thread safe (underlying secondary file system input stream has its own mechanisms to preserve consistency upon multithreaded access.) > NPE in reading data from IGFS > ----------------------------- > > Key: IGNITE-4862 > URL: https://issues.apache.org/jira/browse/IGNITE-4862 > Project: Ignite > Issue Type: Bug > Components: hadoop > Affects Versions: 1.9 > Reporter: Dmitry Karachentsev > Assignee: Ivan Veselovsky > Priority: Minor > Fix For: 2.0 > > > {noformat} > D:\app\CodexRT.CodexRT_20170314-1>hadoop\bin\hadoop fs -copyToLocal igfs:///cacheLink/test3.orc D:\test3.orc > -copyToLocal: Fatal internal error > java.lang.NullPointerException > at org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream$FetchBufferPart.flatten(HadoopIgfsInputStream.java:458) > at org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream$DoubleFetchBuffer.flatten(HadoopIgfsInputStream.java:511) > at org.apache.ignite.internal.processors.hadoop.impl.igfs.HadoopIgfsInputStream.read(HadoopIgfsInputStream.java:177) > at java.io.DataInputStream.read(DataInputStream.java:100) > at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:91) > at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:59) > at org.apache.hadoop.io.IOUtils.copyBytes(IOUtils.java:119) > at org.apache.hadoop.fs.shell.CommandWithDestination$TargetFileSystem.writeStreamToFile(CommandWithDestination.java:466) > at org.apache.hadoop.fs.shell.CommandWithDestination.copyStreamToTarget(CommandWithDestination.java:391) > at org.apache.hadoop.fs.shell.CommandWithDestination.copyFileToTarget(CommandWithDestination.java:328) > at org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:263) > at org.apache.hadoop.fs.shell.CommandWithDestination.processPath(CommandWithDestination.java:248) > at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:317) > at org.apache.hadoop.fs.shell.Command.processPathArgument(Command.java:289) > at org.apache.hadoop.fs.shell.CommandWithDestination.processPathArgument(CommandWithDestination.java:243) > at org.apache.hadoop.fs.shell.Command.processArgument(Command.java:271) > at org.apache.hadoop.fs.shell.Command.processArguments(Command.java:255) > at org.apache.hadoop.fs.shell.CommandWithDestination.processArguments(CommandWithDestination.java:220) > at org.apache.hadoop.fs.shell.Command.processRawArguments(Command.java:201) > at org.apache.hadoop.fs.shell.Command.run(Command.java:165) > at org.apache.hadoop.fs.FsShell.run(FsShell.java:287) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) > at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84) > at org.apache.hadoop.fs.FsShell.main(FsShell.java:340) > {noformat} > Details in discussion: [http://apache-ignite-users.70518.x6.nabble.com/NullPointerException-when-using-IGFS-td11328.html] -- This message was sent by Atlassian JIRA (v6.3.15#6346)