Skip to content

Seem unable to detect memory size on FreeBSD; itkMemoryProbesCollecterBaseTest test fails #5250

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

Open
seanm opened this issue Feb 19, 2025 · 1 comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances

Comments

@seanm
Copy link
Contributor

seanm commented Feb 19, 2025

This test fails:

    Start 711: itkMemoryProbesCollecterBaseTest

711: Test command: /home/builder/external/ITK-bin/bin/ITKCommon2TestDriver "itkMemoryProbesCollecterBaseTest"
711: Working Directory: /home/builder/external/ITK-bin/Modules/Core/Common/test
711: Test timeout computed to be: 1500
711: System:              ganesha
711: Processor:
711:     Cache:           0
711:     Clock:           0
711:     Physical CPUs:   12
711:     Logical CPUs:    12
711:     Virtual Memory:  Total: 0               Available: 0
711:     Physical Memory: Total: 0               Available: 0
711: OSName:              FreeBSD
711:     Release:         14.2-RELEASE-p1
711:     Version:         FreeBSD 14.2-RELEASE-p1 GENERIC
711:     Platform:        amd64
711:     Operating System is 64 bit
711: ITK Version: 6.0.0
711: Name Of Probe (Memory)        Iterations     Total (kB)     Min (kB)       Mean (kB)      Max (kB)       StdDev (kB)
711: Update                        1              0              0              0              0              0
711:  Total Value 4368520
711: System:              ganesha
711: Processor:
711:     Cache:           0
711:     Clock:           0
711:     Physical CPUs:   12
711:     Logical CPUs:    12
711:     Virtual Memory:  Total: 0               Available: 0
711:     Physical Memory: Total: 0               Available: 0
711: OSName:              FreeBSD
711:     Release:         14.2-RELEASE-p1
711:     Version:         FreeBSD 14.2-RELEASE-p1 GENERIC
711:     Platform:        amd64
711:     Operating System is 64 bit
711: ITK Version: 6.0.0
711: Name Of Probe (Memory)        Iterations     Total (kB)     Min (kB)       Mean (kB)      Max (kB)       StdDev (kB)
711: Update                        1              4368520        4368520        4.36852e+06    4368520        0
711: Freeing memory should result in less memory but it is 4438980kB instead of 4368520kB
1/1 Test #711: itkMemoryProbesCollecterBaseTest ...***Failed    2.65 sec

0% tests passed, 1 tests failed out of 1

Notice all the zeros.

Also, I noticed that:

ITK_COMPUTER_MEMORY_SIZE 0

At first I guessed there was no FreeBSD-specific code for this, but there seems to be:

#elif defined(__FreeBSD__) || defined(__OpenBSD__)
  public SysResourceMemoryUsageObserver
#else

though it comes with comment:

 * However, SysResourceMemoryUsageObserver is far from being accurate. Other
 * way of getting the Memory Usage shall be used.
 * For FreeBSD, some alternatives would be to parse the output of
 * "sysctl vm.vmtotal" or "sysctl -a | grep -i memory"
@seanm seanm added the type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances label Feb 19, 2025
@seanm
Copy link
Contributor Author

seanm commented Feb 19, 2025

@yurivict since you probably know FreeBSD well, maybe you would know how to improve ITK here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Inconsistencies or issues which will cause an incorrect result under some or all circumstances
Projects
None yet
Development

No branches or pull requests

1 participant