liblsl icon indicating copy to clipboard operation
liblsl copied to clipboard

Segfault in MacOS with ASIO update

Open cboulay opened this issue 2 years ago • 4 comments

From git bisect, the guilty commit is: 6e0070c2e8907e34458755d4b10a75a455374ba0

The peculiar thing is that the lsl_test_exported fails on my computer but succeeds on the GitHub actions runner for this exact same commit.

I'll continue to investigate.

cboulay avatar Sep 03 '21 22:09 cboulay

The errors for posterity.

$build/install/bin/SendDataC
SendDataC example program. Sends 8 float channels as fast as possible.
Usage: build/install/bin/SendDataC [streamname] [streamuid]
Using lsl 115, lsl_library_info: git:v1.15.1-1-gfb174c2d/branch:master/build:/compiler:AppleClang-12.0.5.12050022/link:SHARED
2021-09-03 18:32:55.070 (   0.002s) [          285CDD]         api_config.cpp:231   INFO| Loaded default config
2021-09-03 18:32:55.071 (   0.002s) [          285CDD]             common.cpp:65    INFO| git:v1.15.1-1-gfb174c2d/branch:master/build:/compiler:AppleClang-12.0.5.12050022/link:SHARED
Segmentation fault: 11
liblsl $build/install/bin/lsl_test_exported 
2021-09-03 18:33:45.780 (   0.002s) [          285F9E]         api_config.cpp:231   INFO| Loaded default config
2021-09-03 18:33:45.781 (   0.002s) [          285F9E]             common.cpp:65    INFO| git:v1.15.1-1-gfb174c2d/branch:master/build:/compiler:AppleClang-12.0.5.12050022/link:SHARED

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lsl_test_exported is a Catch v2.13.6 host application.
Run with -? for options

-------------------------------------------------------------------------------
datatransfer - int32_t
-------------------------------------------------------------------------------
/Volumes/STORE/Tools/Neurophys/labstreaminglayer/LSL/liblsl/testing/test_ext_DataType.cpp:9
...............................................................................

/Volumes/STORE/Tools/Neurophys/labstreaminglayer/LSL/liblsl/testing/test_ext_DataType.cpp:9: FAILED:
due to a fatal error condition:
  SIGSEGV - Segmentation violation signal

===============================================================================
test cases: 1 | 1 failed
assertions: 1 | 1 failed

Segmentation fault: 11

cboulay avatar Sep 03 '21 22:09 cboulay

Mine:

-- The C compiler identification is AppleClang 12.0.5.12050022
-- The CXX compiler identification is AppleClang 12.0.5.12050022

Runner:

-- The C compiler identification is AppleClang 12.0.0.12000032
-- The CXX compiler identification is AppleClang 12.0.0.12000032

cboulay avatar Sep 03 '21 22:09 cboulay

OK... The package downloaded from CI works (after jumping through permissions hoops), and if I use cmake ... -G Xcode then it works.

My guess is that the default generator -- makefiles -- somehow finds a different version of some system-level dependency than the one used by XCode. Of course we don't want to be forced into XCode in perpetuity, especially because it seems to be slower than the default generator. I don't have any more time to investigate at the moment but I'll leave this issue around because the runner may end up in the same state at some point.

For now it's a "me" problem.

cboulay avatar Sep 03 '21 22:09 cboulay

I experience the same crash on my M1 Mac. SendDataC starts crashing with 6e0070c and stops crashing at fde22b17. However, my own applications still crashes on HEAD and v1.16.0. 1.16.0 also crashes with the package downloaded from the releases page. My application also uses asio and the crashes go away when I force it to use the same asio version as used in liblsl, so I suspect this is a separate issue....

-- The C compiler identification is AppleClang 13.1.6.13160021 -- The CXX compiler identification is AppleClang 13.1.6.13160021

pmaanen avatar Aug 16 '22 11:08 pmaanen