Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-9972

Multiple crashes calling Java code from Thor

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 4.0
    • Fix Version/s: None
    • Component/s: Embedded Languages
    • Labels:
    • Environment:
      Fresh install of 4.0.0-9 on RHEL6

      Description

      Given this Java code, saved as a class file to /opt/HPCCSystems/classes:

      public class HpccService {
              
          public static int compareText(String someText, 
                  String dbText) {
      
              if(someText!=null && someText.equals(dbText)) {
                  return 20000;
              }
              return 2;
          }
      
          public static void main(String[] args) {
              System.out.println(compareText("LEE",  "LEE"));
          }
      
      }
      

      The following ECL code succeeds:

      IMPORT java;
       
      INTEGER compare(STRING enquiryElementValue, STRING candidateElementValue) := IMPORT(java,'HpccService.compareText:(Ljava/lang/String;Ljava/lang/String;)I');
      
      DataRec := RECORD
          STRING val1;
          INTEGER recordId;
      END;
      
      CombinedDataRec := RECORD
          DataRec;
          STRING val2;
          INTEGER score :=0;
      END;
      
      DataRec MakeDataRec(INTEGER c) := TRANSFORM
          SELF.val1 := (STRING) (RANDOM() % 32768);
          SELF.recordId := c;
      END;
      
      d1 := DATASET(100000,MakeDataRec(COUNTER));
      
      combinedRecords := JOIN
          (
              d1, 
              d1, 
              LEFT.recordId=RIGHT.recordId, 
              TRANSFORM
                  (
                      CombinedDataRec,
                      SELF.val1 := LEFT.val1,
                      SELF.val2 := RIGHT.val1,
                      SELF.recordId := LEFT.recordId
                  )
          );
      
      d2 := PROJECT
          (
              combinedRecords,
              TRANSFORM
                  (
                      CombinedDataRec,
                      SELF.score := compare(LEFT.val1 , LEFT.val2 ),
                      SELF := LEFT;
                  )
          );
      
      OUTPUT(d2(score > 2));
      

      However, if you replace that final OUTPUT with:

      OUTPUT(COUNT(d2(score > 2)));
      

      Then at runtime we see this error:

      Error: System error: -4: Graph[1], selfjoin[3]: SLAVE 10.210.150.114:20300: connection is broken
      Target: C!10.210.150.115, Raised in: /var/lib/jenkins/workspace/CE-Candidate-4.0.0-9-with-plugins/CE/centos-6.4-x86_64/HPCC-Platform/system/jlib/jsocket.cpp, line 1519, 
      

      Meanwhile, if you instead replace that OUTPUT with:

      OUTPUT(d2(score < 2));
      

      Then we see this error:

      Error: System error: 4: Graph[1], workunitwrite[6]: MP link closed (10.210.150.115:20100), Master exception
      

      That Thor slave has this excerpt in its log:

      00000054 2013-09-10 15:51:01.122 17312 18681 "================================================"
      00000055 2013-09-10 15:51:01.122 17312 18681 "Signal:    11 Segmentation fault"
      00000056 2013-09-10 15:51:01.122 17312 18681 "Fault IP:  00007F15A505EDE0"
      00000057 2013-09-10 15:51:01.122 17312 18681 "Accessing: 00007F15481A9000"
      00000058 2013-09-10 15:51:01.122 17312 18681 "Registers:"
      00000059 2013-09-10 15:51:01.122 17312 18681 "EAX:0000000000000001  EBX:00000000FFFFFFFF  ECX:0000000000000005  EDX:0000000000000037  ESI:0000000
      0FFFFFFFF  EDI:00000000E18F1620"
      0000005A 2013-09-10 15:51:01.122 17312 18681 "CS:EIP:0033:00007F15A505EDE0"
      0000005B 2013-09-10 15:51:01.122 17312 18681 "   ESP:00007F15721FB468  EBP:00007F15721FB4D0"
      0000005C 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB468]: 00007F15A500585A FFFFFFFF00007F15 00000000FFFFFFFF A500585A00000000 00007F15A500585A E18F160000007F15 00000000E18F1600 E18F15C000000000"
      0000005D 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB488]: 00000000E18F15C0 721FB49000000000 00007F15721FB490 9F8A408600007F15 000000009F8A4086 721FB4E800000000 00007F15721FB4E8 9F8A44F800007F15"
      0000005E 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB4A8]: 000000009F8A44F8 0000000000000000 0000000000000000 9F8A40B800000000 000000009F8A40B8 721FB48000000000 00007F15721FB480 721FB4E000007F15"
      0000005F 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB4C8]: 00007F15721FB4E0 721FB55000007F15 00007F15721FB550 A500043800007F15 00007F15A5000438 E18F160000007F15 00000000E18F1600 E18F15C000000000"
      00000060 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB4E8]: 00000000E18F15C0 00001FA000000000 00007F1500001FA0 721FB59000007F15 00007F15721FB590 AD17D79800007F15 00007F15AD17D798 721FB72900007F15"
      00000061 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB508]: 00007F15721FB729 7C00400000007F15 00007F157C004000 A50003AF00007F15 00007F15A50003AF 721FB5C000007F15 00007F15721FB5C0 721FB81800007F15"
      00000062 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB528]: 00007F15721FB818 0000000A00007F15 00007F150000000A 9F8A40B800007F15 000000009F8A40B8 A500F5A000000000 00007F15A500F5A0 721FB6E800007F15"
      00000063 2013-09-10 15:51:01.122 17312 18681 "Stack[00007F15721FB548]: 00007F15721FB6E8 721FB64000007F15 00007F15721FB640 ACBBE03000007F15 00007F15ACBBE030 0000000200007F15 0000003A00000002 7C0040000000003A"
      00000064 2013-09-10 15:51:01.122 17312 18681 "Backtrace:"
      00000065 2013-09-10 15:51:01.123 17312 18681 "  /opt/HPCCSystems/lib/libjlib.so(_Z16PrintStackReportv+0x28) [0x7f164a9afee8]"
      00000066 2013-09-10 15:51:01.123 17312 18681 "  /opt/HPCCSystems/lib/libjlib.so(_Z13excsighandleriP7siginfoPv+0x9da) [0x7f164a9b0b8a]"
      00000067 2013-09-10 15:51:01.123 17312 18681 "  /usr/lib/jvm/jre/lib/amd64/server/libjvm.so(+0x71212a) [0x7f15acdf012a]"
      00000068 2013-09-10 15:51:01.123 17312 18681 "  /usr/lib/jvm/jre/lib/amd64/server/libjvm.so(+0x70f0ab) [0x7f15acded0ab]"
      00000069 2013-09-10 15:51:01.123 17312 18681 "  /usr/lib/jvm/jre/lib/amd64/server/libjvm.so(JVM_handle_linux_signal+0x170) [0x7f15acdf0c10]"
      0000006A 2013-09-10 15:51:01.123 17312 18681 "  /usr/lib/jvm/jre/lib/amd64/server/libjvm.so(+0x70efbe) [0x7f15acdecfbe]"
      0000006B 2013-09-10 15:51:01.123 17312 18681 "  /lib64/libpthread.so.0() [0x3aa8a0f500]"
      0000006C 2013-09-10 15:51:01.123 17312 18681 "  [0x7f15a505ede0]"
      0000006D 2013-09-10 15:51:01.123 17312 18681 "ThreadList:
      7F164781D700 139733665699584 17317: CMPNotifyClosedThread
      7F1646E1C700 139733655209728 17318: MP Connection Thread
      7F164641B700 139733644719872 17322: CSocketSelectThread
      7F1645A1A700 139733634230016 17324: CBackupHandler
      7F1645019700 139733623740160 17326: CGraphProgressHandler
      7F15ADEFE700 139731089221376 18645: ReleaseBufferThread
      7F1589F6D700 139730485696256 18669: CMemoryUsageReporter
      7F158956C700 139730475206400 18670: CGraphExecutor pool
      7F1588B6B700 139730464716544 18672: ProcessSlaveActivity
      7F1573FFF700 139730117195520 18675: CThorSorter
      7F15735FE700 139730106705664 18676: ThorLookaheadCache
      7F1572BFD700 139730096215808 18678: SortTransferServer
      7F15721FC700 139730085725952 18681: ThorLookaheadCache
      7F15717FB700 139730075236096 18682: CSocketSelectThread
      

        Attachments

          Activity

            People

            Assignee:
            richardkchapman Richard Chapman
            Reporter:
            dcamper Dan S. Camper
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: