From owner-freebsd-java@FreeBSD.ORG Mon Dec 15 15:37:11 2014 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B108C8E for ; Mon, 15 Dec 2014 15:37:11 +0000 (UTC) Received: from nm17-vm1.bullet.mail.bf1.yahoo.com (nm17-vm1.bullet.mail.bf1.yahoo.com [98.139.213.55]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6C39D74 for ; Mon, 15 Dec 2014 15:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1418657822; bh=K80SlpPxLWMEPyCmBf4rAsRt/Xqthj3dW9sQcyNNHPM=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=HWR7Q0n9ORuMosw+8vlbXaS4AHFMYEfNxEWqQMVyrb8eC6s9PBtCrU8Dtzl/WkSn/onr3Scvv2GJJd/6FxN+6seSJc0NE/R032Q/84vCPuK4wZuJ29DAeNYP+YpEysxsJtEMpAvp77m0QTgk6G0Ts6YpEylGgtu3ElGL5IlP9MlKHMtuOvDaO9cgEmFK/CHtZn/WOLMdDlVJ90onBs5SOzXbFLNa0goK6+68ioDlL23HH56CbU0FD8eDClyPgMqr9jlq6Grh6kXg1dWgZ/eniJvlO8bTVNbTlNfpc4HzbxYCJjg0ws7Nt7RpOrrQ6Kvgp3p0WBlvlZWLspAESX94DQ== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=JQPyx4Ngwbgl8cWAEi9AfYMNVgTooc6OBYSyPPgFbRcMUB+oT0AfSYWz9k+N9slfj/zoIRsJ+pETn1/ZeifLNUxaZfMfQSQFnPvp1di87PRtjQKsked1UR9M6Rv9q4nm4sP2kMdxotk0gY4o1OR+6sQlwZsaD0G7D/n6OZUW9GdQuifpX9Qz3jNn73of+6xLWfnY0rNsvRd/5kFY56sLb/QfZu6asmHVUKuasYtlxpK/RHivmfpOYaTjns2jtrOKpvrmWg8R27uNCyZ4lTIWBB3E8X4OPNlnM93GCMSboNi0cI/8ILCnhoUMQUwhxmxisC3PVLyA/zDHlNvVOQtpZQ==; Received: from [66.196.81.173] by nm17.bullet.mail.bf1.yahoo.com with NNFMP; 15 Dec 2014 15:37:02 -0000 Received: from [68.142.230.64] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 15 Dec 2014 15:37:02 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 15 Dec 2014 15:37:02 -0000 X-Yahoo-Newman-Id: 795861.10603.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: S5DoT_MVM1lwgZM33mOxeL.8sW0pV.oj1mUwdXflI8KRuHW pIgNoTGwCYeDLHmMvR1bMNK41nFceuJQWBg_CxopnBsVElIPD9l5voehAiMO gJdbyJ7HU3q.9FgldIpJO.JZBiX4MEodIKHFMBQLnDn.O4Trldb37fcPwSKk m.8Ivtx0_.AoTW4i6QSJ.r7iadDIHeJiT0j1fR65iK1OtZ9Qk8zEy5kUDDKx qttiHoiUDAVXug7qbEIJovzl16S9OoKOdJ13O7wfO_i6BDOOF6dMeNU_kLbZ 4UXRD.P4aSFbzkyuOaKUmSw6a4VW8zfq5xDNlaY8IAWZzWnXwqGDrDNoBQvT j.vihelygDGlNyPJmFA7oyIIpJzNJ4v7T7hhreveBsTx21.zH95NWO_cSawz tSdGFlrs.ryCGmknjB8RE9Yg3TB0i02jf0HCwufIdu84sDExUfRJc2gMTW2m ixct2jz58rdA3NkF_eHxQYYqEvsRn.BC1lGmMCJMhD8mZlMjmiTcI4OAjshS 63FjHItV3wvoCnW_oiHqc1UGyNVp8HhXHqhoq3BwtMpIykB_oNRBeGlZTSTh qsdA.D_n_BJdmf85tivaSDUBoEmcgv7GKyR473y0iTXQI.bf.poq9fcRKiWX aea62E.mBevx7hS6S7Jber_jK5lA04bYQIHiVvQgl4libpbalajQdZJX9N18 OVg5zm0F136AZqdTKvRCeYOkcAlcBnlVFLPVo_Nf4egb4W8s1u0_hF5W5ilD mpi2wJDmwFoG5YnD1L7Tsvzal22w.yMnSMFBAp2PpPHpIG5eNF0D75QDMM4C jrY71P44lWGoxGZ5sWEqks_gwgfjBZ_AFoaOvGejjTAomAHlcv79HX4nWx8R mJLPsvw1I6mv4wqMJlTaXLyXqQZlpvAkP_WPdVQuC3jVRdx5s3p52Rc3bMJ_ 1D9yNv5bBeBKWCwSOh_zcMr6TI9yqDsnAyRXfo2AG22RLRtIrDsxWwMkcVBj s X-Yahoo-SMTP: h3Xqg6.swBC0yI913RMMwp94grO_cg-- Message-ID: <548F001D.8020205@yahoo.com> Date: Mon, 15 Dec 2014 10:37:01 -0500 From: Paul Pathiakis User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Ronald Klop , Ed Maste , Paul Pathiakis , Paul Pathiakis via freebsd-java Subject: Re: Porting OpenNMS to FreeBSD 10.x with OpenJDK7 References: <546E2ED7.6010803@atlantisservices.net> <547F3BD4.5010806@yahoo.com> <5480915F.6040204@yahoo.com> In-Reply-To: <5480915F.6040204@yahoo.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2014 15:37:11 -0000 Hi All!!! OK. Well, I've been working with the OpenNMS people for a couple of weeks and it looks like it's either FreeBSD or OpenJDK 1.7 that is the problem in their product working on FreeBSD. It was tried in two configurations on 10.1. Configuration: OpenNMS 14.0.0.1 on both with FreeBSD 10.1 1) openjdk 1.7 2) linux-sun-jdk17 Ron Roskens over at the OpenNMS project ran through this to find out what was wrong: I’ve been able to solve two of the unit test issues so far. Still running into the other unit test failures. > On Dec 10, 2014, at 9:22 PM, Ronald Roskens wrote: > > Here are some of the ones I know about it erroring/failing, but don’t know why or how to fix them yet: > > org.opennms.core.test.db.MirgratorTest: > testUpdate(): > org.opennms.core.schema.MigrationException: unable to migrate the database > > testMultipleChangelogs(): > PSQLException: ERROR: relation “databasechangelog” does not exist NMS-7254: MigratorTest fails on two of the 3 tests. The problem here is two fold. First, the test environment as configured by the maven surefire plugin can be different, and results in different results. One run can use filesystem resources, subsequent runs use jar file resources. Second, MigratorTest assume it will be passed jar file resources on the classpath. > org.opennms.jicmp.jna.ByteBufferTest: > testPassing(): > com.sun.jna.LastErrorException: errno was 47 NMS-7257: ByteBufferTest.testPassing() fails on FreeBSD 10.1 This one is due a difference between the sockaddr_in class on Linux vs FreeBSD. Having a BSD specific version of the ByteBufferTest class that uses bsd_sockaddr_in objects allows all tests to pass. Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.243 sec <<< FAILURE! - in org.opennms.netmgt.provision.persist.RequisitionFileUtilsTest testCreateTemporaryRequisition(org.opennms.netmgt.provision.persist.RequisitionFileUtilsTest) Time elapsed: 0.013 sec <<< FAILURE! java.lang.AssertionError: expected:<2> but was:<1> at org.junit.Assert.fail(Assert.java:93) at org.junit.Assert.failNotEquals(Assert.java:647) at org.junit.Assert.assertEquals(Assert.java:128) at org.junit.Assert.assertEquals(Assert.java:472) at org.junit.Assert.assertEquals(Assert.java:456) at org.opennms.netmgt.provision.persist.RequisitionFileUtilsTest.testCreateTemporaryRequisition(RequisitionFileUtilsTest.java:74) This failure seems to occur randomly. You can continue the test run after it fails, and this test will run successfully. Then I run into some generate-features-xml errors which only occur on the first run. The next test failure is: Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.345 sec <<< FAILURE! - in org.opennms.features.vaadin.nodemaps.internal.gwt.client.ui.controls.search.SearchStateTest org.opennms.features.vaadin.nodemaps.internal.gwt.client.ui.controls.search.SearchStateTest Time elapsed: 1.322 sec <<< ERROR! java.lang.VerifyError: Bad method call from inside of a branch Exception Details: Location: org/opennms/features/vaadin/nodemaps/internal/gwt/client/ui/controls/search/SearchStateTest$TestSchedulerImpl.(Lorg/opennms/features/vaadin/nodemaps/internal/gwt/client/ui/controls/search/SearchStateTest$1;)V @34: invokespecial Reason: Error exists in the bytecode Bytecode: 0000000: 2a4d 125b b800 1603 bd00 0d12 17b8 001b 0000010: b800 213a 0419 04b2 0025 a500 0e2a 01c0 0000020: 0027 b700 2aa7 0009 2cb7 005c 0157 b1 Stackmap Table: full_frame(@40,{UninitializedThis,Object[#89],UninitializedThis,Top,Object[#13]},{}) full_frame(@46,{Object[#2],Object[#89],Object[#2],Top,Object[#13]},{}) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:191) at javassist.runtime.Desc.getClassObject(Desc.java:43) at javassist.runtime.Desc.getClassType(Desc.java:152) at javassist.runtime.Desc.getType(Desc.java:122) at javassist.runtime.Desc.getType(Desc.java:78) at org.opennms.features.vaadin.nodemaps.internal.gwt.client.ui.controls.search.SearchStateTest.setUpClass(SearchStateTest.java:92) Adding -noverify to the argLine configuration property for the maven surefire plugin gets us get beyond that error. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-discuss mailing list To*unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-discuss Ron followed up with this e-mail after submitting all his patches to the code to allow for FreeBSD specifics: > On Dec 13, 2014, at 10:27 PM, Ronald Roskens wrote: > > I was able to get the unit tests after that to run through to completion. > > I’ve checked my fixes for NMS-7254, NMS-7257, and NMS-7260 into a branch roskens/freebsd-build in the repository, and its just starting it run through the bamboo CI process. > > If its without any errors I’ll see about getting it merged into master & develop branches. > > I am cautiously optimistic that you could run a build of OpenNMS 14.0.2 on FreeBSD 10.1 with OpenJDK 1.7.0_71-b14. I think any further problems uncovered would likely be FreeBSD JVM specific issues with OpenJDK. > > Ron My optimism has been greatly diminished because on running the build after about 10 minutes, the JVM crashed with a fatal error: # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x0000000803a4d4ae, pid=84602, tid=35353228288 # # JRE version: OpenJDK Runtime Environment (7.0-b14) (build 1.7.0_71-b14) # Java VM: OpenJDK 64-Bit Server VM (24.71-b01 mixed mode bsd-amd64 compressed oops) # Problematic frame: # j java.net.SocketException.(Ljava/lang/String;)V+0 # # Core dump written. Default location: /cores/core or core.84602 When I tried to run OpenNMS with the linux-sun-jdk17 it runs, but I got this error in web.log when I tried to access the web interface. 2014-12-14 14:17:14,213 WARN [Main] o.e.j.u.c.AbstractLifeCycle: FAILED org.eclipse.jetty.server.nio.SelectChannelConnector$ConnectorSelectorManager@131fc7e: java.io.IOException: Function not implemented java.io.IOException: Function not implemented at sun.nio.ch.EPollArrayWrapper.epollCreate(Native Method) ~[?:1.7.0_71] at sun.nio.ch.EPollArrayWrapper.(EPollArrayWrapper.java:130) ~[?:1.7.0_71] at sun.nio.ch.EPollSelectorImpl.(EPollSelectorImpl.java:68) ~[?:1.7.0_71] at sun.nio.ch.EPollSelectorProvider.openSelector(EPollSelectorProvider.java:36) ~[?:1.7.0_71] at java.nio.channels.Selector.open(Selector.java:227) ~[?:1.7.0_71] … Which I take to mean that the FreeBSD Linux kernel emulator doesn’t implement the epoll interface. Creating $OPENNMS_HOME/etc/opennms.conf with: ADDITIONAL_MANAGER_OPTIONS="-Djava.nio.channels.spi.SelectorProvider=sun.nio.ch.PollSelectorProvider" Then its up and running. Ron Gentlemen of FreeBSD Java/OpenJDK.... It runs on the linux-sun-jdk17 without issue once you put the two options into the file as described in the last 2-4 lines of the second letter. Now that it's been narrowed down to being an OpenJDK compliance issue, could we please dig into it a bit? I am going to run FreeBSD 10.1, OpenNMS 1.14.0.2 with OpenJDK-latest and see if the issue still exists. I'm happy to assist but I'm not a java person and I would think that I have shown I am committed to getting this port done and to continue supporting the jicmp, jicmp6, jrrd, and the OpenNMS port going forward. I need someone in the OpenJDK support group to assist in either finding where the problem is in OpenJDK or where OpenNMS makes an incorrect call in OpenJDK 1.7 on FreeBSD 10.1. (Although, I believe, Ron Roskens has pretty well dug in to find it's probably not OpenNMS.) One last thing, the OpenNMS project tends to be Windows, MacOSX and LINUX Check out what Ron had to say when first exposed to FreeBSD: Thats pretty neat that FreeBSD have VM templates you can download and use as a base. Using that, I installed git, openjdk-7, jicmp, jicmp6 and postgresql94 packages. I cloned the OpenNMS repo, checked out master, and then ran “./compile.pl && ./assemble.pl -Dopennms.home=/opt/opennms” which ran through to completion. I wonder if using the linux jdk is whats causing it to attempt to run the NSIS part. You could try adding -Dos.name=FreeBSD to the build arguments to compile.pl and/or assemble.pl. Ron That's an open mind. Can the FreeBSD community do any less than take the baton and run the next leg of this race? Thank you for the effort in bringing this home! P. http://sourceforge.net/projects/opennms/?source=typ_redirect <---Source Code Process: download... unpack... ./compile.pl ./assemble.pl -Dopennms.home=/usr/local/opennms When done, copy from initial directory/targets and grab the opennms-1.14.0.2.tar.gz and copy it to the home directory (/usr/local/opennms) Unpack that in the directory. You'll need a postgres instance to connect to. Here to help with anything more.