Skip to content
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

Calls to putenv() in EDModule constructors in various conditions tools are not thread safe #47038

Open
makortel opened this issue Jan 3, 2025 · 6 comments

Comments

@makortel
Copy link
Contributor

makortel commented Jan 3, 2025

Spinning off from #46002 (comment)

These calls to putenv() are not thread safe

::putenv((char *)"CORAL_AUTH_USER=me");
::putenv((char *)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=me");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=testuser");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv((char*)"CORAL_AUTH_USER=konec");
::putenv((char*)"CORAL_AUTH_PASSWORD=test");

::putenv(const_cast<char*>(std::string("CORAL_AUTH_USER=me").c_str()));
::putenv(const_cast<char*>(std::string("CORAL_AUTH_PASSWORD=test").c_str()));

::putenv(const_cast<char*>(std::string("CORAL_AUTH_USER konec").c_str()));
::putenv(const_cast<char*>(std::string("CORAL_AUTH_PASSWORD konecPass").c_str()));

::putenv((char *)"CORAL_AUTH_USER=me");
::putenv((char *)"CORAL_AUTH_PASSWORD=test");

because EDModules are constructed concurrently to the Source, and ROOT/cling/LLVM calls getenv() there.

@makortel
Copy link
Contributor Author

makortel commented Jan 3, 2025

assign CondTools/SiPixel

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2025

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2025

A new Issue was created by @makortel.

@Dr15Jones, @antoniovilela, @makortel, @mandrenguyen, @rappoccio, @sextonkennedy, @smuzaffar can you please review it and eventually sign/assign? Thanks.

cms-bot commands are listed here

@makortel makortel changed the title SiPixelGainCalibrationReadDQMFile constructor calling putenv() is not thread safe SiPixelGainCalibrationReadDQMFile and SiPixelCondObjOfflineBuilder constructors calling putenv() is not thread safe Jan 3, 2025
@makortel makortel changed the title SiPixelGainCalibrationReadDQMFile and SiPixelCondObjOfflineBuilder constructors calling putenv() is not thread safe Calls to putenv() in EDModule constructors in CondTools/SiPixel putenv() are not thread safe Jan 3, 2025
@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2025

New categories assigned: db

@atpathak,@consuegs,@francescobrivio,@perrotta you have been requested to review this Pull request/Issue and eventually sign? Thanks

@makortel makortel changed the title Calls to putenv() in EDModule constructors in CondTools/SiPixel putenv() are not thread safe Calls to putenv() in EDModule constructors in various conditions tools are not thread safe Jan 3, 2025
@makortel
Copy link
Contributor Author

makortel commented Jan 3, 2025

assign CondFormats/SiPixelObjects, CondFormats/RPCObjects, CalibTracker/SiPixelGainCalibration

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 3, 2025

New categories assigned: alca

@atpathak,@consuegs,@perrotta you have been requested to review this Pull request/Issue and eventually sign? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants