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

PARSE segfaults when "data" input is not a field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Not specified
    • Resolution: Fixed
    • Affects Version/s: 5.4.4
    • Fix Version/s: 6.0.0
    • Component/s: Code Generator
    • Labels:
      None
    • Environment:
      USLM Dev

      Description

      The following code (which runs fine in OSS 4.2.8-1) fails with an MP Link closed error in OSS 5.4.4-rc1:

      #workunit('name', 'OSS_parse_bug');
      
      rec := record
        unsigned8 id;
        unicode   attribute_Field;
      end;
      
      cleansedFieldInline := dataset([{6420, ''}], rec);
      
      cleansedFieldRead := dataset('~oss_bug::write_inline',rec,thor)[1..1];
      
      pattern words := pattern('[^,;]+');
      pattern sepchar := [',',';','AND'];
      rule termsRule := FIRST words sepchar |sepchar words LAST | sepchar words sepchar | FIRST words LAST;
      
      normalizeSeperators(unicode str) := regexreplace(u'AND',str,u',');
      
      termsDs := parse(cleansedFieldRead,
                       normalizeSeperators(attribute_Field),
                       termsRule,
                       transform({rec, unicode terms},
                                 self.terms := trim(matchunicode(words),left,right),
                                 self := left),
                       SCAN ALL);
      
      sequential (
        output(cleansedFieldInline,,'~oss_bug::write_inline',overwrite),
        output(termsDs,,'~oss_bug::parse_result',overwrite)
      );
      
      

      Thormaster log contains:

      00000415 2015-10-30 16:56:49.846 21483 21483 "================================================"
      00000416 2015-10-30 16:56:49.846 21483 21483 "Signal: 11 Segmentation fault"
      00000417 2015-10-30 16:56:49.846 21483 21483 "Fault IP: 00007FE0990EB46D"
      00000418 2015-10-30 16:56:49.846 21483 21483 "Accessing: 00007FE0904B94F8"
      00000419 2015-10-30 16:56:49.846 21483 21483 "Registers:"
      0000041A 2015-10-30 16:56:49.846 21483 21483 "EAX:00007FE0904B94F0 EBX:000000000155BE40 ECX:00007FE08C000028 EDX:00007FE099318388 ESI:0000000000000000 EDI:00000000014D2F88"
      0000041B 2015-10-30 16:56:49.846 21483 21483 "CS:EIP:0033:00007FE0990EB46D"
      0000041C 2015-10-30 16:56:49.846 21483 21483 " ESP:00007FFFEC6E5570 EBP:000000000061D820"
      0000041D 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E5570]: 000000000061D9C0 0155BE4000000000 000000000155BE40 0061D82000000000 000000000061D820 980316AA00000000 00007FE0980316AA 0155BE4000007FE0"
      0000041E 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E5590]: 000000000155BE40 982932E400000000 00007FE0982932E4 014D7C7000007FE0 00000000014D7C70 990F2FFC00000000 00007FE0990F2FFC EC6E562000007FE0"
      0000041F 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E55B0]: 00007FFFEC6E5620 9AEFB86500007FFF 000000009AEFB865 0061D83000000000 000000000061D830 0000000100000000 0000000000000001 0061D88800000000"
      00000420 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E55D0]: 000000000061D888 0061D93000000000 000000000061D930 0000000100000000 0000000100000001 014D7CE800000001 00000000014D7CE8 01562EF000000000"
      00000421 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E55F0]: 0000000001562EF0 01602B5000000000 0000000001602B50 01602BC800000000 0000000001602BC8 014D7C7000000000 00000000014D7C70 0000000000000000"
      00000422 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E5610]: 0000000000000000 014DE14800000000 00000000014DE148 0000000000000000 0000000000000000 014D7C7000000000 00000000014D7C70 0000000100000000"
      00000423 2015-10-30 16:56:49.846 21483 21483 "Stack[00007FFFEC6E5630]: 0000000000000001 990F36C400000000 00007FE0990F36C4 0000000000007FE0 0000000000000000 FFFFFFFF00000000 00000000FFFFFFFF 0000000100000000"
      00000424 2015-10-30 16:56:49.847 21483 21483 "Stack[00007FFFEC6E5650]: 0000000000000001 014D7C7000000000 00000000014D7C70 0000000000000000 0000000000000000 014DE14800000000 00000000014DE148 0000000000000000"
      00000425 2015-10-30 16:56:49.847 21483 21483 "Backtrace:"
      00000426 2015-10-30 16:56:49.847 21483 21483 " /opt/HPCCSystems/lib/libjlib.so(_Z16printStackReportv+0x32) [0x7fe09aba25a2]"
      00000427 2015-10-30 16:56:49.847 21483 21483 " /opt/HPCCSystems/lib/libjlib.so(_Z13excsighandleriP7siginfoPv+0x9ca) [0x7fe09aba32ca]"
      00000428 2015-10-30 16:56:49.848 21483 21483 " /lib64/libpthread.so.0(+0xf710) [0x7fe094406710]"
      00000429 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libgraph_lcr.so(_ZN13CActivityBaseD1Ev+0x4d) [0x7fe0990eb46d]"
      0000042A 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libactivitymasters_lcr.so(_ZN21CFirstNActivityMasterD0Ev+0x3a) [0x7fe0980316aa]"
      0000042B 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libgraphmaster_lcr.so(_ZNK15CMasterActivity7ReleaseEv+0x44) [0x7fe0982932e4]"
      0000042C 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libgraph_lcr.so(_ZN10CGraphBase5cleanEv+0x13c) [0x7fe0990f2ffc]"
      0000042D 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libgraph_lcr.so(_ZN10CGraphBaseD1Ev+0x44) [0x7fe0990f36c4]"
      0000042E 2015-10-30 16:56:49.848 21483 21483 " /opt/HPCCSystems/lib/libgraphmaster_lcr.so(_ZN12CMasterGraphD0Ev+0x9) [0x7fe0982815a9]"
      0000042F 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_ZN11DeMonServerD0Ev+0xb2) [0x40e1b2]"
      00000430 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_ZNK11DeMonServer7ReleaseEv+0x28) [0x40c7c8]"
      00000431 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_ZN11CJobManagerD2Ev+0x5c) [0x40ffcc]"
      00000432 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_ZN11CJobManagerD0Ev+0x9) [0x410159]"
      00000433 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_ZNK11CJobManager7ReleaseEv+0x28) [0x4138b8]"
      00000434 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(_Z8thorMainP14ILogMsgHandler+0x275) [0x412e65]"
      00000435 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a(main+0x1214) [0x415664]"
      00000436 2015-10-30 16:56:49.848 21483 21483 " /lib64/libc.so.6(__libc_start_main+0xfd) [0x7fe094081d5d]"
      00000437 2015-10-30 16:56:49.848 21483 21483 " /mnt/disk1/var/lib/HPCCSystems/thor10_110_a/thormaster_thor10_110_a() [0x40ad39]"
      00000438 2015-10-30 16:56:49.848 21483 21483 "ThreadList:
      7FE092CBE700 140602512238336 21485: CMPNotifyClosedThread
      7FE0922BD700 140602501748480 21486: CSocketBaseThread
      7FE0918BC700 140602491258624 21487: MP Connection Thread
      7FE090EBB700 140602480768768 21489: LogMsgParentReceiver
      7FDE97FBE700 140594009335552 21490: LogMsgFilterReceiver
      7FDE975BD700 140593998845696 21491: CMasterWatchdogBase
      7FDE96BBC700 140593988355840 21492: CDeregistrationWatch
      7FDE961BB700 140593977865984 21493: CDaliConnectionValidator
      7FDE8FFFF700 140593875384064 21496: CDaliPublisherClient
      7FDE8F5FE700 140593864894208 21497: Member of thread pool: CDaliPublisherClientMessages
      7FDE7B5FE700 140593529349888 1354: Stopped CMasterActivity

        Attachments

          Activity

            People

            • Assignee:
              ghalliday Gavin Halliday
              Reporter:
              joecella Joe Cella
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: