Hi,

We are using msys2 to run builds using make.  Now and then make fails with:

*** fatal error - add_item ("\??\c:\msys64", "/", ...) failed, errno 1


I've isolated this and found that it happens during one-time init of
shared memory for the first process loading the msys dll.  As part of
the shared memory init a mount table of drive letters is built by
mountinfo.init(false), but it should only be called once.
If it is called twice the api_fatal abort shown above is triggered.

A spinlock in shared.cc is supposed to ensure that exactly one call to
mountinfo.init happens.  But the spinlock has a timeout.  After
15 seconds, it stops waiting and returns a value of 0 which allows
any waiting process to enter the critical section.  So the scenario
is that 2+ processes are starting around the same time and the first
process takes a long time in the critical section, probably in the
mazelike internal_getpwsid().  This code can issue LDAP queries and
we have seen those take a long time in our environment at busy times
or during maintenance of the LDAP server.

To solve the aborts it is tempting to make a local fix to remove the
spinlock timeout.  Does anyone know if that would be safe to do?


Thanks!
Kevin


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Msys2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to