Skip to content

Conversation

@nim65s
Copy link
Contributor

@nim65s nim65s commented May 4, 2025

Hello,

As found in NixOS/nixpkgs#403603 (comment), 57 tests out of 120 segfault on macos intel with nix.

This PR update the nix CI to test arm+intel / mac+ubuntu, to show it is still the case on master.
It probably should no be merged before those segfaults are sorted out :)

Or maybe this is already known, and mac intel platforms are considered out of scope / obsolete ?

@codecov
Copy link

codecov bot commented May 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 54.63%. Comparing base (ede09bb) to head (e5587eb).
Report is 260 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1658      +/-   ##
==========================================
+ Coverage   54.50%   54.63%   +0.13%     
==========================================
  Files         443      447       +4     
  Lines       53782    54331     +549     
==========================================
+ Hits        29313    29685     +372     
- Misses      24469    24646     +177     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fspindle
Copy link
Contributor

fspindle commented May 6, 2025

@nim65s

Or maybe this is already known, and mac intel platforms are considered out of scope / obsolete ?

I was not aware of these issues, and mac intel platforms remain supported.

Could you tell me how to reproduce this error on a local intel mac?

@fspindle
Copy link
Contributor

fspindle commented May 6, 2025

@nim65s On a mac intel I was not able to reproduce the segfault with a config that seems to me very close to the one used in nix ci.

The only diff I see is the clang compiler version.
I'm using clang 15.0 while the ci that brings the segfault is using clang++ 19.1.7

$ /usr/bin/c++ --version
Apple clang version 15.0.0 (clang-1500.0.40.1)

This is my ViSP-third-party.txt file content.

$ cat ViSP-third-party.txt 

==========================================================
General configuration information for ViSP 3.6.1

  Version control:               v3.6.0-2798-g54f504a3b

  Platform:
    Timestamp:                   2025-05-06T13:24:49Z
    Host:                        Darwin 23.4.0 x86_64
    CMake:                       4.0.1
    CMake generator:             Unix Makefiles
    CMake build tool:            /usr/bin/make
    Configuration:               Release

  System information:
    Number of CPU logical cores: 12
    Number of CPU physical cores: 6
    Total physical memory (in MiB): 32768
    OS name:                     macOS
    OS release:                  14.4.1
    OS version:                  23E224
    OS platform:                 x86_64
    CPU name:                    Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    CPU description:             6 core Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Is the CPU 64-bit?           yes
    Does the CPU have FPU?       no
    CPU optimization:            SSE2 SSE3 SSSE3 SSE4_1
    CPU endianness:              little-endian

  C/C++:
    Built as dynamic libs?:      yes
    C++ Compiler:                /usr/bin/c++  (ver 15.0.0.15000040)
    C++ flags (Release):         -Wall -Wextra -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -O3 -DNDEBUG
    C++ flags (Debug):           -Wall -Wextra -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -g
    C Compiler:                  /usr/bin/cc
    C flags (Release):           -Wall -Wextra -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -O3 -DNDEBUG
    C flags (Debug):             -Wall -Wextra -std=c++17 -fvisibility=hidden -msse2 -msse3 -mssse3 -fPIC -g
    Linker flags (Release):
    Linker flags (Debug):
    Use cxx standard:            17

  ViSP modules:
    To be built:                 core dnn_tracker gui imgproc io java_bindings_generator klt me sensor ar blob robot visual_features vs vision detection mbt tt tt_mi
    Disabled:                    -
    Disabled by dependency:      -
    Unavailable:                 java
    Enable visp namespace:       no
    Enable explicit keyword:     no

  Python 3:
    Interpreter:                 /usr/local/bin/python3.13 (ver 3.13.3)

  Java:                          
    ant:                         no
    Java:                        no
    JNI:                         no
    Java wrappers:               no

  Python3 bindings:              no
    Requirements: 
      Python version > 3.7.0:    ok (ver 3.13.3)
      Python in Virtual environment or conda:
                                 failed
      Pybind11 found:            failed
      CMake > 3.19.0:            ok (4.0.1)
      C++ standard > 201703L:    ok (201703L)

  Build options: 
    Build deprecated:            yes
    Build with moment combine:   no

  OpenCV: 
    Version:                     4.11.0
    Modules:                     calib3d core dnn features2d flann gapi highgui imgcodecs imgproc ml objdetect photo stitching video videoio alphamat aruco bgsegm bioinspired ccalib datasets dnn_objdetect dnn_superres dpm face freetype fuzzy hfs img_hash intensity_transform line_descriptor mcc optflow phase_unwrapping plot quality rapid reg rgbd saliency sfm shape signal stereo structured_light superres surface_matching text tracking videostab viz wechat_qrcode xfeatures2d ximgproc xobjdetect xphoto
    OpenCV dir:                  /usr/local/lib/cmake/opencv4

  YARP: 
    Version:                     n/a

  Mathematics: 
    Blas/Lapack:                 yes
    \- Use MKL:                  no
    \- Use OpenBLAS:             yes (ver 0.3.29)
    \- Use Atlas:                no
    \- Use Netlib:               no
    \- Use GSL:                  no
    \- Use Lapack (built-in):    no
    Use Eigen3:                  yes (ver 3.4.0)
    Use OpenCV:                  yes (ver 4.11.0)

  Simulator: 
    Ogre simulator: 
    \- Use Ogre3D:               no
    \- Use OIS:                  no
    Coin simulator: 
    \- Use Coin3D:               no
    \- Use SoWin:                no
    \- Use SoXt:                 no
    \- Use SoQt:                 no
    \- Use Qt5:                  no
    \- Use Qt4:                  no
    \- Use Qt3:                  no
    Panda3D:                     no

  Media I/O: 
    Use JPEG:                    yes (ver 80)
    Use PNG:                     yes (ver 1.6.38.git)
    \- Use ZLIB:                 yes (ver 1.2.12)
    Use OpenCV:                  yes (ver 4.11.0)
    Use stb_image (built-in):    yes (ver 2.30.0)
    Use TinyEXR (built-in):      yes (ver 1.0.9)
    Use simdlib (built-in):      yes (ver 4.9.109)
    Use npz I/O (built-in):      yes

  Real robots: 
    Use Afma4:                   no
    Use Afma6:                   no
    Use Franka:                  no
    Use Viper650:                no
    Use Viper850:                no
    Use ur_rtde:                 no
    Use Kinova Jaco:             no
    Use aria (Pioneer):          no
    Use PTU46:                   no
    Use Biclops PTU:             no
    Use Flir PTU SDK:            no
    Use MAVSDK:                  no
    Use Parrot ARSDK:            no
    \- Use ffmpeg:               no
    Use Virtuose:                no
    Use qbdevice (built-in):     yes (ver 2.6.0)
    Use takktile2 (built-in):    yes (ver 1.0.0)
    Use pololu (built-in):       yes (ver 1.0.0)

  GUI: 
    Use X11:                     yes
    Use GTK2:                    no
    Use OpenCV:                  yes (ver 4.11.0)
    Use GDI:                     no
    Use Direct3D:                no

  Cameras: 
    Use DC1394-2.x:              yes (ver 2.2.7)
    Use CMU 1394:                no
    Use V4L2:                    no
    Use directshow:              no
    Use OpenCV:                  yes (ver 4.11.0)
    Use FLIR Flycapture:         no
    Use Basler Pylon:            no
    Use IDS uEye:                no

  RGB-D sensors: 
    Use Realsense:               no
    Use Realsense2:              no
    Use Occipital Structure:     no
    Use Kinect:                  no
    \- Use libfreenect:          no
    \- Use libusb-1:             no
    \- Use std::thread:          yes
    Use PCL:                     no
    \- Use VTK:                  no

  F/T sensors: 
    Use atidaq (built-in):       no
    Use comedi:                  no
    Use IIT SDK:                 no

  Mocap: 
    Use Qualisys:                yes
    Use Vicon:                   no

  Detection: 
    Use zbar:                    no
    Use dmtx:                    no
    Use AprilTag (built-in):     yes (ver 3.4.2)
    \- Use AprilTag big family:  no

  Misc: 
    Use Clipper (built-in):      yes (ver 6.4.2)
    Use pugixml (built-in):      yes (ver 1.14.0)
    Use libxml2:                 yes (ver 2.9.13)
    Use json (nlohmann system):  yes (ver 3.12.0)

  Optimization: 
    Use OpenMP:                  no
    Use std::thread:             yes
    Use pthread:                 yes
    Use simdlib (built-in):      yes (ver 4.9.109)

  DNN: 
    Use CUDA Toolkit:            no
    Use TensorRT:                no

  Documentation: 
    Use doxygen:                 yes (ver 1.13.1)
    \- Use mathjax:              no

  Tests and samples:
    Use catch2 (built-in):       yes (ver 3.7.1)
    Tests:                       yes
    Apps:                        yes
    Demos:                       yes
    Examples:                    yes
    Tutorials:                   yes
    Dataset found:               yes (ver 3.5.0 in /Users/fspindle/soft/visp/visp-images)

  Library dirs:
    Eigen3 dir:                  /usr/local/share/eigen3/cmake
    OpenBLAS include dir:        /usr/local/opt/openblas/include
    OpenCV dir:                  /usr/local/lib/cmake/opencv4

  Install path:                  /usr/local

==========================================================

@nim65s
Copy link
Contributor Author

nim65s commented May 9, 2025

Ok, thanks for the test.
Let's try nix with clang 15 :)

@nim65s
Copy link
Contributor Author

nim65s commented May 9, 2025

NB: visp is build with clang 15 here, but not its dependencies

@nim65s
Copy link
Contributor Author

nim65s commented May 9, 2025

Also, to reproduce locally, I can't double check on a macos right now, but

@nim65s
Copy link
Contributor Author

nim65s commented May 9, 2025

The CI show the same issue with

visp> --   C/C++:
visp> --     Built as dynamic libs?:      yes
visp> --     C++ Compiler:                /nix/store/q7yahgxdah0aawgy6ydvpsaqmxykminy-clang-wrapper-15.0.7/bin/clang++  (ver 15.0.7)

Therefore, I guess this is an issue in a dependency as packaged by nix, and not in visp, so this PR can probably be closed.

Thanks for the feedback !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants