Subject: Re: problem with electric
To: Jeremy C. Reed <reed@reedmedia.net>
From: Ulrich Etile <timeox@gmail.com>
List: pkgsrc-users
Date: 12/30/2006 09:57:18
Le Thu, 14 Dec 2006 12:09:46 -0600 (CST),
"Jeremy C. Reed" <reed@reedmedia.net> a =E9crit :

> > When I compile electric from pkgsrc/cad/electric directory, it runs.
> > But when I try to execute it. There is an error :
> >=20
> > # electric      =20
> > electric: Error detected by libpthread: Unlocking unlocked mutex.
> > Detected by file
> > "/home/builds/ab/netbsd-3-1-RELEASE/src/lib/libpthread/pthread_mutex.c",
> > line 363, function "pthread_mutex_unlock". See pthread(3) for
> > information. Abort
>=20
> You may want to report this upstream. The problem may be in electric
> or maybe in motif?
>=20
> Search the source for where it does the unlock.

I reported this bug ( id : pkg/35261 ) and prevent the maintainer.

The source of problem is into the graphunixx11.c file from
electric/src/graph/ directory.

>>>>>  graphunixx11.c, line 3191

/*
 * Routine that unlocks mutual-exclusion object "vmutex".
 */
void emutexunlock(void *vmutex)
{
#ifdef HAVE_PTHREAD
	pthread_mutex_t *mutex;

	mutex =3D (pthread_mutex_t *)vmutex;
	pthread_mutex_unlock(mutex);
#else
	mutex_t *mutexid;

	mutexid =3D (mutex_t *)vmutex;
	mutex_unlock(mutexid);
#endif
}

<<<<<

Apparently, if I remove function pthread_mutex_unlock() : it runs.=20
But I don't think that is good to remove the function
pthread_unlock_mutex.


Any proposals ?

Regards,

--=20
-- Ulrich Etile, http://www.chetsbu.net
--