reductionista opened a new pull request #405: Fix tensorflow crashes URL: https://github.com/apache/madlib/pull/405 This adds `std::*` to the list of symbols defined in madlib that should be hidden from external libraries by the linker. This fixes several intermittent crashes that were happening in the `deep_learning` module in different forms on different platforms, due to tensorflow calling madlib's instantiation of STL template functions, which circumvents the hiding of madlib's global new and delete symbols (intended to override the `libstdc++` version of these symbols for all of `libmadlib.so`, but not for anything outside of it). The main crash we looked at was due to the use of `std::set<string>` in `madlib/src/modules/linalg/metric.cpp`. Tensorflow is a python library, but it loads Google's C++ protobuf library `_message.so`. The crash was happening because `_message.so` also uses `std::set<string>` for some things, and it ends up calling madlib's instationation of them. We were able to fix it by hiding all madlib symbols associated with the `std::set<string` class, but this just resulted in a similar crash happening instead because of a different STL symbol exposed by madlib. In the long term, we should move to hiding all symbols by default and explicitly make exceptions for madlib API functions. But this would be a bigger change and require more extensive testing to make sure it doesn't cause any obscure issues on any platform. So for now we are just hiding those in namespace std.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
