Skip to content
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

Linux Release builds segfault #39

Open
dromer opened this issue Aug 7, 2024 · 7 comments
Open

Linux Release builds segfault #39

dromer opened this issue Aug 7, 2024 · 7 comments

Comments

@dromer
Copy link
Contributor

dromer commented Aug 7, 2024

Not just because of LV2, but the current Release downloads on the main website are just as broken.

The LV2 action that fails: https://github.com/dan-german/blocks/actions/runs/10280350079/job/28447495778

And what we see when enabling address sanitizer:

LeakSanitizer output:
==27359==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 83892224 byte(s) in 384 object(s) allocated from:
    #0 0x7fba7f0b9628 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
    #1 0x7fba7b8aa958 in vital::Reverb::setupBuffersForSampleRate(int) (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x8aa958)

Direct leak of 2622976 byte(s) in 96 object(s) allocated from:
    #0 0x7fba7f0b9628 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
    #1 0x7fba7b8aabac in vital::Reverb::setupBuffersForSampleRate(int) (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x8aabac)

Direct leak of 704 byte(s) in 8 object(s) allocated from:
    #0 0x7fba7f0b94c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7fba7b966dae in vital::Delay<vital::Memory>::Delay(int) [clone .lto_priv.0] (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x966dae)

Direct leak of 704 byte(s) in 8 object(s) allocated from:
    #0 0x7fba7f0b94c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7fba7b928380 in vital::BlocksVoiceHandler::createReverbs() (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x928380)

Direct leak of 704 byte(s) in 8 object(s) allocated from:
    #0 0x7fba7f0b94c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7fba7b94cf30 in vital::DelayModule::setSampleRate(int) (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x94cf30)
    #2 0x6280000000ff  (<unknown module>)

Direct leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x7fba7f0b94c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7fba7b7328c1 in PluginProcessor::PluginProcessor() (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x7328c1)

Indirect leak of 67108864 byte(s) in 32 object(s) allocated from:
    #0 0x7fba7f0b9628 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
    #1 0x7fba7b966f70 in vital::Delay<vital::Memory>::Delay(int) [clone .lto_priv.0] (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x966f70)

Indirect leak of 67108864 byte(s) in 32 object(s) allocated from:
    #0 0x7fba7f0b9628 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
    #1 0x7fba7b94d0fd in vital::DelayModule::setSampleRate(int) (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x94d0fd)
    #2 0x6280000000ff  (<unknown module>)

Indirect leak of 33554432 byte(s) in 16 object(s) allocated from:
    #0 0x7fba7f0b9628 in operator new[](unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:98
    #1 0x7fba7b9284cd in vital::BlocksVoiceHandler::createReverbs() (/home/dreamer/Sources/_audio/blocks/build/blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so+0x9284cd)

SUMMARY: AddressSanitizer: 254289473 byte(s) leaked in 585 allocation(s).
gmake[2]: *** [CMakeFiles/blocks_LV2.dir/build.make:214: blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so] Error 1
gmake[2]: *** Deleting file 'blocks_artefacts/Release/LV2/blocks.lv2/libblocks.so'
gmake[1]: *** [CMakeFiles/Makefile2:244: CMakeFiles/blocks_LV2.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

When doing a Debug build everything is fine.

@dan-german
Copy link
Owner

dan-german commented Aug 7, 2024

just linux or also windows? mac M1 works for me.
are you sure it's not related to todays changes? people haven't been complaining about the executables not working.

let me revert everything back and we'll see

@dromer
Copy link
Contributor Author

dromer commented Aug 7, 2024

I downloaded from https://www.soonth.com/ and I have no idea what build that is.
Since you disabled the LV2 builds on Linux it shouldn't be related to anything like that.

I think it's only on Linux since we see that in the CI the final linked binary segfaults. From what I can tell JUCE will always try to test the resulting LV2 bundle. On Windows and macOS these builds went fine. When I build locally without the Release flag it also works fine.

I think it's because the Release flag enables these LTO builds. Could be there are some conficting symbols or something else that gets triggered by this, but only on Linux.

@dromer
Copy link
Contributor Author

dromer commented Aug 7, 2024

people haven't been complaining about the executables not working

I think you haven't had any Linux users yet ;)

@dromer
Copy link
Contributor Author

dromer commented Aug 7, 2024

@dan-german so the download on your site is always the latest build from CI?

The Linux build there definitely segfaults.

@dan-german
Copy link
Owner

dan-german commented Aug 7, 2024

@dan-german so the download on your site is always the latest build from CI?

yep!

The Linux build there definitely segfaults.

maybe it's a distro thing? i dont have any machine other than my macbook so i wont be able to fix that anytime soon unfortunately :(

@dromer
Copy link
Contributor Author

dromer commented Aug 8, 2024

maybe it's a distro thing?

No, it's an LTO and source-code thing.

@kwalker99
Copy link

The current VST3 version of blocks on Ubuntu Budgie 24.04.1 LTS in Bitwig 5.2.1 is also crashing: couldn't read responses End of Stream...

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

No branches or pull requests

3 participants