Skip to content

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

Open
@seanm

Description

@seanm

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:BugInconsistencies or issues which will cause an incorrect result under some or all circumstances

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions