-
Notifications
You must be signed in to change notification settings - Fork 694
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
4 tests failing when using system TZDB with GCC #713
Comments
The same failures occur when not defining |
Thanks for your report. On macOS I get also get a failure on posix/ptz.pass.cpp: Assertion failed: (is_equal(tzi->get_info(tp), tzp.get_info(tp))), function main, file ptz.pass.cpp, line 96. The binary form of the tzdb has save==0 for "Europe/Dublin" on 2021-01-01, which is incorrect. The save should be -60min. This error in the macOS tzdb files is relatively harmless. It doesn't cause errors in mapping between local time and UTC, but it will cause the C struct tm member tm_isdst to display 0 instead of 1. I don't know for sure if this is the same error on the platform you are seeing. And I am not replicating the other two errors you're reporting, and so am not sure what their cause is. I would not be surprised if they were also due to minor errors in the OS-supplied binary database. The binary form of the database lacks detailed information on |
Do you have any suggestions as how I could debug this? |
You can If you can insert print statements in the test to narrow down what line the test is failing on, that can help. Also, most everything in this library is printable. For example to gather the information I posted above about ptz.pass.cpp I simply did this: std::cerr << tzi->get_info(tp) << '\n';
std::cerr << tzp.get_info(tp) << '\n'; This printed out the |
After debugging a bit, I can see that the line that throws the first exception in Calling |
Uhm... I tried printing
Edit:
|
Wild theory. This may be a duplicate of #614. Did you build the IANA tzdb binary files yourself with zic? My parser only handles output built with the zic option I'm not sure at the moment how to test for this possibility. And modifying the parser to handle |
Nope, (I never heard it before), and it happens on both my main PC and my laptop, and also in a clean Debian Testing environment (VM), so everything should be clean. Edit: maybe the default Debian tzdb is now built with |
I've searched around and I don't see a way to check this yet. I also can't find anything on it in the Debian docs. |
If it can help, here's the package that contains the tzdb: https://packages.debian.org/testing/tzdata . #614 mentions that they started using Edit: yes, This means that all systems with an updated tzdb are running a version built with |
Right. But I don't know if Debian is using an older There's a decent chance Debian is using the latest tzcode. But I'm not sure how to confirm that. |
See the updated comment |
I don't have a quick fix for this, sorry. |
Uhm... Looking at glibc's source, it seems that they are still using tzcode 2020a (bminor/glibc@61d6440). This probably means that Debian is shipping a tzdb updated to version 2021e, but built with a version of
Don't worry, I don't need a quick fix. I'm here to help ;) |
Thanks much. Your latest research appears to indicate my |
I can fix this one! The |
Oh, right... :/ |
Wait... Maybe that's my fault |
Sorry! I'm just dumb, I guess. The lowercase |
To recap, #713 (comment) is still accurate, except for " The relevant part is that |
Does the |
Nope, "Unknown error -1" |
I tried running the test under LLDB. The
So, the exception is trowed by std::call_once, and luckily I've encountered this issue before. Let me compile the test with Edit: yep, using |
Thanks much for you persistent efforts on this. I should've guessed this one, as I've seen it before. |
The Linux specific:
|
I should read manuals more often 😅️ |
@HowardHinnant would it be an option to state in the documentation of your timezone solution that only the fat version of the timezone data is supported? We observed on our embedded system that the day light saving time was not properly detected. It was working nicely on our Ubuntu system. And copying the Ubuntu files to the embedded device solved the issue as well. Eventually we found this additional option for building the tzdata package with Thanks anyways for your beautiful piece of code. |
When running
testit
from release 3.0.1 withOPTIONS='-DONLY_C_LOCALE=1 -DUSE_OS_TZDB=1'
, the testsposix/ptz.pass.cpp
,solar_hijri_test/parse.pass.cpp
, andtz_test/zoned_time.pass.cpp
fail with errorterminate called after throwing an instance of 'std::system_error'
-what(): Unknown error -1
. When testing the latest master, two testsfrom tz_test/zoned_time.pass.cpp
fail.This happens when using GCC 10.3.0 on Debian Testing and GCC 11.2.0 on Debian Unstable, but not with Clang 11.1.0 on Debian Testing.
Tested with 3.0.1 with 052eeba applied and with latest master.
The text was updated successfully, but these errors were encountered: