Package: Mbrola-64Bit
Version: 3.01-

Summary: The Mbrola version currently distributed for 64 bit Debian based systems (e.g. Kubuntu) is faulty and crashes immediately with a SEGFAULT. The problem is caused by the packages distributed.

Full story:

The story of mbrola is really becoming a tragedy. It’s a piece of extremely useful software - for blind people and nonetheless for ordinary users who want to have a text read to them while they do something different.

I've been using mbrola for a number of years now before I upgraded my machine from Kubuntu 14.04-32 to 16.04-64. While the transition was smooth for most applications this made mbrola unusable since not only the distributed version is broken out of the box but there seems to be no working 64 bit version available. In various forums users currently keep asking for help to get mbrola working again - apparently no-one came up with a solution yet (for example see [1]).

So I started investigating a bit into the cause of the problem. I came up with a number of reasons - and kind of a solution...

1) Since mbrola is only free, but not open source software we have to rely on the distributed binaries.

2) The mbrola project is more or less abandoned. Many links are dead; the news section of the main web page has seen its last update in 2005 [2]. The binaries available there are only slightly younger (e.g. the AMD64Linux package dates back to Mid 2009) or even older (the Linux i386 package dates back to 2004 and some parts even to 1998).

3) Luckily enough newer versions of the software are available [3]. They are released via a number of FTP servers. I have no idea how these versions are maintained, generated and who has access to the official sources.

4) The official 64-bit version from the main website (AMD64) is indeed 64 bit.

file mbrola_AMD_Linux
mbrola_AMD_Linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.8, stripped

But it crashes immediately under Kubuntu 64 with an "Architecture Panic" error message. I guess this is due to the age of the compiled version and/or to an incorrect check of the host system by the software.

5) All newer 64-bit versions (all 3.01 versions available via FTP) are not 64-, but 32-bit:

file mbrola_3.01h+2-1_amd64
mbrola_3.01h+2-1_amd64: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, stripped
file mbrola_3.01h-6_amd64
mbrola_3.01h-6_amd64: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, stripped
file mbrola_3.01h+1-3_amd64
mbrola_3.01h+1-3_amd64: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, stripped

Therefore there is no up-to-date 64-bit version available - nowhere (confirmed by several hours of digging up the web).

6) At first I thought this was a bug in the build process but it’s intentional: In 2009 the Debian developers decided to use the 32- instead of the 64-bit version because the later didn't work [4]: Samuel Thibault: "Note that the reason why I've put the 32bit version in the amd64 package is that the 64bit version on the mbrola website just doesn't work at produces garbage."

Apparently they (or someone else) still distribute the 32-bit version as 64-bit.

Conclusion: We have to stick with the binaries we have and they are 32-bit (real or pseudo-64 bit).

So I did some extensive testing on all available binaries.
a) Both versions (real and pseudo64) are different but both crash under Kubuntu 64.

b) The problem is not related to a missing 386-32 architectureon my machine. LibC6-i386 (version 2.23) is installed.

c) The problem is not caused by loading the wrong, i.e. 64-bit libc-libraries:

ldd mbrola_3.01h+2-1_amd64
        linux-gate.so.1 =>  (0xf771b000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7695000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf74df000)
        /lib/ld-linux.so.2 (0x56556000)

d) The problem seems to be caused by the current version of libc6 and mbrola:

