Repository navigation
Conversation
The client debug helper pool_print_range_list() formatted a pool's enabled/disabled rank ranges into a fixed 512-byte stack buffer and, when that was too small, logged "snprintf failed" at ERR level. Pools with many non-contiguous ranks (e.g., 204 rank ranges on a 1600-rank system) hit this on every daos_pool_query() that returns ranks, including "daos pool query -e" and the periodic space queries issued by "daos pool autotest", so the error was printed to the terminal even though the query itself succeeded and returned correct results. Replace it with dc_pool_log_ranks(), which: - returns immediately unless DB_MD debug logging is enabled, - builds the string with d_rank_list_to_str() (dynamically sized), and - logs it in pieces of at most 512 bytes split after a ',', since d_vlog() silently truncates a log line at 1024 bytes. The rank list is still logged for every query, including those whose caller did not ask for ranks. The returned rank list is still sorted unconditionally; that was previously a side effect of building the debug log string. Avoid calling qsort() with a NULL array for an empty rank list (e.g., the disabled ranks of a healthy pool), which is undefined behavior reported by UBSan: d_rank_range_list_create_from_ranks() now sorts only after its empty-list check, and the client skips sorting an empty list. Add pool_cli_tests, a cmocka unit test for dc_pool_log_ranks() covering debug logging disabled, the 204-range rank list from the original report, small and empty lists, chunk-size boundaries, and a 50000-range list. Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com>
in process_query_reply() Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com>
|
Ticket title is 'Aurora daos_user: daos pool query with large number of enabled rank option print extra error line "pool_print_range_list() 33af052a: snprintf failed, 4"' |
Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com>
|
Test stage Unit Test with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/3/display/redirect |
|
Test stage Unit Test on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/3/display/redirect |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/3/testReport/ |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/3/display/redirect |
|
Test stage Unit Test bdev on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/3/display/redirect |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/4/display/redirect |
|
Test stage Unit Test on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/4/display/redirect |
|
Test stage Unit Test bdev on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/4/display/redirect |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/4/display/redirect |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/4/testReport/ |
Signed-off-by: Kenneth Cain <kenneth.cain@hpe.com>
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/5/testReport/ |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/5/display/redirect |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/5/display/redirect |
|
Test stage Unit Test on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/5/display/redirect |
|
Test stage Unit Test bdev on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/5/display/redirect |
|
Test stage Unit Test on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/6/display/redirect |
|
Test stage Unit Test bdev on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/6/display/redirect |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/6/display/redirect |
|
Test stage Unit Test with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-19457/6/display/redirect |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/6/testReport/ |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/7/testReport/ |
|
Test stage Functional on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19457/7/execution/node/1464/log |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-19457/8/testReport/ |
The client debug helper pool_print_range_list() formatted a pool's
enabled/disabled rank ranges into a fixed 512-byte stack buffer and,
when that was too small, logged "snprintf failed" at ERR level. Pools
with many non-contiguous ranks (e.g., 204 rank ranges on a 1600-rank
system) hit this on every daos_pool_query() that returns ranks,
including "daos pool query -e" and the periodic space queries issued
by "daos pool autotest", so the error was printed to the terminal even
though the query itself succeeded and returned correct results.
Replace it with dc_pool_log_ranks(), which:
d_vlog() silently truncates a log line at 1024 bytes.
The rank list is still logged for every query, including those whose
caller did not ask for ranks. The returned rank list is still sorted
unconditionally; that was previously a side effect of building the
debug log string.
Avoid calling qsort() with a NULL array for an empty rank list (e.g.,
the disabled ranks of a healthy pool), which is undefined behavior
reported by UBSan: d_rank_range_list_create_from_ranks() now sorts
only after its empty-list check, and the client skips sorting an
empty list.
Add pool_cli_tests, a cmocka unit test for dc_pool_log_ranks()
covering debug logging disabled, the 204-range rank list from the
original report, small and empty lists, chunk-size boundaries, and a
50000-range list.
Steps for the author:
After all prior steps are complete: