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-16661 common: Integrate PMDK logging system w/ VOS logging system. #14923

Open
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

grom72
Copy link
Contributor

@grom72 grom72 commented Aug 13, 2024

pmemobj error and warning messages are written by default to stderr and syslog().
PMDK enables redirecting logging messages to user-specific functions.

All error and warning messages are reported using the DAOS logging function, to ensure a coherent events view for VOS and related pmemobj functions.

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.

Copy link

github-actions bot commented Aug 13, 2024

Ticket title is 'Integrate PMDK logging system w/ VOS logging system.'
Status is 'In Review'
Labels: 'scrubbed_2.8,test_2.8'
https://daosio.atlassian.net/browse/DAOS-16661

@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-14923/3/testReport/

@grom72 grom72 force-pushed the grom72/pmdk-w-logging branch 3 times, most recently from 75504b7 to ad62bd1 Compare September 3, 2024 07:38
To enable new message in log in NLT.
Allow-unstable-test: true

Priority: 2

Required-githooks: true

Co-authored-by: Jan Michalski <[email protected]>
Co-authored-by: Tomasz Gromadzki <[email protected]>

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 force-pushed the grom72/pmdk-w-logging branch from ad62bd1 to 149320c Compare September 3, 2024 10:59
@grom72 grom72 marked this pull request as ready for review September 3, 2024 11:01
@grom72 grom72 requested review from a team as code owners September 3, 2024 11:01
To enable new message in log in NLT.
Allow-unstable-test: true

Priority: 2

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 requested a review from brianjmurrell September 3, 2024 20:56
Priority: 2

Allow-unstable-test: true
Skip-func-hw-test: false

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 added the release-2.6.1 Targeted for release 2.6.1 label Sep 4, 2024
Skip-nlt: true
Priority: 2

Allow-unstable-test: true
Skip-func-hw-test: false

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Copy link
Contributor

@brianjmurrell brianjmurrell left a comment

Choose a reason for hiding this comment

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

@grom72 Packaging changes LGTM. Please re-request review from me once you have gotten your two +1s for the core code changes and I will +1 to remove my -1 review. I just don't want my +1 to be misunderstood to be for the core code changes also.

@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium UCX Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/11/execution/node/1683/log

jolivier23
jolivier23 previously approved these changes Sep 5, 2024
@grom72 grom72 added release-2.6.2 Targeted for release 2.6.2 and removed release-2.6.1 Targeted for release 2.6.1 labels Sep 6, 2024
@grom72 grom72 requested a review from NiuYawei September 16, 2024 14:12
NiuYawei
NiuYawei previously approved these changes Sep 18, 2024
@daosbuild1
Copy link
Collaborator

Test stage Functional Hardware Medium UCX Provider completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-14923/12/execution/node/635/log

Skip-nlt: true
Priority: 2
Allow-unstable-test: true

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 requested a review from a team February 18, 2025 20:57
@daltonbohning
Copy link
Contributor

Sorry but I don't follow the CI validation for this. It seems NLT was skipped? And fault injection was having issues? And is there a clean run with mostly passing tests?

Skip-build: true
Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Parallel-build: true
Skip-build-el8-rpm: true
Skip-build-el9-rpm: true
Skip-build-leap15-rpm: true
Skip-build-ubuntu20-rpm: true
Skip-build-el8-gcc-dev: true

Skip-build-el8-gcc-rpm: true
Skip-build-leap15-icc: true

Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Parallel-build: true
Skip-build-el8-rpm: true
Skip-build-el9-rpm: true
Skip-build-leap15-rpm: true
Skip-build-ubuntu20-rpm: true
Skip-build-el8-gcc-dev: true

Skip-build-el8-gcc: true
Skip-build-leap15-icc: true

Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Parallel-build: true
Skip-build-el8-rpm: true
Skip-build-el9-rpm: true
Skip-build-leap15-rpm: true
Skip-build-ubuntu20-rpm: true
Skip-build-el8-gcc-dev: true

Skip-build-leap15-icc: true

Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Parallel-build: true
Skip-build-el8-rpm: true
Skip-build-el9-rpm: true
Skip-build-leap15-rpm: true
Skip-build-ubuntu20-rpm: true
Skip-build-el8-gcc-dev: true

Skip-build-leap15-icc: true

Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72 grom72 dismissed stale reviews from NiuYawei and jolivier23 via f7390bd February 20, 2025 09:21
This reverts commit f7390bd.

Parallel-build: true
Skip-build-el8-rpm: true
Skip-build-el9-rpm: true
Skip-build-leap15-rpm: true
Skip-build-ubuntu20-rpm: true
Skip-build-el8-gcc-dev: true

Skip-build-leap15-icc: true

Skip-test: true
Skip-unit-test: true
Skip-unit-test-memcheck: true
Skip-bullseye: true
Signed-off-by: Tomasz Gromadzki <[email protected]>
@grom72
Copy link
Contributor Author

grom72 commented Feb 20, 2025

NLT results provided separately:
https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/53/VM_test/folder.232673814/type.-1566984413/
The reason is that we have few new expected warnings from PMDK
Previously these warnings are written into system log, now there are visible in VOS log.
Final validation has been done by https://build.hpdd.intel.com/job/daos-stack/job/daos/view/change-requests/job/PR-14923/46/testReport/
Fault injection related warnings are the same issue as NLT.
@daltonbohning please let me know that it is OK for you so I ask Jeff and Niu for one more approval.

@daltonbohning
Copy link
Contributor

NLT results provided separately: https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/53/VM_test/folder.232673814/type.-1566984413/ The reason is that we have few new expected warnings from PMDK Previously these warnings are written into system log, now there are visible in VOS log. Final validation has been done by https://build.hpdd.intel.com/job/daos-stack/job/daos/view/change-requests/job/PR-14923/46/testReport/ Fault injection related warnings are the same issue as NLT. @daltonbohning please let me know that it is OK for you so I ask Jeff and Niu for one more approval.

Now I'm more confused. What are all the latest NLT commits for? It's very difficult to cobble together CI runs from various commits to determine whether testing is sufficient

@daltonbohning
Copy link
Contributor

NLT results provided separately: https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/53/VM_test/folder.232673814/type.-1566984413/ The reason is that we have few new expected warnings from PMDK Previously these warnings are written into system log, now there are visible in VOS log. Final validation has been done by https://build.hpdd.intel.com/job/daos-stack/job/daos/view/change-requests/job/PR-14923/46/testReport/ Fault injection related warnings are the same issue as NLT. @daltonbohning please let me know that it is OK for you so I ask Jeff and Niu for one more approval.

Now I'm more confused. What are all the latest NLT commits for? It's very difficult to cobble together CI runs from various commits to determine whether testing is sufficient

Talking with @grom72 offline to understand the testing for this PR

@@ -1,5 +1,6 @@
/**
* (C) Copyright 2015-2023 Intel Corporation.
* (C) Copyright 2015-2024 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.

why are you editing the Intel copyright?

Copy link
Contributor

Choose a reason for hiding this comment

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

that one makes no sense (unless he was an Intel employee when starting this PR)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I was. This PR is almost half a year old.

@mchaarawi
Copy link
Contributor

NLT results provided separately: https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/53/VM_test/folder.232673814/type.-1566984413/ The reason is that we have few new expected warnings from PMDK Previously these warnings are written into system log, now there are visible in VOS log. Final validation has been done by https://build.hpdd.intel.com/job/daos-stack/job/daos/view/change-requests/job/PR-14923/46/testReport/ Fault injection related warnings are the same issue as NLT. @daltonbohning please let me know that it is OK for you so I ask Jeff and Niu for one more approval.

Now I'm more confused. What are all the latest NLT commits for? It's very difficult to cobble together CI runs from various commits to determine whether testing is sufficient

Talking with @grom72 offline to understand the testing for this PR

I don't quite follow either. I think we need a full run before and not stitch things together.
i understand that NLT can complain if there are new warnings and those need to be updated in the database, but id like to understand why we are introducing new warnings?
for fault injection, if there are warnings, it could mean that something is not freed properly, so we need to be careful. we might also break master for everyone.

jolivier23
jolivier23 previously approved these changes Feb 21, 2025
@jolivier23
Copy link
Contributor

jolivier23 commented Feb 21, 2025

NLT results provided separately: https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-14923/53/VM_test/folder.232673814/type.-1566984413/ The reason is that we have few new expected warnings from PMDK Previously these warnings are written into system log, now there are visible in VOS log. Final validation has been done by https://build.hpdd.intel.com/job/daos-stack/job/daos/view/change-requests/job/PR-14923/46/testReport/ Fault injection related warnings are the same issue as NLT. @daltonbohning please let me know that it is OK for you so I ask Jeff and Niu for one more approval.

Now I'm more confused. What are all the latest NLT commits for? It's very difficult to cobble together CI runs from various commits to determine whether testing is sufficient

Talking with @grom72 offline to understand the testing for this PR

I don't quite follow either. I think we need a full run before and not stitch things together. i understand that NLT can complain if there are new warnings and those need to be updated in the database, but id like to understand why we are introducing new warnings? for fault injection, if there are warnings, it could mean that something is not freed properly, so we need to be careful. we might also break master for everyone.

If there are new expected warnings, it's better to use Allow-unstable-test: true so everything runs

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Full test with modified pipeline lib

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
Remove leading "../" from file name used as a source code reference
in warning/error message.

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
@daosbuild1
Copy link
Collaborator

Test stage NLT on EL 8.8 completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-14923/55/testReport/

Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true

Skip-func-tests: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
grom72 added a commit to daos-stack/pipeline-lib that referenced this pull request Feb 28, 2025
Static analysis of NLT results does not work properly when
a warning source code is out of scope of the project.
An error is reported in such case and  the whole stage status
is changed to FAILURE.
```
[NLT results] [-ERROR-] Can't create fingerprints for some files:
[NLT results] [-ERROR-] - 'pmdk/.../src/common/set.c' file not found
...
[NLT results] Failing build because analysis result contains errors
```

To prevent this problem, all PMDK-related messages are filtered out.

NLT results Warnings section will include warnings but will not
provide any detail information about location of this warning
in the source code.

Based on existing format of nlt-errors.json file the most easy way
to filtered all PMDK messages is to use the predefined "pmdk/" preffix
in the fileName:
```
...
{
        "fileName": "pmdk/src/../src/common/set.c",
        "type": "warning in strict mode",
        "lineStart": 2796,
        "description": "warning in strict mode",
        "message": "util_replica_check() Possible silent data corruption. The unsafe shutdown detection (SDS) is not supported in the pool: /mnt/daos_0/e5737f5f-fa54-45d6-b081-9b2769921610/vos-1\nwarning in strict mode",
        "severity": "NORMAL"
},
...
```
vos logging system should ensure that the file name of each PMDK
related message starts with "pmdk/" prefix.
The implementation of the solution is provided in
daos-stack/daos#14923 PR

Signed-off-by: Tomasz Gromadzki <[email protected]>
Skip-list: test_ior_intercept_libpil4dfs:DAOS-16260
Allow-unstable-test: true

Signed-off-by: Tomasz Gromadzki <[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