-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unset TZDIR will cause crash without /usr/share/zoneinfo #1577
Comments
Thank you for reporting, @scdub . Do you mean ORC C++ library or ORC Java library? |
@dongjoon-hyun Sorry for not being more specific — the crash happens in the ORC C++ library. When the |
Sure, let me take a look. |
@scdub After a quick check, it seems that either |
@wgtmac Yes, I can confirm it will work if the |
It would be a lot of maintenance burden if the ORC library includes a TZDB in its distribution output. I prefer providing a better error message when the local tzdb is not found. BTW, C++20 has standardized std::chrono::tzdb to represent a copy of the IANA TZDB. As we are still on C++17 yet, we can switch to it once we make the C++20 transition. |
Proposed fix on the exception message: #1587 |
I hope the proposed fix can mitigate the situation in Apache ORC 2.0.0. |
When using ORC on a platform that doesn't have
/usr/share/zoneinfo
defined nor theTZDIR
environment variable set, the library will crash. Specifically on Windows, the DEFAULT_TZDIR location is an invalid path, but even on Linux the file is not present on minimal images like the default alpine container. It looks like the TZDATA is downloaded during the build and is referenced during the C++ tests of ORC, but this change won't affect the runtime DLLs. Perhaps a relative location or option to configure a TZDATA location would make sense? In my case working withconda
, I patched the routine to locate the tzdata that is included within the conda environment, but that wouldn't be applicable to all use cases.The text was updated successfully, but these errors were encountered: