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

DAOS-16722 client: to intercept PMPI_Init() in libpil4dfs #15336

Merged
merged 4 commits into from
Oct 28, 2024

Conversation

wiliamhuang
Copy link
Contributor

Intercept PMPI_Init() to avoid calling daos_init() if MPI_Init() is intercepted by other library (like darshan and mpip).

Features: pil4dfs

Required-githooks: true
Skipped-githooks: codespell

Before requesting gatekeeper:

  • Two review approvals and any prior change requests have been resolved.
  • Testing is complete and all tests passed or there is a reason documented in the PR why it should be force landed and forced-landing tag is set.
  • Features: (or Test-tag*) commit pragma was used or there is a reason documented that there are no appropriate tags for this PR.
  • Commit messages follows the guidelines outlined here.
  • Any tests skipped by the ticket being addressed have been run and passed in the PR.

Gatekeeper:

  • You are the appropriate gatekeeper to be landing the patch.
  • The PR has 2 reviews by people familiar with the code, including appropriate owners.
  • Githooks were used. If not, request that user install them and check copyright dates.
  • Checkpatch issues are resolved. Pay particular attention to ones that will show up on future PRs.
  • All builds have passed. Check non-required builds for any new compiler warnings.
  • Sufficient testing is done. Check feature pragmas and test tags and that tests skipped for the ticket are run and now pass with the changes.
  • If applicable, the PR has addressed any potential version compatibility issues.
  • Check the target branch. If it is master branch, should the PR go to a feature branch? If it is a release branch, does it have merge approval in the JIRA ticket.
  • Extra checks if forced landing is requested
    • Review comments are sufficiently resolved, particularly by prior reviewers that requested changes.
    • No new NLT or valgrind warnings. Check the classic view.
    • Quick-build or Quick-functional is not used.
  • Fix the commit message upon landing. Check the standard here. Edit it to create a single commit. If necessary, ask submitter for a new summary.

Features: pil4dfs

Required-githooks: true
Skipped-githooks: codespell

Signed-off-by: Lei Huang <lei.huang@intel.com>
Copy link

github-actions bot commented Oct 17, 2024

Ticket title is 'Hang in zeInit in pil4dfs interception library when preloading darshan'
Status is 'In Review'
Labels: 'ALCF,triaged,request_for_2.6.2'
https://daosio.atlassian.net/browse/DAOS-16722

Features: pil4dfs

Required-githooks: true
Skipped-githooks: codespell

Signed-off-by: Lei Huang <lei.huang@intel.com>
Features: pil4dfs

Signed-off-by: Lei Huang <lei.huang@intel.com>
Features: pil4dfs

Required-githooks: true
Skipped-githooks: codespell

Signed-off-by: Lei Huang <lei.huang@intel.com>
@wiliamhuang wiliamhuang marked this pull request as ready for review October 24, 2024 21:17
@wiliamhuang wiliamhuang requested review from a team as code owners October 24, 2024 21:17
@wiliamhuang wiliamhuang requested a review from knard38 October 24, 2024 21:22
@wiliamhuang
Copy link
Contributor Author

All CI tests finished without issues.

int rc;

if (next_pmpi_init == NULL) {
next_pmpi_init = dlsym(RTLD_NEXT, "PMPI_Init");
Copy link
Contributor

@knard38 knard38 Oct 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my understanding, we are expecting to get the reference on the original PMPI_Init function.
However, I do understand how we are sure of which function reference we will get, if there is several LD_PRELOAD on this last one. For example, if Darshan is redefining it, could it be possible that we get the reference on the darshan one.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue of deadlock is caused by calling daos_init() inside MPI runtime library's MPI_Init()/PMPI_Init(). We could avoid this issue as long as the PMPI_Init() from libpil4dfs is executed before the PMPI_Init() implemented in MPI runtime library. It does not not matter the PMPI_Init() from libpil4dfs or the PMPI_Init() from darshan is executed first.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, thanks for the explanation.

@wiliamhuang wiliamhuang requested a review from knard38 October 25, 2024 14:40
@wiliamhuang wiliamhuang requested a review from a team October 25, 2024 15:23
@mchaarawi
Copy link
Contributor

mchaarawi commented Oct 25, 2024

let's hold off merging for now until i test on aurora since this is not extremelly time critical anymore.
i have access to darshan there so should be quick once i get an ECB.

@mchaarawi mchaarawi removed the request for review from a team October 25, 2024 21:33
@wiliamhuang
Copy link
Contributor Author

let's hold off merging for now until i test on aurora since this is not extremelly time critical anymore. i have access to darshan there so should be quick once i get an ECB.

Thank you very much!

@mchaarawi mchaarawi merged commit bf12b3f into master Oct 28, 2024
53 of 54 checks passed
@mchaarawi mchaarawi deleted the lei/DAOS-16722 branch October 28, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants