This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
Re: Still having deadlock problems ?
- From: Pietrobon Marcello <teiffel at attglobal dot net>
- To: Ross Johnson <rpj at ise dot canberra dot edu dot au>
- Cc: Pthreads Developers List <pthreads-win32 at sourceware dot cygnus dot com>
- Date: Tue, 19 Feb 2002 18:12:19 -0600
- Subject: Re: Still having deadlock problems ?
- References: <Pine.LNX.4.05.9903011552380.242-100000@swan.canberra.edu.au> <3C6CA5A2.F2F6FA87@attglobal.net> <3C6CC00F.702D1935@ise.canberra.edu.au>
Thank you for all your quick answers.
You convinced me completely.
I agree that this problem has to have a low priority. It my be not cost effective
to resolve it, though.
But the pthread-win32 library would gain a lot of consideration if this minor
error would be fixed.
Let me know if you do it. I will write then to Johnson M. Hart to change what
he wrote, even if I think it would be more effective if you ask him to do it.
Best Regards,
Marcello
Ross Johnson wrote:
> Pietrobon Marcello wrote:
> >
> > At the end of the page http://sources.redhat.com/pthreads-win32/
> > there is a link to an important article of Johnson M. Hart with title
> > "Experiments with the Open Source Pthreads Library and Some Comments"
> > (http://world.std.com/~jmhart/opensource.htm).
> >
> > In the middle of that article he talks really well about Open Source POSIX
> > Threads for Win32, but he also says:
> > "Furthermore, the Open Source code contains at least one comment about a
> > possible deadlock; this comment is not very reassuring."
> >
> > What is talking about. Is still that problem existing ?
>
> I think he's refering to a comment in mutex.c in the function
> pthread_mutex_destroy():
>
> /*
> * FIXME!!!
> * The mutex isn't held by another thread but we could still
> * be too late invalidating the mutex below since another
> thread
> * may already have entered mutex_lock and the check for a
> valid
> * *mutex != NULL.
> */
>
> NULL is used to indicate an invalid mutex. It still exists,
> probably because to fix it would slow mutexes down with
> extra checking.
>
> This is the only known race condition in the code, and many
> keen eyes have looked through it. If there were others
> they would have been commented too.
>
> > It is very important to me to be able to trust completely Pthread-Win32, so
> > I cannot use it if I don't know when this problem appears.
>
> To the extent that you can trust any library completely, you
> can trust pthreads-win32 to do an excellent job.
>
> Having said that, please check the Conformance section
> of the ANNOUNCE file before you make your final decision.
>
> If you decide to use it, there will be a new snapshot
> out soon with a few bug fixes and enhancements. You can
> grab the very latest development sources from the CVS
> repository by following the instructions on the
> pthreads-win32 web page.
>
> Ross