vivier / qemu-m68k

Other
40 stars 6 forks source link

Firebird3.0 crashes with 'mutex pthread_mutex_init error, status = 95' #32

Open glaubitz opened 6 years ago

glaubitz commented 6 years ago

One of the very few packages that still cause issues on qemu-m68k-user (qemu-m68k-system works fine) is the Firebird database.

It already fails when trying to install the package in a Debian unstable chroot:

(sid-m68k-sbuild)root@nofan:/# apt install firebird3.0-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cpio dbus dmsetup groff-base libapparmor1 libargon2-1 libcap2 libcryptsetup12 libdbus-1-3 libdevmapper1.02.1 libexpat1 libidn11 libip4tc0 libjson-c3 libkmod2
  libpam-systemd libpipeline1 man-db sensible-utils systemd systemd-sysv
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  firebird3.0-common firebird3.0-common-doc firebird3.0-server-core firebird3.0-utils libedit2 libfbclient2 libfreetype6 libglib2.0-0 libglib2.0-data libgraphite2-3
  libharfbuzz0b libib-util libicu-le-hb0 libicu60 libpng16-16 libtommath1 libxml2 shared-mime-info xdg-user-dirs
Suggested packages:
  firebird3.0-doc
The following NEW packages will be installed:
(...)
Setting up firebird3.0-server-core:m68k (3.0.3.32900.ds4-4) ...
Setting up shared-mime-info (1.9-2) ...
Setting up firebird3.0-server (3.0.3.32900.ds4-4) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Password for firebird 3.0
-------------------------

Firebird has a special user named SYSDBA, which is the user that has access to all databases. SYSDBA can also create new databases and users. Because of this, it is
necessary to secure SYSDBA with a password.

The password is stored in /etc/firebird/3.0/SYSDBA.password (readable only by root). You may modify it there (don't forget to update the security database too, using the
gsec utility), or you may use dpkg-reconfigure to update both.

If you don't enter a password, a random one will be used (and stored in SYSDBA.password).

Password for SYSDBA: 

adduser: Warning: The home directory `/var/lib/firebird' does not belong to the user you are currently creating.
ConfigStorage: mutex pthread_mutex_init error, status = 95
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
dpkg: error processing package firebird3.0-server (--configure):
 installed firebird3.0-server package post-installation script subprocess returned error exit status 134
Processing triggers for libc-bin (2.27-5) ...
Processing triggers for systemd (239-7) ...
Errors were encountered while processing:
 firebird3.0-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
(sid-m68k-sbuild)root@nofan:/#

After the package has been (half-)installed, the crash can be reproduced with the following command:

(sid-m68k-sbuild)root@nofan:/# SEC_SQL=/usr/share/firebird/3.0/security.sql T=/tmp/tmp.2kBDCgAevm T_SEC=/tmp/tmp.2kBDCgAevm/security.fdb isql-fb -q
SQL> create database '/tmp/tmp.2kBDCgAevm/security.fdb';
ConfigStorage: mutex pthread_mutex_init error, status = 95
qemu: uncaught target signal 6 (Aborted) - core dumped
Aborted
(sid-m68k-sbuild)root@nofan:/#

This might be related to issue #18 which I haven't tested for a while.