Uploaded image for project: 'Apache HAWQ'
  1. Apache HAWQ
  2. HAWQ-513

initdb.c failed on OSX 10.11.3 due to fgets error

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: backlog
    • Component/s: Unknown
    • Labels:
      None

      Description

      we hit following strange issue on OSX 10.11.3:

      The error message in the initdb is:

      20160301:00:00:26:075823 hawq_init:This-MacBook-Pro:vagrant-[INFO]:-Start to init master node: 'localhost'
      sh: line 1: 76106 Trace/BPT trap: 5       "/usr/local/hawq/bin/postgres" -V 2> /dev/null
      fgets failure: Undefined error: 0
      The program "postgres" is needed by initdb but was either not found in the same directory as "/usr/local/hawq/bin/initdb" or failed unexpectedly.
      Check your installation; "postgres -V" may have more information.
      Master postgres initdb failed
      

      We suspect the issue due to the newer version of the libSystem.B.dylib on OSX 10.11.3.

      Here is the details of the dependencies of `postgres` and `initdb`:

      10.10.5, postgres can start, and initdb succeed:

      [bin: xzhang{master}]$ otool -L postgres
      postgres:
          /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
          libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30)
          /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
          libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13)
          /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, current version 3.1.0)
          /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, current version 5.0.0)
          /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
          /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
          /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
          /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
          libdxltranslators.dylib (compatibility version 0.0.0, current version 0.0.0)
          /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version 0.0.0, current version 0.0.0)
      
      This-MacBook-Pro:bin vagrant$ otool -L initdb
      initdb:
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
      

      10.11.3, postgres can start, but initdb failed:

      This-MacBook-Pro:bin vagrant$ otool -L postgres
      postgres:
          /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
          libhdfs3.1.dylib (compatibility version 1.0.0, current version 2.2.30)
          /usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.9.0)
          libyarn.1.dylib (compatibility version 1.0.0, current version 0.1.13)
          /usr/local/opt/json-c/lib/libjson-c.2.dylib (compatibility version 3.0.0, current version 3.1.0)
          /usr/local/opt/snappy/lib/libsnappy.1.dylib (compatibility version 5.0.0, current version 5.0.0)
          /usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.5)
          /usr/lib/libssl.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
          /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8)
          /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
          /usr/lib/libcurl.4.dylib (compatibility version 7.0.0, current version 8.0.0)
          /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos (compatibility version 5.0.0, current version 6.0.0)
          libdxltranslators.dylib (compatibility version 0.0.0, current version 0.0.0)
          /usr/local/opt/thrift/lib/libthrift-0.9.3.dylib (compatibility version 0.0.0, current version 0.0.0)
      
      [bin: xzhang{master}]$ otool -L initdb
      initdb:
          /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
      

      In this case, there is a difference between the two OS regarding to the libSystem.B.dylib.

      Question is how to fix it? For example, how to change the libSystem.B.dylib to an older version? or, how to fix the postgres or initdb so that they works on the new OSX 10.11.3?

        Attachments

          Activity

            People

            • Assignee:
              hongxu ma Hongxu Ma
              Reporter:
              xzhang.pivotal xin zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: