Subject: Re: resource deadlock avoided messages

From: Sergey Matveev <[email-masked]>
Date: Sat, 23 Sep 2023 22:16:50 +0300

Greetings!

*** spacefrogg [2023-09-21 19:12]:
>run.go:247: resource deadlock avoided
>/home/user/project/out/.redo/cc.precompile.lock

I also saw that message for a long time in previous releases. Currently
I can not reproduce it on my system (FreeBSD). I think I still see it on
some GNU/Linuxes, however today I run project that previously tend to
cause those deadlocks and still none of them. Currently I assume that is
some OS-specific behaviour, because I can not reproduce on FreeBSD
anyhow.

Actually that message is an error returned when trying to take a lock.
In some previous releases that lead to exiting the redo with a failure.
I added a loop to try to take the lock again after 10ms. Seems that
worked fine, although produced that noisy error message. In 1.31.0
release I print error message every 10 unsuccessful attempts. In my
practice, taking into account what I saw on GNU/Linuxes, there are few
of those messages per each target as a rule.

>My toolchain does not
>limit the amount of targets discharged to a `redo-ifchange` call. So, I
>suspect the number of open files is an issue.

Nah, I saw that messages in a projects with only a dozens of files.

-- 
Sergey Matveev (http://www.stargrave.org/)
OpenPGP: 12AD 3268 9C66 0D42 6967  FD75 CB82 0563 2107 AD8A