Date: 2025-04-05
Test Version: VxTests 1.3 (VCS version: 45722c3, Release config)
Total Test Cases: 69
Total Tests: 15,277
The CTS run encountered a segmentation fault during the Graph.GraphFactory test, preventing completion of the full 15,277 tests. Before the crash, 27 tests were executed with:
- 14 tests PASSED
- 12 tests FAILED
- 1 test CRASHED (segfault)
The failures reveal a critical memory management issue with reference counting throughout the OpenVX implementation.
| Test Case | Test Name |
|---|---|
| GraphBase | AllocateUserKernelId |
| GraphBase | AllocateUserKernelLibraryId |
| GraphBase | RegisterUserStructWithName |
| GraphBase | GetUserStructNameByEnum |
| GraphBase | GetUserStructEnumByName |
| GraphBase | vxQueryNodeBase |
| GraphBase | vxReleaseNodeBase |
| GraphBase | vxRemoveNodeBase |
| GraphBase | vxSetNodeAttributeBase |
| Logging | Cummulative |
| SmokeTestBase | vxLoadKernels |
| SmokeTestBase | vxUnloadKernels |
| SmokeTestBase | vxGetStatus |
| TargetBase | vxSetNodeTargetBase |
All failures share the same root cause: dangling references / incorrect reference counting.
| Test Case | Test Name | Failure Pattern |
|---|---|---|
| GraphBase | vxCreateGraph | 1 dangling ref |
| GraphBase | vxIsGraphVerifiedBase | 1 dangling ref |
| GraphBase | vxQueryGraph | 1 dangling ref |
| GraphBase | vxReleaseGraph | 1 dangling ref |
| GraphBase | vxReplicateNodeBase | 1 dangling ref |
| SmokeTestBase | vxReleaseReferenceBase | 2 dangling refs |
| SmokeTestBase | vxSetReferenceName | 1 dangling ref |
| SmokeTestBase | vxQueryReference | 1 dangling ref |
| SmokeTestBase | vxRetainReferenceBase | Reference count mismatch (43 vs 42) |
| TargetBase | vxCreateContext | Massive dangling refs (4294967254) |
| TargetBase | vxReleaseContext | Massive dangling refs (4294967254) |
| Graph | TwoNodes | 1 dangling ref |
| Test Case | Test Name | Issue |
|---|---|---|
| Graph | GraphFactory | Segmentation fault during test execution |
Error Pattern:
FAILED at /home/simon/.openclaw/workspace/rustvx/OpenVX-cts/test_engine/test_utils.c:733
Expected: 0 == dangling_refs_count
Actual: 0 != N
The test framework tracks all OpenVX objects created during a test and expects them to be properly released. The failures indicate that objects are not being properly released.
The TargetBase.vxCreateContext and TargetBase.vxReleaseContext tests show:
Actual: 0 != 4294967254
This value (4294967254 = 0xFFFFFF6E) strongly suggests an unsigned integer underflow in the reference counting logic. This happens when:
- A reference is released more times than it was retained
- The reference count decrements below zero
- In unsigned arithmetic, this wraps around to a very large number
SmokeTestBase.vxRetainReferenceBase shows:
Expected: num_refs4 == num_refs1
Actual: 43 != 42
This confirms the reference counting is inconsistent - the number of references increased unexpectedly.
Location: Likely in vxReleaseContext or the reference tracking system
Issue: The massive underflow value (4294967254) indicates context reference counting is broken.
Action:
- Audit all
vxRetainReferenceandvxReleaseReferencecalls in the context code - Add debug assertions to catch underflow before it happens
- Consider using signed integers for internal reference counts with bounds checking
Tests Affected: GraphBase.vxCreateGraph, GraphBase.vxReleaseGraph, Graph.TwoNodes
Issue: Graph objects are not being fully released.
Action:
- Review graph creation/destruction paths
- Ensure all internal graph resources (nodes, parameters) are properly freed
- Check for circular references between nodes and graphs
Test Affected: SmokeTestBase.vxSetReferenceName
Issue: Setting a reference name causes a leak.
Action:
- Check if the name string is properly freed when the reference is released
- Verify that updating a name frees the old name
Test Affected: SmokeTestBase.vxRetainReferenceBase
Issue: The retain operation itself may be creating extra references.
Action:
- Review the
vxRetainReferenceimplementation - Ensure it doesn't inadvertently create additional internal references
Test Affected: Graph.GraphFactory
Issue: Segmentation fault during graph factory test.
Action:
- Run with
gdbto get a backtrace:gdb --args ./bin/vx_test_conformance --filter=Graph.GraphFactory - Check for null pointer dereferences in the factory code
- Verify parameter validation in node creation
- Fix reference counting - This is blocking most tests
- Re-run CTS - After fixes, run full suite to completion
- Add memory debugging - Consider running with Valgrind:
valgrind --leak-check=full ./bin/vx_test_conformance - Unit test individual components - Test reference counting in isolation before full CTS
Based on --list_tests, the 15,277 tests are organized into 69 test cases covering:
- GraphBase (14 tests) - Graph creation, management, verification
- Logging (1 test) - Debug logging functionality
- SmokeTestBase (7 tests) - Basic API smoke tests
- TargetBase (3 tests) - Target/context management
- Graph (~100+ tests) - Graph execution, performance, kernels
- Vision functions (~15,000+ tests) - Individual vision kernel conformance
- Color conversion, filtering, geometric transforms
- Feature detection (Harris, FAST corners)
- Optical flow, image pyramids
- Arithmetic operations
- And many more...
Report generated from CTS run on /home/simon/.openclaw/workspace/rustvx/OpenVX-cts/build