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-16916 container: check inflight open #15682

Merged
merged 7 commits into from
Jan 16, 2025
Merged

Conversation

wangdi1
Copy link
Contributor

@wangdi1 wangdi1 commented Jan 3, 2025

Check inflight container open, which might be stucked in IV fetch, then the following cont open will just increase the open count, then if the previous container open failed, it will get the assertion failure.

So let's retry if there are inflight container open.

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.

Check inflight container open, which might be stucked in
IV fetch, then the following cont open will just increase
the open count, then if the previous container open failed,
it will get the assertion failure.

So let's retry if there are inflight container open.

Signed-off-by: Di Wang <[email protected]>
@wangdi1 wangdi1 requested review from a team as code owners January 3, 2025 18:03
@wangdi1 wangdi1 requested review from wangshilong and Nasf-Fan and removed request for a team January 3, 2025 18:03
Copy link

github-actions bot commented Jan 3, 2025

Ticket title is 'ds_cont_local_open() Assertion 'hdl->sch_cont->sc_open == 1' failed: Unexpected open count for cont c6822a9a: 307'
Status is 'Open'
https://daosio.atlassian.net/browse/DAOS-16916

@wangdi1 wangdi1 requested review from jolivier23 and liw January 3, 2025 18:04
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15682/1/execution/node/1468/log

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-15682/2/execution/node/468/log

fix wording

Signed-off-by: Di Wang <[email protected]>
further update

Signed-off-by: Di Wang <[email protected]>
@wangdi1 wangdi1 requested a review from liuxuezhao January 10, 2025 02:56
fix spelling

Signed-off-by: Di Wang <[email protected]>
sc_dtx_delay_reset : 1, sc_dtx_registered : 1, sc_props_fetched : 1, sc_stopping : 1,
sc_destroying : 1, sc_vos_agg_active : 1, sc_ec_agg_active : 1,
/* flag of CONT_CAPA_READ_DATA/_WRITE_DATA disabled */
sc_rw_disabled : 1, sc_scrubbing : 1, sc_rebuilding : 1, sc_open_initializing : 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the recommended coding style?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is actually only suppose to change 1 line, not sure why it messed up like this, which might due to git-hook sth.

Copy link
Contributor

Choose a reason for hiding this comment

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

This might be messed up by clang-format hooks.

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah, clang-format does this. I believe if you use ; instead of comma, you still use same space and don't have the formatting issue

Copy link
Contributor

Choose a reason for hiding this comment

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

verified (though we do this in other places in DAOS)

#include <stdint.h>
#include <stdio.h>

struct foo {
	uint64_t foo;
	uint32_t bar:1;
	uint32_t fub:1;
	uint32_t other;
};

int main(int argc, char ** argv)
{
	printf("%zu\n", sizeof(struct foo));
}

This prints 16 which means bar and fub are placed together.

Copy link
Contributor

Choose a reason for hiding this comment

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

in fact, you can make this change without any formatting and clang-format will fix it and make it look nice

if (rc != 0)
if (rc != 0) {
if (rc == -DER_AGAIN)
goto retry;
Copy link
Contributor

Choose a reason for hiding this comment

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

Busy retry? It may be better to wait for former inflight opening to return and then check again.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a collective operation. which will yield, but I assume wait a few ms might be ok.

wait 50ms before retry.

Signed-off-by: Di Wang <[email protected]>
@wangdi1 wangdi1 requested review from Nasf-Fan and jxiong January 15, 2025 06:00
wangshilong
wangshilong previously approved these changes Jan 15, 2025
Nasf-Fan
Nasf-Fan previously approved these changes Jan 15, 2025
@wangdi1 wangdi1 requested a review from a team January 16, 2025 17:37
@@ -1,5 +1,5 @@
/*
* (C) Copyright 2015-2024 Intel Corporation.
* (C) Copyright 2015-2025 Intel Corporation.
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be Google and no update to Intel

@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2024 Intel Corporation.
* (C) Copyright 2016-2025 Intel Corporation.
Copy link
Contributor

Choose a reason for hiding this comment

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

Google but no update to Intel

sc_dtx_delay_reset : 1, sc_dtx_registered : 1, sc_props_fetched : 1, sc_stopping : 1,
sc_destroying : 1, sc_vos_agg_active : 1, sc_ec_agg_active : 1,
/* flag of CONT_CAPA_READ_DATA/_WRITE_DATA disabled */
sc_rw_disabled : 1, sc_scrubbing : 1, sc_rebuilding : 1, sc_open_initializing : 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

verified (though we do this in other places in DAOS)

#include <stdint.h>
#include <stdio.h>

struct foo {
	uint64_t foo;
	uint32_t bar:1;
	uint32_t fub:1;
	uint32_t other;
};

int main(int argc, char ** argv)
{
	printf("%zu\n", sizeof(struct foo));
}

This prints 16 which means bar and fub are placed together.

sc_dtx_delay_reset : 1, sc_dtx_registered : 1, sc_props_fetched : 1, sc_stopping : 1,
sc_destroying : 1, sc_vos_agg_active : 1, sc_ec_agg_active : 1,
/* flag of CONT_CAPA_READ_DATA/_WRITE_DATA disabled */
sc_rw_disabled : 1, sc_scrubbing : 1, sc_rebuilding : 1, sc_open_initializing : 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

in fact, you can make this change without any formatting and clang-format will fix it and make it look nice

Signed-off-by: Jeff Olivier <[email protected]>
@jolivier23 jolivier23 dismissed stale reviews from Nasf-Fan and wangshilong via d581ddf January 16, 2025 22:09
Signed-off-by: Jeff Olivier <[email protected]>
@jolivier23 jolivier23 merged commit 15842c6 into master Jan 16, 2025
27 of 29 checks passed
@jolivier23 jolivier23 deleted the wangdi/daos_16916 branch January 16, 2025 22:10
Copy link
Contributor

@NiuYawei NiuYawei left a comment

Choose a reason for hiding this comment

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

Unfortunately this PR has been landed, but looks there is a defect in the PR.

@@ -1663,6 +1678,7 @@ ds_cont_local_open(uuid_t pool_uuid, uuid_t cont_hdl_uuid, uuid_t cont_uuid,
dtx_cont_close(hdl->sch_cont, true);

err_cont:
hdl->sch_cont->sc_open_initializing = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This "sc_open_initializing" flag will be cleared when second open return -DER_AGAIN? Why don't we simply use a ABT_Mutex to serialize above open procedures?

jolivier23 pushed a commit that referenced this pull request Jan 17, 2025
Check inflight container open, which might be stucked in
IV fetch, then the following cont open will just increase
the open count, then if the previous container open failed,
it will get the assertion failure.

So let's retry if there are inflight container open.

Signed-off-by: Di Wang <[email protected]>
jolivier23 added a commit that referenced this pull request Jan 17, 2025
Check inflight container open, which might be stucked in
IV fetch, then the following cont open will just increase
the open count, then if the previous container open failed,
it will get the assertion failure.

So let's retry if there are inflight container open.

Signed-off-by: Di Wang <[email protected]>
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.

7 participants