IVCTool / IVCT_Framework

For IVCT Framework Developers. Core System for the IVCT (Integration, Verification and Certification Tool) for HLA Federates
Apache License 2.0
16 stars 4 forks source link

Stacktrace in IVCT #127

Closed bergtwvd closed 6 years ago

bergtwvd commented 6 years ago

I get the stack trace listed below in the tc-runner container when starting a test case against HelloWorld-1.0.0.

The containerized IVCT composition runs on host A, the HelloWorld application as a non-containerized application on host B. Host B is accessible from A, ports are open.

2018-06-27 13:49:08,491 : JMSTestRunner:onMessageConsumer:run: de.fraunhofer.iosb.tc_helloworld.TC0001
2018-06-27 13:49:08,494 : JMSTestRunner:onMessageConsumer:run: tsRunFolder is /root/conf/TestSuites/TS_HelloWorld-1.0.0/bin
2018-06-27 13:49:08,495 : JMSTestRunner:onMessageConsumer:run: setCurrentDirectory true
2018-06-27 13:49:08,495 : JMSTestRunner:onMessageConsumer:run: TC DIR is /root/conf/TestSuites/TS_HelloWorld-1.0.0/bin
2018-06-27 13:49:08,495 : JMSTestRunner:onMessageConsumer:run: The test case class is: de.fraunhofer.iosb.tc_helloworld.TC0001
2018-06-27 13:49:08,502 TC0001:
---------------------------------------------------------------------
TEST PURPOSE
Test if a HelloWorld federate calculates a fixed population increase
correctly
Observe the federate for a fixed number of cycles and compare the
last received value with the previously received value plus the fixed
percentage and a small tolerence for each cycle
---------------------------------------------------------------------

2018-06-27 13:49:08,504 TC0001: TEST CASE PREAMBLE
2018-06-27 13:49:08,547 TC0001: createFederationExecution exception=Federation HelloWorld already exists (909000000)
2018-06-27 13:49:08,548 TC0001: initiateRti: FederationExecutionAlreadyExists (ignored)
Exception in thread "prti1516e: LRC[0x1ecb3347] joiner pool-24-thread-1" java.lang.NullPointerException
        at se.pitch.prti1516e.lrc.l.a(prticore_b2699:139)
        at se.pitch.prti1516e.lrc.D.a(prticore_b2699:61)
        at se.pitch.prti1516e.lrc.m$1.run(prticore_b2699:553)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
2018-06-27 13:49:08,611 TC0001: joinFederationExecution exception=NullPointerException (909056008)
2018-06-27 13:49:08,613 TC0001: initiateRti:
hla.rti1516e.exceptions.RTIinternalError: NullPointerException (909056008)
        at se.pitch.prti1516e.lrc.m.a(prticore_b2699:690) ~[prticore.jar:na]
        at se.pitch.prti1516e.lrc.J.joinFederationExecution(prticore_b2699:258) ~[prticore.jar:na]
        at se.pitch.prti1516e.lrc.H.joinFederationExecution(prticore_b2699:603) ~[prticore.jar:na]
        at se.pitch.prti1516e.lrc.K.joinFederationExecution(prticore_b2699:880) ~[prticore.jar:na]
        at de.fraunhofer.iosb.tc_lib.IVCT_RTIambassador.joinFederationExecution(IVCT_RTIambassador.java:382) ~[TC.lib-1.0.1.jar:na]
        at de.fraunhofer.iosb.tc_lib.IVCT_BaseModel.initiateRti(IVCT_BaseModel.java:105) ~[TC.lib-1.0.1.jar:na]
        at de.fraunhofer.iosb.tc_helloworld.TC0001.preambleAction(TC0001.java:89) [TS_HelloWorld-1.0.0.jar:na]
        at de.fraunhofer.iosb.tc_lib.AbstractTestCase.execute(AbstractTestCase.java:123) [TC.lib-1.0.1.jar:na]
        at de.fraunhofer.iosb.testrunner.TestRunner.executeTests(TestRunner.java:78) [TC.exec-1.0.1.jar:na]
        at de.fraunhofer.iosb.testrunner.JMSTestRunner$TestScheduleRunner.run(JMSTestRunner.java:184) [TC.exec-1.0.1.jar:na]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111-internal]
