-
Notifications
You must be signed in to change notification settings - Fork 259
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
Fix bug where libcuda.so is not found in ldcache #755
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elezar
requested review from
klueska,
tariq1890,
ArangoGutierrez and
cdesiniotis
October 21, 2024 11:39
tariq1890
reviewed
Oct 21, 2024
elezar
force-pushed
the
fix-libcuda-so
branch
from
October 21, 2024 18:10
2d5f82d
to
ba05432
Compare
tariq1890
approved these changes
Oct 21, 2024
elezar
force-pushed
the
fix-libcuda-so
branch
2 times, most recently
from
October 24, 2024 10:15
068a888
to
bda19fb
Compare
elezar
force-pushed
the
fix-libcuda-so
branch
3 times, most recently
from
October 24, 2024 11:29
b9cff9c
to
6fe8e98
Compare
klueska
reviewed
Oct 24, 2024
klueska
reviewed
Oct 24, 2024
klueska
reviewed
Oct 24, 2024
Signed-off-by: Evan Lezar <elezar@nvidia.com>
Since we use a map to keep track of the elements of a symlink chain the construction of the final list of located elements is not stable. This change constructs the output as this is being discovered and as such maintains the original ordering. Signed-off-by: Evan Lezar <elezar@nvidia.com>
This change adds a test for locating libcuda as a driver library. This includes a failing test on a system where libcuda.so.1 is in the ldcache, but not at one of the predefined library search paths. A testdata folder with sample root filesystems is included to test various combinations. Signed-off-by: Evan Lezar <elezar@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar
force-pushed
the
fix-libcuda-so
branch
2 times, most recently
from
October 24, 2024 13:59
0bd1900
to
338b9d2
Compare
klueska
approved these changes
Oct 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't do a thorough code review of every line, but in general the new approach looks good and is in line with what we discussed.
This change udpates the ldcache locator to read the ldcache at construction and use these contents to perform future lookups against. Each of the cache entries are resolved and lookups return the resolved target. Assuming a symlink chain: libcuda.so -> libcuda.so.1 -> libcuda.so.VERSION, this means that libcuda.so.VERION will be returned for any of the following inputs: libcuda.so, libcuda.so.1, libcudal.so.*. Signed-off-by: Evan Lezar <elezar@nvidia.com>
elezar
force-pushed
the
fix-libcuda-so
branch
from
October 24, 2024 21:14
338b9d2
to
fa5a4ac
Compare
elezar
added
the
must-backport
The changes in PR need to be backported to at least one stable release branch.
label
Oct 24, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change fixes a bug where libcuda.so cannot be located even if it is present in the ldcache. This is relevant on systems where the library is not present in one of the "standard" paths.