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

(0.24.0) Replace deprecated gethostbyname() with getaddrinfo() to avoid crash #11484

Merged
merged 1 commit into from
Dec 15, 2020

Conversation

mpirvu
Copy link
Contributor

@mpirvu mpirvu commented Dec 15, 2020

gethostbyname() used in openConnection() (which is used in JITServer code) is
known to be non MT safe. We have observed rare crashes in the client JVM,
which are likely due to usage of gethostbyname() as explained in #11415
This commit replaces the usage of gethostbyname() with gettaddrinfo() which is
reentrant and therefore more amenable to multithreaded code.

Fixes: #11415

Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com

…us crash

gethostbyname() used in openConnection() (which is used in JITServer code) is
known to be non MT safe. We have observed rare crashes in the client JVM,
which are likely due to usage of gethostbyname() as explained in eclipse-openj9#11415
This commit replaces the usage of gethostbyname() with gettaddrinfo() which is
reentrant and therefore more amenable to multithreaded code.

Fixes: eclipse-openj9#11415

Signed-off-by: Marius Pirvu <mpirvu@ca.ibm.com>
@mpirvu
Copy link
Contributor Author

mpirvu commented Dec 15, 2020

This is a cherry-pick of PR #11448 into 0.24.0 release branch

@mpirvu
Copy link
Contributor Author

mpirvu commented Dec 15, 2020

@dsouzai Could you please review/merge this PR of mine into 0.24.0 release? Thanks

@dsouzai
Copy link
Contributor

dsouzai commented Dec 15, 2020

Straightforward cherrypick, merging.

@dsouzai dsouzai merged commit 5cbd27b into eclipse-openj9:v0.24.0-release Dec 15, 2020
@mpirvu mpirvu deleted the bbfix-0.24.0 branch December 15, 2020 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants