Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #1912
From v0.35.0, there appears to be an issue with build toolchain changes, resulting in the problem described in #1912 (pure virtual method called exception). After investigation, I believe I've identified the root cause.
While using S3 filesystem, I captured the program's backtrace (shown below in the toggle).
Click to toggle
Upon inspection of
CurlHandleContainer.cpp:27
, I found that it uses a logging macro defined here. This macro depends on static_variables which could lead to unsafe behavior during program termination. Since the pure virtual method called exception occurs during program exit, it's likely caused by the destruction order of static variables (logging-related static variables being destroyed before the destructor is called).As a temporary fix, I've removed the logging macros in CurlHandleContainer's destructor using bazel's patch_cmds. While this resolves the immediate issue, it may not be the optimal long-term solution. I'd appreciate review of this approach, considering our dependency on tensorflow==2.16 and S3 filesystem functionality.
Regarding the build.Dockerfile modification: I noticed that the tensorflow version should align with what's specified in tensorflow_io/python/ops/version_ops.py. The original script was installing the latest tensorflow version, so I've modified it to install the specific version defined in the version_ops.py file.