-
Notifications
You must be signed in to change notification settings - Fork 262
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
nc_test fails when optimization greater than -O0 is invoked. #1983
Comments
I can confirm that replacing |
Some relevant build env information from over there. Host env:
Build env:
|
Surprisingly, no failure on a raspberry pi ARM device (gcc 10.2). |
I would suggest you try on standard unix box with valgrind, and with address sanitizer. |
The address sanitizer hadn't turned anything up, but valgrind was a good idea. Valgrind detected a few undefined variables that could have been the issue, but addressing them in the source |
This (or a similar) issue has recently popped up in Opensuse Tumbleweed i586, x86_64 and aarch64 (some logs at [0]) when they switched gcc from 10 to 11 by default (it was a huge update, so might be coming from something else, but this seems the most noteworthy change in my eyes). I only tested x86_64 locally, compiling with Haven't had the time to look any further yet. Edit: To clarify, the version at [0] is still 4.7.4, but my local tests were with 4.8.0. |
Thanks for percolating this back up; I'll pick this back up and see if I can figure out what's going on. |
Egbert Eich from the SUSE team was able to pin this down to strict aliasing requirements in GCC11. After disabling it in [0], the package (now 4.8.0) builds with successful tests [1]. [0] https://build.opensuse.org/request/show/904468 |
Wow, thank you, I've been working on this and a different issue in an effort to get our next release out, this is a great help. I will sort through his results and get this addressed! |
What is the exact fix: -Wnomaybe-unitialized ? |
@DennisHeimbigner I believe the temporary fix, pending the broader evaluation of our aliasing, is to pass |
@DennisHeimbigner still encountering the issue on OSX w/ gcc, so continue to move forward working on this. |
Can we fix the code instead of adding a flag? What is the exact code issue that is causing the problem, do we know? |
@edhartnett Fixing the code would be ideal, but the code, and the fix, still need tbd. We need to get 4.8.1 out the door and if a flag will let us implement a work around until the fix is determined, that may be the route we end up taking. But we're still sorting things out on our end. |
On ArchLinux (x86_64), we have the same issue but I can confirm that |
This error has been temporarily addressed w/ the configuration flags so that it is no longer blocking |
Thanks to the renewed interest, some additional info/reading provided by @dopplershift, and an expanded knowledge of |
…running nc_test/nc_test, in support of Unidata#1983, amongst others. The cast as was being used was undefined behavior, and had to be worked around in a style approximating C++'s 'reinterpret_cast'
* main: (1776 commits) Invert solution as discussed at Unidata#2618 Correct a potential null pointer dereference. Fix a logic error that was resulting in an easy-to-miss error when running configure. Fix issue with dangling test file not getting cleaned up. Turn nczarr zip support off by default in cmake, add a status line indicating whether nczarr-zip-support is available, in libnetcdf.settings. Update the version of the cache action used by github action from v2 to v3. Explicit cast to unsigned char. More issues returned by sanitizer, related to attempts to assign MAX_UNSIGNED_CHAR (255) to a variable of type char. Fixed an issue where memcpy was potentially passed a null pointer. Correct another uninitialized issue. Correct undefined variable error. Fixing issues uncovered by compiling with '-fsanitize=undefined' and running nc_test/nc_test, in support of Unidata#1983, amongst others. The cast as was being used was undefined behavior, and had to be worked around in a style approximating C++'s 'reinterpret_cast' Remove a stray character at the head file. Fix a distcheck failure with nczarr_test/run_interop.sh Turn benchmarks off by default. They require netcdf4, additional logic is required in order to have them on by default. Add execute bit to test scripts Fix missing endif statement Add generated parallel tests for nc_perf, cmake-based build system. Correct typo in CMakeLists.txt Wiring performance benchmarks into cmake, cleaned up serial compression performance test dependency on MPI. ...
Dennis Heimbigner (9): Modify H5FDhttp.c to work with HDF5 1.14.0 update release notes Enable ACCEPT_ENCODING on DAP requests Update Release notes Fix a distcheck failure with nczarr_test/run_interop.sh Extend the dispatch table for H5FD back to version 1.13.2 update RELEASENOTES Missed one occurrence of 1,14,0 Fix byterange handling of some URLS Greg Sjaardema (1): Missing `goto` Magnus Ulimoen (1): Fix setting dest for non-m4 path Mathieu Westphal (1): Avoid optionnaly depends on zip for NCZarr Sergey Kosukhin (1): Fix macro usage Ward Fisher (35): Update release notes, prepare to merge back upstream into development branch. Escape command symbol in doxygen template. Incorporate fix in support of Unidata/netcdf-c#2437 (comment) Update nc-config in support of Unidata/netcdf-c#2274 Added benchmarking option to cmake-based builds, turned on unit-testing by default Wiring performance benchmarks into cmake, cleaned up serial compression performance test dependency on MPI. Correct typo in CMakeLists.txt Add generated parallel tests for nc_perf, cmake-based build system. Fix missing endif statement Add execute bit to test scripts Turn benchmarks off by default. They require netcdf4, additional logic is required in order to have them on by default. Remove a stray character at the head file. Fixing issues uncovered by compiling with '-fsanitize=undefined' and running nc_test/nc_test, in support of Unidata/netcdf-c#1983, amongst others. The cast as was being used was undefined behavior, and had to be worked around in a style approximating C++'s 'reinterpret_cast' Correct undefined variable error. Correct another uninitialized issue. Fixed an issue where memcpy was potentially passed a null pointer. More issues returned by sanitizer, related to attempts to assign MAX_UNSIGNED_CHAR (255) to a variable of type char. Explicit cast to unsigned char. Update the version of the cache action used by github action from v2 to v3. Turn nczarr zip support off by default in cmake, add a status line indicating whether nczarr-zip-support is available, in libnetcdf.settings. Fix issue with dangling test file not getting cleaned up. Fix a logic error that was resulting in an easy-to-miss error when running configure. Correct a potential null pointer dereference. Invert solution as discussed at Unidata/netcdf-c#2618 Bumped SO version. Update release notes. Bump version strings to reflect next development version. Correct jsonconvention map with netcdf version. Add hdf5 1.14.0 to GitHub CI. Expand CI testing with HDF5 1.14.0 Set version strings. Adjust reference nczarr file for v4.9.2 release. Update .gitignore to allow generated files into version control for 4.9.2 release. Added generated files for release. Added generated test files for a stand-alone release.
A failure in
nc_test/nc_test
was initially reported on theppc64le
platform as part of the tests forconda-forge/libnetcdf-feedstock
release of 4.8.0. Subsequent testing has revealed an issue with some, but not all, compilers. More details to follow, opening an issue to capture this.Update 1
Issue has been observed on M1 hardware, both in OSX, and emulated ppc64le (via
qemu
). Issue does not manifest on M1 hardware in virtualized ubuntu, or on intel-based OSX. I'll update with compiler versions (which is a big piece of the puzzle).The text was updated successfully, but these errors were encountered: