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

Bug: simd of line~ broken #139

Closed
dromer opened this issue Nov 28, 2023 · 3 comments · May be fixed by #140
Closed

Bug: simd of line~ broken #139

dromer opened this issue Nov 28, 2023 · 3 comments · May be fixed by #140
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@dromer
Copy link
Collaborator

dromer commented Nov 28, 2023

With SSE and AVX implementations of [line~] it seems to output only 0 value.

Needs further investigation.

@dromer dromer added bug Something isn't working help wanted Extra attention is needed labels Nov 28, 2023
@dromer
Copy link
Collaborator Author

dromer commented Nov 28, 2023

This was observed using the DPF wrapper, however in the tests [line~] gets tested for all the x86 SIMD variants and these tests succeed.

So this is pretty strange behavior 🤔

@dromer
Copy link
Collaborator Author

dromer commented Dec 14, 2023

Hmm, I can't replicate the issue with SSE, but with AVX I now get a segfault with this backtrace:

Thread 4 "Untitled" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5f7a6c0 (LWP 2896889)]
0x000055555556096e in _mm256_store_ps(float*, float __vector(8)) (__A=..., __P=0x7ffff5f7b150)
    at /usr/lib/gcc/x86_64-linux-gnu/12/include/avxintrin.h:887
887	  *(__m256 *)__P = __A;
(gdb) bt
#0  0x000055555556096e in _mm256_store_ps(float*, float __vector(8)) (__A=..., __P=0x7ffff5f7b150)
    at /usr/lib/gcc/x86_64-linux-gnu/12/include/avxintrin.h:887
#1  __hv_store_f (bOut=0x7ffff5f7b150, bIn=...) at /home/dreamer/Sources/_projects/_wasted/_hvcc/_plugdata-test/_dpf/linetest/plugin/source/HvMath.h:64
#2  0x000055555556293d in Heavy_Untitled::process (this=0x5555555f1680, inputBuffers=0x0, outputBuffers=0x7ffff5f79a10, n=256) at Heavy_Untitled.cpp:409
#3  0x000055555555ef09 in DISTRHO::HeavyDPF_Untitled::run (this=0x5555555e4500, inputs=0x0, outputs=0x7ffff5f79a10, frames=256)
    at HeavyDPF_Untitled.cpp:180
#4  0x00005555555808b5 in DISTRHO::PluginExporter::run (this=0x7fffffffde20, inputs=0x0, outputs=0x7ffff5f79a10, frames=256)
    at ../../dpf/distrho/src/DistrhoPluginInternal.hpp:971
#5  0x0000555555584c03 in DISTRHO::PluginJack::jackProcess (this=0x7fffffffde20, nframes=256) at ../../dpf/distrho/src/DistrhoPluginJACK.cpp:512
#6  0x0000555555585226 in DISTRHO::PluginJack::jackProcessCallback (nframes=256, ptr=0x7fffffffde20) at ../../dpf/distrho/src/DistrhoPluginJACK.cpp:729
#7  0x00007ffff69a366e in ?? () from /usr/lib/x86_64-linux-gnu/pipewire-0.3/jack/libjack.so.0
#8  0x00007ffff6873ece in ?? () from /usr/lib/x86_64-linux-gnu/spa-0.2/support/libspa-support.so
#9  0x00007ffff68d303c in ?? () from /lib/x86_64-linux-gnu/libpipewire-0.3.so.0
#10 0x00007ffff77c9044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
#11 0x00007ffff784961c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Following test-patch with the DPF generator:

linetest.zip

As we see here enabling tests for all SIMD builds the line~ case succeeds: https://github.com/Wasted-Audio/hvcc/actions/runs/7047364021/job/19181089503#step:6:38

@dromer
Copy link
Collaborator Author

dromer commented Dec 14, 2023

Ok the issue with AVX builds is related to the jack implementation on pipewire.
On my workstation it runs fine!

Can no longer reproduce so will close the issue.

@dromer dromer closed this as completed Dec 14, 2023
@dromer dromer added this to Done in Core Improvements Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Development

Successfully merging a pull request may close this issue.

1 participant