samskalicky commented on issue #13438: libc getenv is not threadsafe URL: https://github.com/apache/incubator-mxnet/issues/13438#issuecomment-448008599 @Vikas89 and @anirudh2290 have discussed a couple of options for implementing a permanent solution: 1. Moving all get/setenv calls to the beginning of mxnet initialization, before any openmp or any other dependent library is initialized. This would clearly prevent the problem by moving the getenv to before openmp runs. But then this may cause a breaking change with how developers are using mxnet to change its behavior using environment variables at runtime. If we only sample env vars at init time this will no longer work. 2. We could write our own thread-safe getenv/setenv functions and implement them across mxnet and openmp (since we're compiling it from source when we build mxnet). This would eliminate the problem, but would be harder to maintain as we would have to constantly patch openmp 3. We could create APIs to enable the behavior that users currently have when setting env vars, and with the change described in #1 have the same functionality albeit with a different use-model. None of these seem like the best options, any other comments or thoughts?
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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
