Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-4133

[C++/Python] ORC adapter should fail gracefully if /etc/timezone is missing instead of aborting

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • C++, Python

    Description

      The following core was genereted by nightly build: https://travis-ci.org/kszucs/crossbow/builds/473397855

      Core was generated by `/opt/conda/bin/python /opt/conda/bin/pytest -v --pyargs pyarrow'.
      Program terminated with signal SIGABRT, Aborted.
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
      [Current thread is 1 (Thread 0x7fea61f9e740 (LWP 179))]
      (gdb) bt
      #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
      #1  0x00007fea608c8801 in __GI_abort () at abort.c:79
      #2  0x00007fea4b3483df in __gnu_cxx::__verbose_terminate_handler ()
          at /opt/conda/conda-bld/compilers_linux-64_1534514838838/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/libstdc++-v3/libsupc++/vterminate.cc:95
      #3  0x00007fea4b346b16 in __cxxabiv1::__terminate (handler=<optimized out>)
          at /opt/conda/conda-bld/compilers_linux-64_1534514838838/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
      #4  0x00007fea4b346b4c in std::terminate ()
          at /opt/conda/conda-bld/compilers_linux-64_1534514838838/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
      #5  0x00007fea4b346d28 in __cxxabiv1::__cxa_throw (obj=0x2039220,
          tinfo=0x7fea494803d0 <typeinfo for orc::TimezoneError>,
          dest=0x7fea49087e52 <orc::TimezoneError::~TimezoneError()>)
          at /opt/conda/conda-bld/compilers_linux-64_1534514838838/work/.build/x86_64-conda_cos6-linux-gnu/src/gcc/libstdc++-v3/libsupc++/eh_throw.cc:95
      #6  0x00007fea49086824 in orc::getTimezoneByFilename (filename=...)
          at /build/cpp/orc_ep-prefix/src/orc_ep/c++/src/Timezone.cc:704
      #7  0x00007fea490868d2 in orc::getLocalTimezone () at /build/cpp/orc_ep-prefix/src/orc_ep/c++/src/Timezone.cc:713                                                                                                                             #8  0x00007fea49063e59 in orc::RowReaderImpl::RowReaderImpl (this=0x204fe30, _contents=..., opts=...)
          at /build/cpp/orc_ep-prefix/src/orc_ep/c++/src/Reader.cc:185
      #9  0x00007fea4906651e in orc::ReaderImpl::createRowReader (this=0x1fb41b0, opts=...)
          at /build/cpp/orc_ep-prefix/src/orc_ep/c++/src/Reader.cc:630
      #10 0x00007fea48c2d904 in arrow::adapters::orc::ORCFileReader::Impl::ReadSchema (this=0x1270600, opts=...,                                                                                                                                        out=0x7ffe0ccae7b0) at /arrow/cpp/src/arrow/adapters/orc/adapter.cc:264
      #11 0x00007fea48c2e18d in arrow::adapters::orc::ORCFileReader::Impl::Read (this=0x1270600, out=0x7ffe0ccaea00)
          at /arrow/cpp/src/arrow/adapters/orc/adapter.cc:302
      #12 0x00007fea48c2a8b9 in arrow::adapters::orc::ORCFileReader::Read (this=0x1e14d10, out=0x7ffe0ccaea00)
          at /arrow/cpp/src/arrow/adapters/orc/adapter.cc:697                                                                                                                                                                                       #13 0x00007fea48218c9d in __pyx_pf_7pyarrow_4_orc_9ORCReader_12read (__pyx_v_self=0x7fea43de8688,
          __pyx_v_include_indices=0x7fea61d07b70 <_Py_NoneStruct>) at _orc.cpp:3865
      #14 0x00007fea48218b31 in __pyx_pw_7pyarrow_4_orc_9ORCReader_13read (__pyx_v_self=0x7fea43de8688,
          __pyx_args=0x7fea61f5e048, __pyx_kwds=0x7fea444f78b8) at _orc.cpp:3813
      #15 0x00007fea61910cbd in _PyCFunction_FastCallDict (func_obj=func_obj@entry=0x7fea444b9558,
          args=args@entry=0x7fea44a40fa8, nargs=nargs@entry=0, kwargs=kwargs@entry=0x7fea444f78b8)
          at Objects/methodobject.c:231
      #16 0x00007fea61910f16 in _PyCFunction_FastCallKeywords (func=func@entry=0x7fea444b9558,
          stack=stack@entry=0x7fea44a40fa8, nargs=0, kwnames=kwnames@entry=0x7fea47d81d30) at Objects/methodobject.c:294
      #17 0x00007fea619aa0da in call_function (pp_stack=pp_stack@entry=0x7ffe0ccaecf0, oparg=<optimized out>,
          kwnames=kwnames@entry=0x7fea47d81d30) at Python/ceval.c:4837
      #18 0x00007fea619abb46 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>)
          at Python/ceval.c:3351
      #19 0x00007fea619a9cde in _PyEval_EvalCodeWithName (_co=0x7fea47d9f6f0, globals=globals@entry=0x7fea47d9a750,
          locals=locals@entry=0x0, args=<optimized out>, argcount=1, kwnames=0x0, kwargs=0x206b078, kwcount=0,
          kwstep=kwstep@entry=1, defs=0x7fea47d81e98, defcount=defcount@entry=1, kwdefs=kwdefs@entry=0x0, closure=0x0,
          name=name@entry=0x7fea61ee2ce0, qualname=0x7fea47dc9df0) at Python/ceval.c:4166]
      

      Occured after commit https://github.com/apache/arrow/commit/c7cb1cee388bbfa890ce724f6a7a95991bd8eb1f
      Because ORC test was enabled: https://github.com/apache/arrow/commit/c7cb1cee388bbfa890ce724f6a7a95991bd8eb1f#diff-40c8affe619a826a115f8d07bfdcc095R31

      Locally reproduce with :

      $ git checkout c7cb1cee388bbfa890ce724f6a7a95991bd8eb1f
      $ docker-compose build cpp
      $ docker-compose build python
      $ docker-compose run python bash
      # arrow/ci/docker_build_cpp.sh
      # arrow/ci/docker_build_python.sh
      # ulimit -c unlimited
      # pytest -v --pyargs pyarrow
      # apt-get install -y gdb
      # gdb python -c core
      # (gdb) bt
      

      Solution is to properly setup timezone:

      export DEBIAN_FRONTEND=noninteractive
      apt-get install -y tzdata
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kszucs Krisztian Szucs
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: