Hi
After a break, I am trying to catch up on the brutefir performance test in adk.
Unfortunately, with the current revision of adk (2af0538) I get a segmentation fault when running brutefir in offline mode.
It can be reproduced by building qemu with brutefir and sox and then doing:
cd /etc/
mkdir bftest
cd bftest
sox -t sl -r 44100 -c 2 /dev/zero -r 44100 -c 2 -b 16 pinknoise.wav synth 1:00 pinknoise vol 0.6
cat > wavtest.conf << "EOF" # Begin wavtest.conf
# File used for testing brutefir # Uses dirac pulse als filter. # Stereo only. Input from file pinknoise.wav. Output to file output.wav.
## DEFAULT GENERAL SETTINGS ##
float_bits: 32; # internal floating point precision sampling_rate: 44100; # sampling rate in Hz of audio interfaces filter_length: 4096,16; # length of filters # config_file: "/home/audiovero/.brutefir_config"; # standard location of main config file overflow_warnings: true; # echo warnings to stderr if overflow occurs show_progress: false; # echo filtering progress to stderr max_dither_table_size: 0; # maximum size in bytes of precalculated dither allow_poll_mode: false; # allow use of input poll mode modules_path: "/usr/lib/brutefir"; # extra path where to find BruteFIR modules monitor_rate: true; # monitor sample rate powersave: -80; # pause filtering when input is zero lock_memory: false; # try to lock memory if realtime prio is set convolver_config: "brutefir_convolver"; # location of convolver config file #benchmark: true;
## LOGIC ##
logic: "cli" { port: 3000; };
## COEFFS ##
coeff "dirac" { filename: "dirac pulse"; format: "FLOAT64_LE"; };
## INPUT, OUTPUT ##
input "fleft", "fright" { device: "file" { path: "pinknoise.wav"; skip: 44;}; # ignore_xrun: true; }; sample: "S16_LE"; channels: 2/0,1;
};
output "fr", "fl" { # device: "alsa" { device: "hw:0";}; # ignore_xrun: true; }; device: "file" { path: "output.wav"; }; sample: "S16_LE"; channels: 2/0,1; dither: true; };
## FILTERS ##
filter "frfilter" { from_inputs: "fright"; to_outputs: "fr"; coeff: "dirac"; };
filter "flfilter" { from_inputs: "fleft"; to_outputs: "fl"; coeff: "dirac"; };
# End wavtest.conf EOF
brutefir -nodefault wavtest.conf
which gives:
"Generating random numbers...Segmentation fault"
.config can be found here:
https://mega.nz/#!5wp3QL6T!JtJxHTm8_wR5RGrDsxTSkUT6CuQD-nW3iNxvEDDfva0 uname -a on qemu: Linux openadk 4.4.50-1 #1 Sun Mar 12 19:58:04 CET 2017 x86_64 GNU/Linux
The same thing happend also on my asus_p5bvm machine on revision 0c6a3bd. On earlier revisions of adk (see oder e-mails) the rest ran fine. I don't really see where this might be coming from.
Any ideas or insights are welcome! :-)
Cheers Oliver
P.S. The config file was modified slightly to avoid the /data path, so the the test can be run from anywhere, now.
Hi Oliver, lich000king wrote,
Hi
After a break, I am trying to catch up on the brutefir performance test in adk.
Unfortunately, with the current revision of adk (2af0538) I get a segmentation fault when running brutefir in offline mode.
I could reproduce it with Qemu. It seems some problem with uClibc-ng based system. Please try with GNU C library. I need to debug the uClibc-ng issue later.
BruteFIR v1.0o (November 2016) (c) Anders Torger
Internal resolution is 32 bit floating point. Creating 4 FFTW plans of size 8192...finished. Loading coefficient set...finished. Dither table size is 882001 bytes. Generating random numbers...finished. Estimated CPU clock rate is 2503.243 MHz. CPU count is 1. Audio processing starts now
Finished! root@convbox:/etc/bf # uname -a Linux convbox 4.9.13-1 #3 PREEMPT RT Fri Mar 17 03:41:47 CET 2017 x86_64 GNU/Linux
best regards Waldemar
Hi Oliver,
git pull, bug is fixed for uClibc-ng based system. uClibc-ng fakes to be GNU C Library in a special old version. Some code in brutefir uses then functions, which triggers the segfault. Unfortunately we cannot change the fake numbers, as it triggers some problems in the toolchain. We tried this a few years ago. So I just disable the usage of the old function usage in brutefir when uClibc-ng is in use.
best regards Waldemar
Hi Thanks for fixing! Will try it right away. Do we expect an impact on performance (drop) when these functions are no longer used? Oliver
Von: Waldemar Brodkorb wbx@openadk.org An: lich000king lich000king@yahoo.de CC: dev@openadk.org Gesendet: 19:38 Freitag, 17.März 2017 Betreff: Re: [openadk] segfault in brutefir
Hi Oliver,
git pull, bug is fixed for uClibc-ng based system. uClibc-ng fakes to be GNU C Library in a special old version. Some code in brutefir uses then functions, which triggers the segfault. Unfortunately we cannot change the fake numbers, as it triggers some problems in the toolchain. We tried this a few years ago. So I just disable the usage of the old function usage in brutefir when uClibc-ng is in use.
best regards Waldemar
Hi, lich000king@yahoo.de wrote,
Hi
Thanks for fixing! Will try it right away. Do we expect an impact on performance (drop) when these functions are no longer used?
No, because with the change the functions used by modern GNU Libc are used for uClibc-ng, too. And it is only some memalign/malloc stuff.
best regards Waldemar