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 228B2200B8D for ; Fri, 23 Sep 2016 16:24:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 2116F160ACA; Fri, 23 Sep 2016 14:24:18 +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 156D0160AC2 for ; Fri, 23 Sep 2016 16:24:16 +0200 (CEST) Received: (qmail 12087 invoked by uid 500); 23 Sep 2016 14:24:16 -0000 Mailing-List: contact user-help@uima.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@uima.apache.org Delivered-To: mailing list user@uima.apache.org Received: (qmail 12075 invoked by uid 99); 23 Sep 2016 14:24:15 -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; Fri, 23 Sep 2016 14:24:15 +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 3801D1A7AF0 for ; Fri, 23 Sep 2016 14:24:15 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.88 X-Spam-Level: *** X-Spam-Status: No, score=3.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_BADIPHTTP=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, WEIRD_PORT=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 9vBLmagFjPqP for ; Fri, 23 Sep 2016 14:24:11 +0000 (UTC) Received: from mail-lf0-f42.google.com (mail-lf0-f42.google.com [209.85.215.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 447B55FACE for ; Fri, 23 Sep 2016 14:24:11 +0000 (UTC) Received: by mail-lf0-f42.google.com with SMTP id l131so94593538lfl.2 for ; Fri, 23 Sep 2016 07:24:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=wYKlqmgcWoA1FLP2x5OEgHw+QrRKq0aydmoAUnjY/Hw=; b=sdb8Gr2PmZO2+sVZqRti0d79LGK/dJPSd/D1/2Qyp8GqDDZFl6H+58Ug7XnVWepAll BjLA62hiu3s3TQZwb1TD3z9KNPQKhyJ+sg+5OODhsuNt6duJIr/Xfcp/G6c3SZsjTJLK qyKGPIfGRQRwn1rGliRD6bLH2g62lAmnRi8lhC/mQUO5V6ed7GEN5pVzBq5p0dSs5oeY ssSOuPC7Qtw3s/+xScW3ftEc6UBQCUrVLvFBJT1galMEaq6xUoJX11EBfz1XVuceWw7u LjJAVNhvcKy7oBVttRKnFofXEXUGN/sv/P4Q/6AYYTkOsT5QierKhK27P+JVQM2cfG2x KhGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=wYKlqmgcWoA1FLP2x5OEgHw+QrRKq0aydmoAUnjY/Hw=; b=CK+Pr+CVoAN8A0WwVeKopNUqOeeuQHbEQIYyqeh5zmESdyPD4FJ7A9+UQcr72FL0ac r6Sv+CwKs5syTDyne+fdpe2xtHH1EshgaovIS3nyZb2vze91NRS1sSAohTOAPyKSDMhN 0KVylPtv35YmYmxsLZtOJNqxv14e/pT/lI6AOCCE0vCD+bxWQKmdH8g806lhi7obZAbX jz2RQO7EfBQQfWXdeqcKqxSakiO0sQ2p3bykTn6gUHn8BEsdtgvV7wJic0d7v3tF9v5K QERpJfkvAosd0yvcMtBdJ8pPmam4PYaTsVHBKSVgGKzXdVWb2PiRpR0v3gUYkOh+F9lH 3ZiA== X-Gm-Message-State: AE9vXwPOP3f/3ELMU+wMCUuBg5fYget+Y/YIjACiN97av39uFMc6jogcYO4WqeGZwf5uXNMsaBdfZevseeiKfQ== X-Received: by 10.25.18.23 with SMTP id h23mr3188756lfi.5.1474640648859; Fri, 23 Sep 2016 07:24:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.114.1.198 with HTTP; Fri, 23 Sep 2016 07:24:08 -0700 (PDT) In-Reply-To: References: From: Jaroslaw Cwiklik Date: Fri, 23 Sep 2016 10:24:08 -0400 Message-ID: Subject: Re: NullPointerException when RunRemoteAsyncAE tries to unload (UIMA AS and UIMA C++) To: user@uima.apache.org Content-Type: multipart/alternative; boundary=001a113fb4600bf928053d2d88f3 archived-at: Fri, 23 Sep 2016 14:24:18 -0000 --001a113fb4600bf928053d2d88f3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable David, so there is progress. :) I am not familiar with UimacppServiceController code but a quick glance at the source suggests that this code communicates with a C++ process via a socket: if (socket !=3D null) { // System.out.println("UimacppServiceManagement::quiesceAndStop() // Sending QUIESCEANDSTOP"); writer.write("QUIESCEANDSTOP"); writer.flush(); BufferedReader in =3D new BufferedReader(new InputStreamReader(socket.getInputStream())); It tells the C++ to quiesce and exit which apparently it does very quickly. It looks like writer.write("QUIESCEANDSTOP"); succeeded, but the code fails here BufferedReader in =3D new BufferedReader(new InputStreamReader(socket.getInputStream())); which means that the C++ socket is dead (process exited) It seems that the code should tolerate such condition and not "scream" Exception :) I think a try catch should be added around this code and on SocketException we should just log some informative message like "Remote process socket closed - It may have terminated" or something similar to that. So this does not seem like a critical error although this should be cleaned up. -jerry On Fri, Sep 23, 2016 at 9:41 AM, David Fox wrote: > I was able to install that, and I=E2=80=99m not getting the NullPointerEx= ception. > The example annotator still runs successfully, but now I get > ------------------------------------------------------------ > --------------- > > Attempting to deploy descriptors/Deploy_MeetingAnnotator.xml ... > Waiting for Uima C++ service to connect... > Waiting for Uima C++ service to connect... > Waiting for Uima C++ service to report init status... > deployCppService.cpp91 Start receiving messages > > Startinging GetMetaData instance > > Starting Annotator instance 0 > > deployCppService.cpp UIMA C++ Service MeetingAnnotator at > tcp://localhost:61616 Ready to process... > > Uima C++ service at MeetingAnnotator Ready to process... > UIMA AS Service Initialization Complete > ........Completed 8 documents; 17165 characters > Time Elapsed : 3705 ms > 0 8 apr_socket_recv command=3DSHUTDOWN > > deployCppService.cpp Shutdown started. > > Stopping GetMetaData instance > > Stopping Annotator instance 0 > > deployCppService.cpp Shutdown done. > > UimacppServiceManagement service reports shutdown DONE > UimacppShutdownHook sending quiesce message > java.net.SocketException: Socket is closed > at java.net.Socket.getInputStream(Socket.java:903) > at > org.apache.uima.aae.controller.UimacppServiceManagement. > quiesceAndStop(Uima > cppServiceManagement.java:88) > at > org.apache.uima.aae.controller.UimacppServiceManagement. > quiesceAndShutdown( > UimacppServiceManagement.java:397) > at > org.apache.uima.aae.controller.UimacppShutdownHook.run( > UimacppServiceContro > ller.java:1105) > UimacppShutdownHook destroy C++ process > > =E2=80=95=E2=80=95=E2=80=95=E2=80=95=E2=80=95 > > I=E2=80=99ve attached the uima.log > > On 9/22/16, 3:54 PM, "Jaroslaw Cwiklik" wrote: > > >David, I've deployed uima-as 2.9.0-SNAPSHOT here: > > > >https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > 3A__repository.apache.org > >_content_repositories_snapshots_org_apache_uima_ > uima-2Das_2.9.0-2DSNAPSHOT > >_&d=3DDQIFaQ&c=3D3XrKki35ZWuh8X2qbeRISQ&r=3DBYS7q6K6Famz8NiMJzvOgYA- > WQSvBt9z6TEb > >aT3nnNM&m=3DNnQy2jfAk4Dyg-uijgdjHHbg6pxfdvwDkCn3166fVc8& > s=3Dy7GSTfzyEzhkYgFGy1 > >vLLmDJ82il_hzMP7Y4LQjuBPg&e=3D > > > >there is a binary tarball (tar.gz) in there. > > > >This is a trunk level uima-as code for the upcoming 2.9.0 uima-as releas= e. > >It has not been thoroughly > >tested or vetted yet. It has some fixes and improvements since 2.8.1. I= t > >includes a new AMQ broker > >version 5.14.0. It also has a fix for the problem you've reported. > > > >-jerry > > > > > >On Thu, Sep 22, 2016 at 3:15 PM, Jaroslaw Cwiklik > >wrote: > > > >> Another possibility is to deploy a snapshot in a public maven repo. > >> Hopefully you can get the binary tarball > >> onto your machines somehow. I will to do that know and let you know > >>where > >> to get this. > >> > >> -jerry > >> > >> On Thu, Sep 22, 2016 at 3:01 PM, David Fox > >>wrote: > >> > >>> Building from svn on our linux machines is a bit tricky, because they > >>>are > >>> cut off from the internet by a firewall, and maven install wants > >>>internet > >>> access to download dependencies. It looks like there are workarounds > >>>for > >>> that > >>> > >>>(https://urldefense.proofpoint.com/v2/url?u=3Dhttp- > 3A__stackoverflow.com_q > >>>uestions_7233328_how-2Ddo-2Di-2Dconfigu&d=3DDQIFaQ&c=3D > 3XrKki35ZWuh8X2qbeRIS > >>>Q&r=3DBYS7q6K6Famz8NiMJzvOgYA-WQSvBt9z6TEbaT3nnNM&m=3D > NnQy2jfAk4Dyg-uijgdjHH > >>>bg6pxfdvwDkCn3166fVc8&s=3Dsk4NjHKmY1SCj4WAEH0A59C50xulbEthh1b5K5egbv0&= e=3D > >>> re-maven-for-of > >>> fline-development > >>> > >>> 3A__stackoverflow.com_q > >>>uestions_7233328_how-2Ddo-2Di-2Dconfigure-2Dmaven-2Dfor- > 2Doffline-2Ddeve > >>>lopment&d=3DDQIFaQ&c=3D3XrKki35ZWuh8X2qbeRISQ&r=3D > BYS7q6K6Famz8NiMJzvOgYA-WQSv > >>>Bt9z6TEbaT3nnNM&m=3DNnQy2jfAk4Dyg-uijgdjHHbg6pxfdvwDkCn3166fVc8& > s=3DpMHCokJs > >>>jTNk_XvWxddISyww6QBt65VZmeVGKLTLK94&e=3D > > >>> suggests Artifactory), but it may take a day or two > >>> before I can get everything set up. > >>> > >>> I could build it on my dev machine (OS X), but with the binary > >>>install, I > >>> wasn=E2=80=99t able to get the sample UIMA C++ code to build on Mac O= S X. (My > >>> eventual plan is to get linux on my dev machine via virtual box, but > >>>that > >>> means more software to install=E2=80=A6) > >>> > >>> So anyway, I=E2=80=99ll try to get this working so I can build from s= vn before > >>>the > >>> fix, reproduce the problem, and then update and verify the fix. > >>> > >>> Thanks, > >>> David > >>> > >>> On 9/22/16, 1:23 PM, "Jaroslaw Cwiklik" wrote: > >>> > >>> >I think I see the bug. Do you know how to build uima-as from svn? > >>> > > >>> >https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__uima. > >>> apache.org_build > >>> >ing-2Duima.html&d=3DDQIFaQ&c=3D3XrKki35ZWuh8X2qbeRISQ&r=3DBYS7q6K > >>> 6Famz8NiMJzvOgY > >>> >A-WQSvBt9z6TEbaT3nnNM&m=3D9Hf7csP-1jIlxx_vgB3QA47yh0w3i1- > >>> XbVER8KQmhT8&s=3DGin5 > >>> >am-lATmbl6WQFmZrKwjxKa3tiL1qz1ykFh0cdWI&e=3D > >>> > > >>> >I will fix this shortly in the svn trunk. The next release of uima-a= s > >>> >(2.9.0) is in the > >>> >works. I will get a release candidate out hopefully next week. > >>> > > >>> >-jerry > >>> > > >>> >On Thu, Sep 22, 2016 at 12:08 PM, David Fox > >>> >wrote: > >>> > > >>> >> Thanks for the quick response > >>> >> > >>> >> Yes, it occurs every time, at the same line in RunRemoteAsyncAE an= d > >>> >> org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_ > >>> >> impl.undeploy(BaseUIMAAsynchronousEngine_impl.java:964) > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> On 9/22/16, 11:15 AM, "Jaroslaw Cwiklik" wrote: > >>> >> > >>> >> >This warning > >>> >> > > >>> >> >WARN Transport - Transport Connection to: > >>>tcp:// > >>> >> >127.0.0.1:56261 failed: java.io.EOFException > >>> >> > > >>> >> >is from brokers log or console I suspect. It just means that the > >>> broker > >>> >> >lost a connection to a client. Looks like the client > >>> >> >went away without closing a connection. This is probably a > >>>side-effect > >>> >>of > >>> >> >NPE. > >>> >> > > >>> >> >Is the NPE repeatable? Does it happen each time you run this test= ? > >>> >>Looking > >>> >> >for a hint if there is a race > >>> >> >condition in the UIMA-AS code. > >>> >> > > >>> >> > > >>> >> > > >>> >> >On Thu, Sep 22, 2016 at 10:54 AM, David Fox > >>> > >>> >> >wrote: > >>> >> > > >>> >> >> I=C2=B9m using the UIMA C++ framework 2.4.0 (32-bit) on linux (= CentOS > >>> >>6.5), > >>> >> >>and > >>> >> >> following the instructions > >>> >> >>https://urldefense.proofpoint.com/v2/url?u=3Dhttps- > >>> >> 3A__uima.apache.org_d_&d > >>> >> >>=3DDQIFaQ&c=3D3XrKki35ZWuh8X2qbeRISQ&r=3DBYS7q6K6Famz8NiMJzvOgYA= - > >>> >> WQSvBt9z6TEbaT > >>> >> >>3nnNM&m=3DdFZSJENJkyCDLeCQuBn89fBrTrsdKh4RIWwwPV7r0o8&s=3DCaIoLZ= _7Je- > >>> >> TYsr0ZIP > >>> >> >>xs98mHRestzC4RtgVSp7kJaY&e=3D > >>> >> >> uimacpp-2.4.0/docs/overview_and_setup.html. I=C2=B9ve successf= ully > >>> built > >>> >> >> DaveDetector and run it with the standalone C++ pipeline > >>>(runAECpp) > >>> >>and > >>> >> >> within a Java pipeline via JNI. I=C2=B9ve now installed UIMA A= S > >>>2.8.1 so > >>> >>I > >>> >> >>can > >>> >> >> follow the instructions under 2.3 Testing Interoperability with > >>>UIMA > >>> >>AS > >>> >> >> > >>> >> >> > >>> >> >> cd $UIMACPP_HOME/examples/tutorial > >>> >> >> runRemoteAsyncAE.sh tcp://localhost:61616 MeetingAnnotator \ > >>> >> >> -d descriptors/Deploy_MeetingAnnotator.xml > >>> >> >> > >>> >> >> > >>> >> >> I get a NullPointerException and a transport warning about a > >>> >> >> java.io.EOFException > >>> >> >> > >>> >> >> > >>> >> >> runRemoteAsyncAE.sh tcp://localhost:61616 MeetingAnnotator -d > >>> >> >> descriptors/Deploy_MeetingAnnotator.xml -o `pwd`/out > >>> >> >> > >>> >> >> Attempting to deploy descriptors/Deploy_MeetingAnnotator.xml ..= . > >>> >> >> > >>> >> >> Waiting for Uima C++ service to connect... > >>> >> >> > >>> >> >> Waiting for Uima C++ service to connect... > >>> >> >> > >>> >> >> Waiting for Uima C++ service to report init status... > >>> >> >> > >>> >> >> deployCppService.cpp91 Start receiving messages > >>> >> >> > >>> >> >> > >>> >> >> Startinging GetMetaData instance > >>> >> >> > >>> >> >> > >>> >> >> Starting Annotator instance 0 > >>> >> >> > >>> >> >> > >>> >> >> deployCppService.cpp UIMA C++ Service MeetingAnnotator at > >>> >> >> tcp://localhost:61616 Ready to process... > >>> >> >> > >>> >> >> > >>> >> >> Uima C++ service at MeetingAnnotator Ready to process... > >>> >> >> > >>> >> >> UIMA AS Service Initialization Complete > >>> >> >> > >>> >> >> .Completed 1 documents > >>> >> >> > >>> >> >> Time Elapsed : 2184 ms > >>> >> >> > >>> >> >> java.lang.NullPointerException > >>> >> >> > >>> >> >> at > >>> >> >>org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_ > >>> >> >> impl.undeploy(BaseUIMAAsynchronousEngine_impl.java:964) > >>> >> >> > >>> >> >> at > >>> >> >>org.apache.uima.adapter.jms.client.BaseUIMAAsynchronousEngine_ > >>> >> >> impl.undeploy(BaseUIMAAsynchronousEngine_impl.java:906) > >>> >> >> > >>> >> >> at org.apache.uima.examples.as.RunRemoteAsyncAE.run( > >>> >> >> RunRemoteAsyncAE.java:260) > >>> >> >> > >>> >> >> at org.apache.uima.examples.as.RunRemoteAsyncAE.main( > >>> >> >> RunRemoteAsyncAE.java:314) > >>> >> >> > >>> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native > >>> >>Method) > >>> >> >> > >>> >> >> at sun.reflect.NativeMethodAccessorImpl.invoke( > >>> >> >> NativeMethodAccessorImpl.java:62) > >>> >> >> > >>> >> >> at sun.reflect.DelegatingMethodAccessorImpl.invoke( > >>> >> >> DelegatingMethodAccessorImpl.java:43) > >>> >> >> > >>> >> >> at java.lang.reflect.Method.invoke(Method.java:497) > >>> >> >> > >>> >> >> at org.apache.uima.bootstrap.UimaBootstrap.main( > >>> >> >> UimaBootstrap.java:87) > >>> >> >> > >>> >> >> WARN Transport - Transport Connection to: > >>> >>tcp:// > >>> >> >> 127.0.0.1:56221 failed: java.io.EOFException > >>> >> >> > >>> >> >> I'm > >>> >> >> I can also run with a collection reader: > >>> >> >> > >>> >> >> > >>> >> >> runRemoteAsyncAE.sh tcp://localhost:61616 MeetingAnnotator -d > >>> >> >> descriptors/Deploy_MeetingAnnotator.xml -o `pwd`/out -c > >>> >> >> /misc/NLP/dfox/scratch/uima/apache-uima-as-2.8.1/examples/ > >>> >> >> descriptors/collection_reader/FileSystemCollectionReader. > mine.xml > >>> >> >> > >>> >> >> (where the modified collection reader points to > >>> >> >>$UIMA_HOME/examples/data) > >>> >> >> in which case I get =C2=B3Completed 8 documents=C2=B2, and xmi = output for > >>>each > >>> >>in > >>> >> >>the > >>> >> >> out/ directory, but still get the same exception and warning. > >>>Based > >>> >>on > >>> >> >> that (plus looking at the RunRemoteAsyncAE java source), it loo= ks > >>> >>like > >>> >> >>my > >>> >> >> analysis engine is running fine, but then hitting some problem > >>>when > >>> >> >> RunRemoteAsyncAE tries to undeploy the C++ annotator. > >>> >> >> > >>> >> >> I=C2=B9m trying to figure out if this is something I should wor= ry > >>>about > >>> >> >> (especially if it reflects a problem with running UIMA C++ 2.4 > >>>and > >>> >>UIMA > >>> >> >>AS > >>> >> >> 2.8.1), or if it is normal or harmless. > >>> >> >> > >>> >> >> When I run the similar test with one of the Java-only UIMA AS > >>> >>samples: > >>> >> >> > >>> >> >> > >>> >> >> runRemoteAsyncAE.sh tcp://localhost:61616 > >>>MeetingDetectorTaeQueue -d > >>> >> >> deploy/as/Deploy_MeetingDetectorTAE.xml -c > >>> >> >>descriptors/collection_reader/ > >>> >> >> FileSystemCollectionReader.mine.xml > >>> >> >> > >>> >> >> I still get the transport warning > >>> >> >> > >>> >> >> > >>> >> >> WARN Transport - Transport Connection to: > >>> >>tcp:// > >>> >> >> 127.0.0.1:56261 failed: java.io.EOFException > >>> >> >> > >>> >> >> but not the NullPointerException > >>> >> >> > >>> >> >> Thanks, > >>> >> >> David > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> > >>> >> > >>> >> > >>> > >>> > >> > > --001a113fb4600bf928053d2d88f3--