cat Hallo.pho|./mbrola_3.01h+2-1_amd64 /usr/share/mbrola/de2/de2 - Test.wav
*** Error in `./mbrola_3.01h+2-1_amd64': free(): invalid pointer: 0x08a887e8 ***
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(+0x67377)[0xf7565377]
/lib/i386-linux-gnu/libc.so.6(+0x6d2f7)[0xf756b2f7]
/lib/i386-linux-gnu/libc.so.6(+0x6dbb1)[0xf756bbb1]
/lib/i386-linux-gnu/libc.so.6(_IO_wsetb+0x69)[0xf75600e9]
/lib/i386-linux-gnu/libc.so.6(+0x6bc02)[0xf7569c02]
/lib/i386-linux-gnu/libc.so.6(+0x2e93a)[0xf752c93a]
/lib/i386-linux-gnu/libc.so.6(+0x2e9ef)[0xf752c9ef]
./mbrola_3.01h+2-1_amd64(free+0x60)[0x8048c0c]
======= Memory map: ========
08048000-08050000 r-xp 00000000 08:0a 3287210 /mbrola/mbrola_3.01h+2-1_amd64 08050000-08051000 rwxp 00007000 08:0a 3287210 /mbrola/mbrola_3.01h+2-1_amd64 08a4d000-08a95000 rwxp 00000000 00:00 0 [heap]
f7300000-f7321000 rwxp 00000000 00:00 0
f7321000-f7400000 ---p 00000000 00:00 0
f74fd000-f74fe000 rwxp 00000000 00:00 0
f74fe000-f76ad000 r-xp 00000000 08:02 784943 /lib/i386-linux-gnu/libc-2.23.so f76ad000-f76ae000 ---p 001af000 08:02 784943 /lib/i386-linux-gnu/libc-2.23.so f76ae000-f76b0000 r-xp 001af000 08:02 784943 /lib/i386-linux-gnu/libc-2.23.so f76b0000-f76b1000 rwxp 001b1000 08:02 784943 /lib/i386-linux-gnu/libc-2.23.so
f76b1000-f76b4000 rwxp 00000000 00:00 0
f76b4000-f7707000 r-xp 00000000 08:02 784935 /lib/i386-linux-gnu/libm-2.23.so f7707000-f7708000 r-xp 00052000 08:02 784935 /lib/i386-linux-gnu/libm-2.23.so f7708000-f7709000 rwxp 00053000 08:02 784935 /lib/i386-linux-gnu/libm-2.23.so f7717000-f7733000 r-xp 00000000 08:02 794619 /lib/i386-linux-gnu/libgcc_s.so.1 f7733000-f7734000 rwxp 0001b000 08:02 794619 /lib/i386-linux-gnu/libgcc_s.so.1
f7734000-f7737000 rwxp 00000000 00:00 0
f7737000-f7739000 r--p 00000000 00:00 0 [vvar] f7739000-f773a000 r-xp 00000000 00:00 0 [vdso] f773a000-f775c000 r-xp 00000000 08:02 784939 /lib/i386-linux-gnu/ld-2.23.so
f775c000-f775d000 rwxp 00000000 00:00 0
f775d000-f775e000 r-xp 00022000 08:02 784939 /lib/i386-linux-gnu/ld-2.23.so f775e000-f775f000 rwxp 00023000 08:02 784939 /lib/i386-linux-gnu/ld-2.23.so fff8f000-fffb0000 rwxp 00000000 00:00 0 [stack]

The dump for the real 32-bit version of mbrola looks almost the same.

e) In 2003 a German user had a similar issue with mbrola [5]. Back then mbrola caused a segfault when used with the glibc libraries. He fixed this issue by preloading a different library.

f) In October 2016 I asked on LaunchPad (the Ubuntu Help forum) whether
LD_PRELOAD could be a solution to get mbrola running again in 64-bit systems (an solution discussed on stackoverflow for a different problem [6])

Till now no-one has come up with an idea.. [7]


GHPS
------------------------------------------------
[1] https://forum.ubuntuusers.de/topic/mbrola-produziert-segmentation-fault/
[2] http://tcts.fpms.ac.be/synthesis/mbrola.html
[3] http://ftp.rz.uni-wuerzburg.de/pub/MIRROR/debian/pool/non-free/m/mbrola/
[4] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=532972
[5] http://de.comp.os.unix.apps.misc.narkive.com/VJzJQwhq/mbrola-sigsegv-wegen-glibc-problem
[6] http://stackoverflow.com/questions/426230/what-is-the-ld-preload-trick
[7] https://bugs.launchpad.net/ubuntu/+source/mbrola/+bug/1562097

Reply via email to