auCDtect: Fatal error: glibc detected an invalid stdio handle

All we need is an easy explanation of the problem, so here it is.

I’m trying to use auCDtect to check the authenticity of my audio files. I can run the linux binary successfully on my Synology NAS (DS918+) with the addition of libstdc++-libc6.2-2.so.3. I wanted to do this faster on my macbook pro laptop. I repeated the same step in Debian GNU Linux 9 (in Parallels Desktop), which resulted in this error:

Fatal error: glibc detected an invalid stdio handle
fish: 'aucdtect' terminated by signal SIGABRT (Abort)

gdb:

(gdb) run
Starting program: /usr/local/bin/aucdtect
Fatal error: glibc detected an invalid stdio handle

Program received signal SIGABRT, Aborted.
0xf7fd7c89 in __kernel_vsyscall ()
(gdb) bt
#0  0xf7fd7c89 in __kernel_vsyscall ()
#1  0xf7d8fdf0 in raise () from /lib32/libc.so.6
#2  0xf7d912b7 in abort () from /lib32/libc.so.6
#3  0xf7dcb3af in ?? () from /lib32/libc.so.6
#4  0xf7dcb3ec in __libc_fatal () from /lib32/libc.so.6
#5  0xf7dcbd73 in ?? () from /lib32/libc.so.6
#6  0xf7da641b in vfprintf () from /lib32/libc.so.6
#7  0xf7dad7c8 in fprintf () from /lib32/libc.so.6
#8  0x080492d4 in ?? ()
#9  0xf7d7c286 in __libc_start_main () from /lib32/libc.so.6
#10 0x080489b1 in ?? ()
(gdb)
#0  0xf7fd7c89 in __kernel_vsyscall ()
#1  0xf7d8fdf0 in raise () from /lib32/libc.so.6
#2  0xf7d912b7 in abort () from /lib32/libc.so.6
#3  0xf7dcb3af in ?? () from /lib32/libc.so.6
#4  0xf7dcb3ec in __libc_fatal () from /lib32/libc.so.6
#5  0xf7dcbd73 in ?? () from /lib32/libc.so.6
#6  0xf7da641b in vfprintf () from /lib32/libc.so.6
#7  0xf7dad7c8 in fprintf () from /lib32/libc.so.6
#8  0x080492d4 in ?? ()
#9  0xf7d7c286 in __libc_start_main () from /lib32/libc.so.6
#10 0x080489b1 in ?? ()

I guess this is probably because the program is too old (2004) and isn’t compatible with the newer libraries. How can I figure out which library caused the problem (probably libc?), and which old version should I get?

How to solve :

I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.

Method 1

I’ve been using auCDtect under wine for as long as I remember myself:

wine ~/bin/auCDtect.exe -v -mS0 '*.wav'

You could also consider https://github.com/alexkay/spek which shows waveforms in a visual form. You can instantly see if the audio file has been processed by a bad encoder though good encoders e.g. Apple AAC even at 256Kbit/sec are often near impossible to detect this way but then auCDtect shows them as CDDA as well.


To see which shared libraries it uses you could run it via ldd /path/to/binary. It will not give you an understanding which versions of the libraries it needs.

Method 2

I used ldd /usr/local/bin/aucdtect to find the libraries aucdtect used (mainly libc and libm), copied them over from my NAS, put them in the same directory as aucdtect, and set LD_LIBRARY_PATH to /usr/local/bin. Using this method, I was able to run aucdtect in the virtual machine. However, using wine on macOS is nearly 3x faster than using it in the virtual machine (sample size=1), so I ended up using wine instead.

Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply