Subject: Re: mysqld - innodb, pthread_mutex_unlock
To: rudolf <netbsd@eq.cz>
From: Juan RP <juan@xtrarom.org>
List: port-amd64
Date: 01/30/2006 07:04:24
On Mon, 30 Jan 2006 03:47:18 +0100
rudolf <netbsd@eq.cz> wrote:

> Hi,
> 
> I have some problems with mysqld 5.0.18 (pkgsrc-2005Q4 with current 
> databases/mysql5-client and databases/mysql5-server) on an amd64 (one 
> Xeon) machine. The daemon refuses to start if it's configured to run 
> innodb engine and there are the innodb files present in mysql data 
> directory (it starts correctly only when it initially creates the
> innodb files, subsequent restart again fails). It is possible to
> start it correctly with "--skip-innodb", but once I also got:
> 
> mysqld: Error detected by libpthread: Invalid mutex.
> Detected by file 
> "/home/builds/ab/netbsd-3-0-RELEASE/src/lib/libpthread/pthread_mutex.c", 
> line 334, function "pthread_mutex_unlock".
> See pthread(3) for information.
> 
> Do you have any idea what could be wrong? (u)limits are stretched to 
> maximum for the process so this shouldn't be the problem. It's NetBSD 
> 3.0, amd64, 2G RAM, slightly modified GENERIC kernel.

For unknown reasons mysql is trying to unlock an invalid mutex,
the pthread library detects it and refuses to start.

As a workaround you can use the environment
variable "PTHREAD_DIAGASSERT=AE" to ignore and do not log the errors
to stdout (see pthread(3)).

Can you please tell me how to get this error? I'll try to fix mysql
properly.