2018-06-27 13:49:08,616 TC0001: getInteractionClassHandle exception=getInteractionClassHandle (909001001)
2018-06-27 13:49:08,616 TC0001: Cannot get interaction class handle or parameter handle
2018-06-27 13:49:08,617 TC0001: resignFederationExecution exception=resignFederationExecution (909001001)
2018-06-27 13:49:08,617 TC0001: resignFederationExecution exception=resignFederationExecution (909001001)
2018-06-27 13:49:08,619 TC0001: destroyFederationExecution exception=Federates Currently Joined (909146016)
2018-06-27 13:49:08,619 TC0001: terminateRti: FederatesCurrentlyJoined (ignored)
2018-06-27 13:49:08,624 TC0001: TC INCONCLUSIVE Cannot helloWorldBaseModel.init()
bergtwvd commented 6 years ago

I enabled LRC logging (see log below) and got some more information.

The FOM module in the joinFederation call is wrong: T: 16:50:27 fed0 << joinFederationExecution("IVCT", "HelloWorld", [jar:file:/root/conf/TestSuites/TS_HelloWorld-1.0.0/lib/TS_HelloWorld-1.0.0.jar!/HelloWorld.xml])

This causes the stacktrace later on.

I am unfamiliar with the code; where is the FOM for a Test Case set?


---------------------------------------------------------------------

2018-07-03 16:50:27,206 TC0001: TEST CASE PREAMBLE
T: 16:50:27 fed0 << connect(HLA_IMMEDIATE, "crcAddress=crc:8989")
T: 16:50:27 fed0 << connect
T: 16:50:27 fed0 << createFederationExecution("HelloWorld", [jar:file:/root/conf/TestSuites/TS_HelloWorld-1.0.0/lib/TS_HelloWorld-1.0.0.jar!/HelloWorld.xml], "HLAfloat64Time")
T: 16:50:27 fed0 << createFederationExecution => hla.rti1516e.exceptions.FederationExecutionAlreadyExists: Federation HelloWorld already exists (909000000)
2018-07-03 16:50:27,262 TC0001: createFederationExecution exception=Federation HelloWorld already exists (909000000)
2018-07-03 16:50:27,263 TC0001: initiateRti: FederationExecutionAlreadyExists (ignored)
T: 16:50:27 fed0 << joinFederationExecution("IVCT", "HelloWorld", [jar:file:/root/conf/TestSuites/TS_HelloWorld-1.0.0/lib/TS_HelloWorld-1.0.0.jar!/HelloWorld.xml])
T: 16:50:27 fed6 << joinFederationExecution => hla.rti1516e.exceptions.RTIinternalError: NullPointerException (909056008)
2018-07-03 16:50:27,330 TC0001: joinFederationExecution exception=NullPointerException (909056008)
2018-07-03 16:50:27,336 TC0001: initiateRti: 
hla.rti1516e.exceptions.RTIinternalError: NullPointerException (909056008)
    at se.pitch.prti1516e.lrc.m.a(prticore_b2699:690) ~[prticore.jar:na]
    at se.pitch.prti1516e.lrc.J.joinFederationExecution(prticore_b2699:258) ~[prticore.jar:na]
    at se.pitch.prti1516e.lrc.H.joinFederationExecution(prticore_b2699:603) ~[prticore.jar:na]
    at se.pitch.prti1516e.lrc.K.joinFederationExecution(prticore_b2699:880) ~[prticore.jar:na]
    at de.fraunhofer.iosb.tc_lib.IVCT_RTIambassador.joinFederationExecution(IVCT_RTIambassador.java:382) ~[TC.lib-1.0.1.jar:na]
    at de.fraunhofer.iosb.tc_lib.IVCT_BaseModel.initiateRti(IVCT_BaseModel.java:105) ~[TC.lib-1.0.1.jar:na]
    at de.fraunhofer.iosb.tc_helloworld.TC0001.preambleAction(TC0001.java:89) [TS_HelloWorld-1.0.0.jar:na]
    at de.fraunhofer.iosb.tc_lib.AbstractTestCase.execute(AbstractTestCase.java:123) [TC.lib-1.0.1.jar:na]
    at de.fraunhofer.iosb.testrunner.TestRunner.executeTests(TestRunner.java:78) [TC.exec-1.0.1.jar:na]
    at de.fraunhofer.iosb.testrunner.JMSTestRunner$TestScheduleRunner.run(JMSTestRunner.java:184) [TC.exec-1.0.1.jar:na]
    at java.lang.Thread.run(Thread.java:745) [na:1.8.0_111-internal]
