On Sat, Feb 1, 2020 at 6:37 PM Thomas Koenig <tkoe...@netcologne.de> wrote:
>
> Hi Janne,
>
> > Simplify IO locking in libgfortran.  The new IO implementation avoids
> > accessing units without locks, as seen in PR 92836.  It also avoids
> > lock inversion (except for a corner case wrt namelist query when
> > reading from stdin and outputting to stdout), making it easier to
> > verify correctness with tools like valgrind or threadsanitizer.  It is
> > also simplified as the waiting and closed variables are not needed
> > anymore, making it easier to understand and analyze.
> >
> > Regtested on x86_64-pc-linux-gnu, Ok for master?
>
> I'll look into it, this might take a bit of time.

Thanks for looking into this.

> What are you planning to use as a test case? You can put
> multighreading programs into libgomp/testsuite/libgomp.fortran
> where they will be executed.

In this case I just ran the test program in comment #14 in PR 92836
under valgrind --tool=helgrind (there is still a remaining problem
with the locking of unit_cache, but that can be handled separately,
and I think it's benign). I'm not sure how one would run such a test
as part of the testsuite.

But if anyone has tests that reliably deadlock within a relatively
short time, then yeah, such testcases would be awesome.



-- 
Janne Blomqvist

Reply via email to