1

my webapp deployed on tomcat server getting crashed with error:

A fatal error has been detected by the Java Runtime Environment:

SIGSEGV (0xb) at pc=0x00007fe6f9b9e105, pid=7607, tid=140628827879168

JRE version: Java(TM) SE Runtime Environment (8.0_31-b13) (build 1.8.0_31-b13)
Java VM: Java HotSpot(TM) 64-Bit Server VM (25.31-b07 mixed mode linux-amd64 compressed oops)
Problematic frame:
j com.emc.evt.reg.db.facade.DataDBAPI.isThereAnyOtherConcurrentTestRunningOrOnHoldFromTheListOfTestsGroupedToRunTogether_aroundBody554(Lcom/emc/evt/reg/db/facade/DataDBAPI;Ljava/lang/Long;Lorg/aspectj/lang/JoinPoint;)Z+355

Core dump written. Default location: /var/opt/vmware/vfabric-tc-server-developer/insight-instance/bin/core or core.7607 (max size 1 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again

If you would like to submit a bug report, please visit: http://bugreport.java.com/bugreport/crash.jsp

here is my code , this code works perfectly in junit or eclipse but when deployed on a web server, it crashed on invoking this method.

public boolean isThereAnyOtherConcurrentTestRunningOrOnHoldFromTheListOfTestsGroupedToRunTogether(Long runId) {
    Run run = getRunById(runId);
    if (run != null) {
        if (run.getCycle().getMode() != null && run.getCycle().getMode().equalsIgnoreCase(RUN_TYPE_CONCURRENT)) {
            logger.info("CYCLE {} , is not concurrent ....");
            return false;
        }

        //list of tests in the group
        List<Long> groupOfConcurrentTests = getAllTestsCaseIdsForTheCycleAndBoxHavingSameGroupIndex(run.getCycle().getId(), run.getBox().getId(), run.getTestCase().getCatTestId());

        if (groupOfConcurrentTests != null && groupOfConcurrentTests.size() > 1) {
            List<Run> concurrentRuns = runRepository.findByCycleIdAndBoxIdAndTestCaseCatTestIdInOrderByEndDateDesc(run.getCycle().getId(), run.getBox().getId(), groupOfConcurrentTests);

            if (concurrentRuns != null && !concurrentRuns.isEmpty()) {
                //Remove current run from the list, because it should be ignored
                concurrentRuns = concurrentRuns.stream().filter(conRun -> !conRun.getId().equals(run.getId())).collect(Collectors.toList());

                //Remove all box prep failures - ignort those failures
                concurrentRuns = concurrentRuns.stream().filter(conRun -> !conRun.getTestCaseState().equals(RunTestCaseStatus.BOX_PREPARATION_FAILED.name())).collect(Collectors.toList());

                //Is there any other test in group still running ?
                List<Run> testsRunning = concurrentRuns.stream().filter(conRun -> conRun.getTestCaseState().equals(RunTestCaseStatus.TEST_RUNNING.name())).collect(Collectors.toList());
                if (testsRunning != null && !testsRunning.isEmpty()) {
                    logger.info("CYCLE {} ,There are other tests in the group {}/{} still running....", run.getCycle().getCycleName(), run.getBox().getLabel(), run.getTestCase().getCatTestId());
                    return true;
                } else {
                    //If not, Is there any test in group still pending to be triaged.
                    List<Run> testsOnHold = concurrentRuns.stream().filter(conRun -> conRun.getTriageCompletionTime() == null).collect(Collectors.toList());
                    if (testsOnHold != null && !testsOnHold.isEmpty()) {
                        logger.info("CYCLE {} ,There are other tests in the group {}/{}  on HOLD....", run.getCycle().getCycleName(), run.getBox().getLabel(), run.getTestCase().getCatTestId());
                        return true;
                    }

                }
            }
        }
    }

    return false;
}

when i moved each of those stream statements to seperate method it works, any idea , how it makes difference ?

DimaSan
  • 12,264
  • 11
  • 65
  • 75
Abdul Salam
  • 238
  • 1
  • 3
  • 11
  • A +1 for making my day! Had a good laugh when I read that method name – akgren_soar Dec 07 '16 at 05:58
  • 2
    You neglected to mention you're using AspectJ and the crash occurred in an "around" advice, so this is probably a bug in AspectJ. Maybe @StephenC's facetious comment isn't so outlandish after all... – Jim Garrison Dec 07 '16 at 06:20
  • Which AspectJ compiler version are you using for aspect compilation and which AspectJ runtime version? Are you using compile-time or load-time weaving? Are you using any other Java agents or bytecode manipulation frameworks in combination with AspectJ? Can you maybe provide an [SSCCE](http://sscce.org/) here or on GitHub? BTW, maybe you want to upgrade your Java 8 version to a more recent release. Can you show your aspect code, please? – kriegaex Dec 10 '16 at 12:39

0 Answers0