T: 16:50:27 fed6 << getInteractionClassHandle("Communication")
T: 16:50:27 fed6 << getInteractionClassHandle => hla.rti1516e.exceptions.FederateNotExecutionMember: getInteractionClassHandle (909001001)
2018-07-03 16:50:27,339 TC0001: getInteractionClassHandle exception=getInteractionClassHandle (909001001)
2018-07-03 16:50:27,339 TC0001: Cannot get interaction class handle or parameter handle
T: 16:50:27 fed6 << resignFederationExecution(DELETE_OBJECTS_THEN_DIVEST)
T: 16:50:27 fed6 << resignFederationExecution => hla.rti1516e.exceptions.FederateNotExecutionMember: resignFederationExecution (909001001)
2018-07-03 16:50:27,340 TC0001: resignFederationExecution exception=resignFederationExecution (909001001)
2018-07-03 16:50:27,341 TC0001: resignFederationExecution exception=resignFederationExecution (909001001)
T: 16:50:27 fed6 << destroyFederationExecution("HelloWorld")
T: 16:50:27 fed6 << destroyFederationExecution => hla.rti1516e.exceptions.FederatesCurrentlyJoined: Federates Currently Joined (909146016)
2018-07-03 16:50:27,342 TC0001: destroyFederationExecution exception=Federates Currently Joined (909146016)
2018-07-03 16:50:27,343 TC0001: terminateRti: FederatesCurrentlyJoined (ignored)
T: 16:50:27 fed6 << disconnect()
T: 16:50:27 fed6 << disconnect
2018-07-03 16:50:27,354 TC0001: TC INCONCLUSIVE Cannot helloWorldBaseModel.init()
``
bergtwvd commented 6 years ago

The FOM is set in HelloWorldTcParam.java at this.urls[0] = this.getClass().getClassLoader().getResource("HelloWorld.xml");

I opened the jar in the container and checked that the FOM file is actually there; yes it is. Thus the URL is okay and points to an actual file.

Why is the joinFederation faulting?

I raise an issue with Pitch to see what they can find out.

bergtwvd commented 6 years ago

Keep in mind that the TC runner works with the official Pitch RTI LRC and the Hello World App with the Free RTI LRC. Might clash.

bergtwvd commented 6 years ago

I swapped the Free RTI jar files in HelloWorld for the official release one. Unfortunately no big difference. The Free RTI message disappeared when starting HelloWorld, but the null pointer exception in the TC runner at joinFederation still occurs.

ducana commented 6 years ago

It seems that that the versions are being mixed: TS_HelloWorld-1.0.0.jar and TC.lib-1.0.1.jar. If there is a mis-match between 1.0.0 and 1.0.1, it might explain this problem.

bergtwvd commented 6 years ago

I run HelloWorld-1.0.1.jar. Is there a FOM difference?

rhzg commented 6 years ago

i believe John was refering to potential version clash between the test case implementation and the library. Not sure if that could cause the RTI message

ducana commented 6 years ago

There is no change in the FOM file. In the log file I see that TS_HelloWorld-1.0.0.jar ist being used. Did you change the version to TS_HelloWorld-1.0.1.jar since then? Somewhere there seems to be a discrepancy between the version numbers in a start-up file.

ducana commented 6 years ago

In the development branch of IVCT_Runtime, the IVCT_Runtime/IVCTsut/hw_iosb/HelloWorld-1.0.1 folder was missing. This had caused a problem when trying to run HelloWorld and start HelloWorld-1.0.1 after a checkout.

bergtwvd commented 6 years ago

After trying different options, it seems that the issue is likely related to Ubuntu 14.06.

I am able to run the IVCT composition (containerized) on host A (Ubuntu 16) and the HelloWorld app (native) on host B (Ubuntu 16).

I still need to try a few other options, but seems that there is no issue with the RTI.

bergtwvd commented 6 years ago

I close the issue, since I will upgrade to Ubuntu 16 anyway.