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

esp process core when plugin contains no published ECL

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0.0
    • Fix Version/s: 5.6.0
    • Component/s: Code Generator
    • Labels:
      None

      Description

      Background: I had started writing a new plugin (Kafka) and had erected only the most minimal of 'shells' for it. Since I was building from source I wanted to make sure that everything else was okay before starting in on my own code. My kafka.ecllib file contained only a SERVICE declaration with no declared functions and two empty MODULE declarations.

      The platform code compiled in debug mode and everything started up except the esp process, which cored with the following backtrace:

      00000072 2015-10-16 08:29:46.101 25146 25146 "Backtrace:"
      00000073 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libjlib.so(_Z16printStackReportv+0x43) [0x7fafcea348fd]"
      00000074 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libjlib.so(_Z13excsighandleriP9siginfo_tPv+0x345) [0x7fafcea34288]"
      00000075 2015-10-16 08:29:46.102 25146 25146 "  /lib/x86_64-linux-gnu/libpthread.so.0(+0x10340) [0x7fafcd1b5340]"
      00000076 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libhql.so(_ZN7HqlGram7yyParseEbb+0xcb) [0x7fafb9437465]"
      00000077 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libhql.so(_Z11parseModuleP9IHqlScopeP13IFileContentsR16HqlLookupContextP9IXmlScopeb+0x132) [0x7fafb94368ec]"
      00000078 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libhql.so(_ZN15CHqlRemoteScope16doParseScopeTextER16HqlLookupContext+0x6a) [0x7fafb93b9c42]"
      00000079 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libhql.so(_ZN15CHqlRemoteScope14preloadSymbolsER16HqlLookupContextb+0x6f) [0x7fafb93b9b85]"
      0000007A 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libhql.so(_ZN15CHqlRemoteScope20ensureSymbolsDefinedER16HqlLookupContext+0x28) [0x7fafb93b9b0e]"
      0000007B 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libfileview2.so(_ZN23ViewTransformerRegistry10addPluginsEPKc+0x1f6) [0x7fafb90560e2]"
      0000007C 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libws_dfu.so(_ZN8CWsDfuEx4initEP13IPropertyTreePKcS3_+0x3a3) [0x7fafb9b1927d]"
      0000007D 2015-10-16 08:29:46.102 25146 25146 "  /opt/HPCCSystems/lib/libws_dfu.so(esp_service_factory+0x6b) [0x7fafb9b17ac4]"
      0000007E 2015-10-16 08:29:46.102 25146 25146 "  esp(_ZN10CEspConfig11loadServiceER7srv_cfg+0x16d) [0x416677]"
      0000007F 2015-10-16 08:29:46.102 25146 25146 "  esp(_ZN10CEspConfig12loadServicesEv+0x43) [0x416775]"
      00000080 2015-10-16 08:29:46.102 25146 25146 "  esp(_ZN10CEspConfig7loadAllEv+0x29) [0x41d933]"
      00000081 2015-10-16 08:29:46.102 25146 25146 "  esp(_Z9init_mainiPPc+0xa73) [0x41c9ec]"
      00000082 2015-10-16 08:29:46.102 25146 25146 "  esp(_Z15start_init_mainiPPcPFiiS0_E+0x25) [0x41baf3]"
      00000083 2015-10-16 08:29:46.102 25146 25146 "  esp(main+0x27) [0x41ce82]"
      00000084 2015-10-16 08:29:46.102 25146 25146 "  /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fafcce01ec5]"
      00000085 2015-10-16 08:29:46.102 25146 25146 "  esp() [0x4143f9]"
      

      The problem turned out to be the empty declarations. Once I filled in both a service function and an exported module function calling it (I commented-out the second module declaration), everything started working. Disclaimer: I did not try populating only one or the other separately and testing.

      While what I was doing was obviously wrong, I think a backtrace may not be the best way of notifying the user of the problem. Ideally, the empty declarations should be accepted (they're useless, but do no damage) but if they cannot be accepted then a reasonable error message should be generated instead.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: