Closed BachoSeven closed 3 years ago
Hi,
Thanks for reporting :)
I don't think the cue files are a problem (I have some on the same kind in my own library, and they don't make the program segfault, just error like what you see here) I also have a 200GiB library, so, it's probably not the problem.
It analyzes as many songs in parallel as you have cores, so perhaps it takes too much RAM, or something?
Otherwise, if you have gdb, could you run it, then in the prompt, run --rescan ~/slsk/music/
, and if it segfaults, show me the output of bt
?
You can compile / run https://github.com/Polochon-street/bliss-rs/blob/master/examples/analyse.rs by cloning the repo, and then run cargo run --release --example=analyze /path/to/music/file.flac
, maybe that would help finding the file that segfaults (if it's a specific file)
I ran it through gdb
, while looking at my system, and it's not running out of memory; I have a dual-core CPU(4 threads I think, it's an i7-7500U), and this is the output of bt
from the debugger:
Thread 95 "blissify" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffc42ea640 (LWP 59083)]
ff_mix_2_1_a_float_avx.next () at libavutil/x86/x86util.asm:1314
1314 libavutil/x86/x86util.asm: No such file or directory.
(gdb) bt
#0 ff_mix_2_1_a_float_avx.next () at libavutil/x86/x86util.asm:1314
#1 0x000055555718c265 in swri_rematrix (s=s@entry=0x7ffff0a57040, out=out@entry=0x7fffc42e8810, in=in@entry=0x7fffc42e8a30, len=len@entry=-22, mustcopy=mustcopy@entry=0)
at libswresample/rematrix.c:538
#2 0x0000555556e4eea2 in swr_convert_internal (s=s@entry=0x7ffff0a57040, out=out@entry=0x7ffff0a5a670, out_count=-22, out_count@entry=64, in=in@entry=0x7ffff0a59df0,
in_count=in_count@entry=1152) at libswresample/swresample.c:648
#3 0x0000555556e4f965 in swr_convert_internal (in_count=1152, in=0x7ffff0a59df0, out_count=64, out=0x7ffff0a5a670, s=0x7ffff0a57040) at libswresample/swresample.c:589
#4 swr_convert (s=s@entry=0x7ffff0a57040, out_arg=0x7fff94000c80, out_count=out_count@entry=64, in_arg=<optimized out>, in_count=<optimized out>) at libswresample/swresample.c:766
#5 0x0000555556e505da in convert_frame (in=<optimized out>, out=<optimized out>, s=<optimized out>) at libswresample/swresample_frame.c:96
#6 swr_convert_frame (s=0x7ffff0a57040, out=0x7fff94000c80, in=0x7ffff2a35cc0) at libswresample/swresample_frame.c:157
#7 0x000055555656fc04 in ffmpeg_next::software::resampling::context::Context::run (self=0x7fffc42e9408, input=0x7fffc42e90f0, output=0x7fffc42e90b8)
at /home/fra/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/ffmpeg-next-4.3.8/src/software/resampling/context.rs:156
#8 0x0000555555cbf653 in bliss_audio::song::resample_frame (rx=..., resample_context=..., sample_array=...)
at /home/fra/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/bliss-audio-0.2.4/src/song.rs:513
#9 0x0000555555cbf214 in bliss_audio::song::{{impl}}::decode::{{closure}} () at /home/fra/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/bliss-audio-0.2.4/src/song.rs:419
#10 0x0000555555fffb3c in std::sys_common::backtrace::__rust_begin_short_backtrace<closure-6,core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>> (f=...)
at /build/rust/src/rustc-1.52.1-src/library/std/src/sys_common/backtrace.rs:125
#11 0x000055555624113d in std::thread::{{impl}}::spawn_unchecked::{{closure}}::{{closure}}<closure-6,core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>>
() at /build/rust/src/rustc-1.52.1-src/library/std/src/thread/mod.rs:474
#12 0x000055555622df2c in std::panic::{{impl}}::call_once<core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>,closure-0> (self=..., _args=())
at /build/rust/src/rustc-1.52.1-src/library/std/src/panic.rs:344
#13 0x0000555555f1fa0e in std::panicking::try::do_call<std::panic::AssertUnwindSafe<closure-0>,core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>> (
data=0x7fffc42e9748) at /build/rust/src/rustc-1.52.1-src/library/std/src/panicking.rs:379
#14 0x0000555555fb82fd in __rust_try ()
#15 0x0000555555f1f128 in std::panicking::try<core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>,std::panic::AssertUnwindSafe<closure-0>> (f=...)
at /build/rust/src/rustc-1.52.1-src/library/std/src/panicking.rs:343
#16 0x000055555623cb3d in std::panic::catch_unwind<std::panic::AssertUnwindSafe<closure-0>,core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>> (f=...)
at /build/rust/src/rustc-1.52.1-src/library/std/src/panic.rs:431
#17 0x000055555623fe50 in std::thread::{{impl}}::spawn_unchecked::{{closure}}<closure-6,core::result::Result<alloc::vec::Vec<f32, alloc::alloc::Global>, bliss_audio::BlissError>> ()
at /build/rust/src/rustc-1.52.1-src/library/std/src/thread/mod.rs:473
#18 0x0000555555ccd72f in core::ops::function::FnOnce::call_once<closure-0,()> () at /build/rust/src/rustc-1.52.1-src/library/core/src/ops/function.rs:227
#19 0x000055555729ba1a in alloc::boxed::{{impl}}::call_once<(),FnOnce<()>,alloc::alloc::Global> (self=..., args=<optimized out>)
at /build/rust/src/rustc-1.52.1-src/library/alloc/src/boxed.rs:1546
#20 alloc::boxed::{{impl}}::call_once<(),alloc::boxed::Box<FnOnce<()>, alloc::alloc::Global>,alloc::alloc::Global> (self=0x7ffff0002820, args=<optimized out>)
at /build/rust/src/rustc-1.52.1-src/library/alloc/src/boxed.rs:1546
#21 std::sys::unix::thread::{{impl}}::new::thread_start (main=0x7ffff0002820) at library/std/src/sys/unix/thread.rs:71
#22 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#23 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
huh, seems it's segfaulting while trying to resample songs.
Could you try to run thread apply all bt
(and then maybe bt
again, not sure) to get the stacktrace of all threads?
If you've managed to compile / run analyze
, could you check whether it analyzes correctly home/fra/slsk/music/Pink Floyd/Pink Floyd - Discography [EAC - FLAC] (oan)/Pink Floyd - Is There Anybody Out There [Disc 2] 2000 [EAC - FLAC] (oan)/07 - The Show Must Go On.flac'
?
Alternatively, could you try and see if you can catch it with rr
(in AUR)? You would then be able to run rr record blissify --rescan ~/slsk/music/
, rr pack
, and then attach the generated trace to this issue :)
Here's the trace from thread apply all bt
:
Thread 151 "blissify" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff4817640 (LWP 186619)]
0x00005555565d7041 in ?? ()
(gdb) thread apply all bt
Thread 258 (Thread 0x7ffff5819640 (LWP 186934) "blissify"):
#0 0x00007ffff7b9ddb5 in _int_free () from /usr/lib/libc.so.6
#1 0x00007ffff7ba19e8 in free () from /usr/lib/libc.so.6
#2 0x000055555587096e in ?? ()
#3 0x00005555558b12d4 in ?? ()
#4 0x000055555585df72 in ?? ()
#5 0x000055555585fe12 in ?? ()
#6 0x00005555565ffa6a in ?? ()
#7 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#8 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 257 (Thread 0x7ffff5018640 (LWP 186933) "blissify"):
#0 0x0000555556620bdc in ?? ()
#1 0x000055555583dfaf in ?? ()
#2 0x0000555555847fde in ?? ()
#3 0x0000555555837d8e in ?? ()
#4 0x00005555558b0ebb in ?? ()
#5 0x000055555585df72 in ?? ()
#6 0x000055555585fe12 in ?? ()
#7 0x00005555565ffa6a in ?? ()
#8 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 253 (Thread 0x7fffa2ed3640 (LWP 186926) "blissify"):
#0 0x00005555558cf216 in ?? ()
#1 0x00005555558cb8ba in ?? ()
#2 0x0000555555870657 in ?? ()
#3 0x00005555558b12d4 in ?? ()
#4 0x000055555585df72 in ?? ()
#5 0x000055555585fe12 in ?? ()
#6 0x00005555565ffa6a in ?? ()
#7 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#8 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 252 (Thread 0x7fffdffff640 (LWP 186925) "blissify"):
#0 0x0000555555890d00 in ?? ()
#1 0x00005555558891fe in ?? ()
#2 0x000055555588afe7 in ?? ()
#3 0x000055555587b575 in ?? ()
#4 0x0000555555831528 in ?? ()
#5 0x00005555558b0e85 in ?? ()
#6 0x000055555585df72 in ?? ()
#7 0x000055555585fe12 in ?? ()
#8 0x00005555565ffa6a in ?? ()
#9 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
--Type <RET> for more, q to quit, c to continue without paging--c
#10 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 251 (Thread 0x7fffdf7fe640 (LWP 186924) "blissify"):
#0 0x00005555558cd3a4 in ?? ()
#1 0x00005555558ce7b0 in ?? ()
#2 0x00005555558cee12 in ?? ()
#3 0x00005555558cc8bd in ?? ()
#4 0x00005555558cca1a in ?? ()
#5 0x00005555558d06cb in ?? ()
#6 0x000055555587fac5 in ?? ()
#7 0x00005555558b0594 in ?? ()
#8 0x000055555585df72 in ?? ()
#9 0x000055555585fe12 in ?? ()
#10 0x00005555565ffa6a in ?? ()
#11 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 209 (Thread 0x7fffcaffd640 (LWP 186775) "blissify"):
#0 0x00005555558cd3a8 in ?? ()
#1 0x00005555558ce7b0 in ?? ()
#2 0x00005555558cee12 in ?? ()
#3 0x00005555558cc8bd in ?? ()
#4 0x00005555558cca1a in ?? ()
#5 0x0000555555870682 in ?? ()
#6 0x00005555558b12d4 in ?? ()
#7 0x000055555585df72 in ?? ()
#8 0x000055555585fe12 in ?? ()
#9 0x00005555565ffa6a in ?? ()
#10 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 208 (Thread 0x7fffca7fc640 (LWP 186774) "blissify"):
#0 0x00005555558383aa in ?? ()
#1 0x0000555555840188 in ?? ()
#2 0x0000555555831f5c in ?? ()
#3 0x00005555558b0e85 in ?? ()
#4 0x000055555585df72 in ?? ()
#5 0x000055555585fe12 in ?? ()
#6 0x00005555565ffa6a in ?? ()
#7 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#8 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 151 (Thread 0x7ffff4817640 (LWP 186619) "blissify"):
#0 0x00005555565d7041 in ?? ()
#1 0x0000555556509916 in ?? ()
#2 0x00005555561ccd01 in ?? ()
#3 0x00005555561cd795 in ?? ()
#4 0x00005555561ce3e1 in ?? ()
#5 0x00005555558ecfbd in ?? ()
#6 0x0000555555816fdc in ?? ()
#7 0x000055555585dffe in ?? ()
#8 0x000055555585ffdb in ?? ()
#9 0x00005555565ffa6a in ?? ()
#10 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#11 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 35 (Thread 0x7fffa06d8640 (LWP 186423) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e3c270 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#2 0x00005555556819cf in ?? ()
#3 0x00005555556817eb in ?? ()
#4 0x00005555558e4bad in ?? ()
#5 0x00005555558e73d3 in ?? ()
#6 0x00005555558e788f in ?? ()
#7 0x00005555565ffa6a in ?? ()
#8 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 34 (Thread 0x7fffa08d9640 (LWP 186422) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e3c270 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#2 0x00005555556819cf in ?? ()
#3 0x00005555556817eb in ?? ()
#4 0x00005555558e4bad in ?? ()
#5 0x00005555558e73d3 in ?? ()
#6 0x00005555558e788f in ?? ()
#7 0x00005555565ffa6a in ?? ()
#8 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 33 (Thread 0x7fffa0ada640 (LWP 186421) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e3c270 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#2 0x00005555556819cf in ?? ()
#3 0x00005555556817eb in ?? ()
#4 0x00005555558e4bad in ?? ()
#5 0x00005555558e73d3 in ?? ()
#6 0x00005555558e788f in ?? ()
#7 0x00005555565ffa6a in ?? ()
#8 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 32 (Thread 0x7ffff4214640 (LWP 186420) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e3c270 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#2 0x00005555556819cf in ?? ()
#3 0x00005555556817eb in ?? ()
#4 0x00005555558e4bad in ?? ()
#5 0x00005555558e73d3 in ?? ()
#6 0x00005555558e788f in ?? ()
#7 0x00005555565ffa6a in ?? ()
#8 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#9 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 5 (Thread 0x7ffff741e640 (LWP 186390) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e37743 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
#2 0x00005555565ffb4d in ?? ()
#3 0x000055555585eb32 in ?? ()
#4 0x00005555558ae261 in ?? ()
#5 0x00005555558b6de6 in ?? ()
#6 0x00005555558afde9 in ?? ()
#7 0x0000555555815d33 in ?? ()
#8 0x0000555555715e94 in ?? ()
#9 0x000055555571b7c0 in ?? ()
#10 0x00005555565ffa6a in ?? ()
#11 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 4 (Thread 0x7ffff761f640 (LWP 186389) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e37743 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
#2 0x00005555565ffb4d in ?? ()
#3 0x000055555585eb32 in ?? ()
#4 0x00005555558ae517 in ?? ()
#5 0x00005555558b6d50 in ?? ()
#6 0x00005555558afde9 in ?? ()
#7 0x0000555555815d33 in ?? ()
#8 0x0000555555715e94 in ?? ()
#9 0x000055555571b7c0 in ?? ()
#10 0x00005555565ffa6a in ?? ()
#11 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 3 (Thread 0x7ffff7820640 (LWP 186388) "blissify"):
#0 0x00007ffff7e428ca in __futex_abstimed_wait_common64 () from /usr/lib/libpthread.so.0
#1 0x00007ffff7e37743 in __pthread_clockjoin_ex () from /usr/lib/libpthread.so.0
#2 0x00005555565ffb4d in ?? ()
#3 0x000055555585eb32 in ?? ()
#4 0x00005555558ae261 in ?? ()
#5 0x00005555558b6de6 in ?? ()
#6 0x00005555558afde9 in ?? ()
#7 0x0000555555815d33 in ?? ()
#8 0x0000555555715e94 in ?? ()
#9 0x000055555571b7c0 in ?? ()
#10 0x00005555565ffa6a in ?? ()
#11 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 2 (Thread 0x7ffff7a21640 (LWP 186387) "blissify"):
#0 0x0000555555e154bd in ?? ()
#1 0x0000555555e155e5 in ?? ()
#2 0x0000555555afa2ba in ?? ()
#3 0x0000555555af76d1 in ?? ()
#4 0x0000555555af7ff8 in ?? ()
#5 0x00005555559410b0 in ?? ()
#6 0x0000555555941bb8 in ?? ()
#7 0x0000555555815609 in ?? ()
#8 0x0000555555715e94 in ?? ()
#9 0x000055555571b7c0 in ?? ()
#10 0x00005555565ffa6a in ?? ()
#11 0x00007ffff7e36259 in start_thread () from /usr/lib/libpthread.so.0
#12 0x00007ffff7c145e3 in clone () from /usr/lib/libc.so.6
Thread 1 (Thread 0x7ffff7b11a00 (LWP 186383) "blissify"):
#0 0x00007ffff7c0f18d in syscall () from /usr/lib/libc.so.6
#1 0x00005555565f94ea in ?? ()
#2 0x000055555572e703 in ?? ()
#3 0x0000555555718a78 in ?? ()
#4 0x0000555555720be5 in ?? ()
#5 0x0000555555727ca4 in ?? ()
#6 0x0000555555715cf3 in ?? ()
#7 0x0000555555730aad in ?? ()
#8 0x00005555565fcf2a in ?? ()
#9 0x000055555572aae2 in ?? ()
#10 0x00007ffff7b3db25 in __libc_start_main () from /usr/lib/libc.so.6
#11 0x000055555571102e in ?? ()
as for the trace from rr
, what do you want me to attach? after doing rr pack
, it's still a folder with inside the binaries of the libraries and some other binaries
hm, no luck in the thread trace.
I think if you just need to zip the folder it says it's in, and you can attach it to this issue, like
polochon@arch-coucou rr $ rr pack /home/polochon/.local/share/rr/blissify-7 [1]
rr: Packed trace directory `/home/polochon/.local/share/rr/blissify-7'.
polochon@arch-coucou rr $
you'd zip /home/polochon/.local/share/rr/blissify-7
and upload it here
Here you go: https://0x0.st/-LvG.zip
Edit: it's 195M
Here's the trace from my journal, although it doesn't look so useful:
Process 199384 (blissify) of user 1000 dumped core.
Stack trace of thread 199471:
#0 0x000055eaef5da041 n/a (/usr/bin/blissify + 0x1083041)
Fixed in the fix-segfault
branch of the bliss
repo, closing because I scanned my entire library again and there are no more coredumps.
I did not, it seems to coredump around PinkFloyd, but not always at the same file.
How should I compile just that piece of code?
I think this is due to
blissify
trying to analyse all music files that a.cue
file lists, and in my case many of those are non-existent(wrong/different naming). Or, could it be a problem of sheer size of the collection(?) I do have many hundred gigs of music in that folder.Log: