On 16/07/2025 13:36, Takashi Yano via Cygwin wrote:
On Wed, 16 Jul 2025 21:13:59 +0900
Takashi Yano via Cygwin <[email protected]> wrote:

On Tue, 17 Jun 2025 21:46:47 +0900
Takashi Yano wrote:
I encountered a problem of doxygen when many call graphs are generated.

How to reproduce:
1) Make a empty directory.
2) Place two files (Doxyfile, x.c) attached in the directory.
3) Run doxygen in the directory.

It seems that this is a bug of cygwin1.dll and the cause is
a deadlock in newlib/libc/stdio/findfp.c:__fp_lock_all().

The following patch solves the issue, however, I am not sure
this is the right thing at all.

diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 2cc549537..3de6b33fd 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -298,7 +298,9 @@ __fp_unlock (struct _reent * ptr __unused, FILE * fp)
  void
  __fp_lock_all (void)
  {
+#ifndef __CYGWIN__
    __sfp_lock_acquire ();
+#endif
    (void) _fwalk_sglue (NULL, __fp_lock, &__sglue);
  }
@@ -306,6 +308,8 @@ void
  __fp_unlock_all (void)
  {
    (void) _fwalk_sglue (NULL, __fp_unlock, &__sglue);
+#ifndef __CYGWIN__
    __sfp_lock_release ();
+#endif
  }
  #endif

Any suggenstions?

The same hang happened while building aom package with doxygen.
Above patch also solves the issue.

Any idea?

I think this is possibly the same problem as mentioned [1]

[1] https://cygwin.com/pipermail/cygwin-apps/2025-May/044318.html

The stack trace is as follows.
[...]
Thanks very much for digging into this!

(There do seem to be some changes around sfp locking in the 3.3.6 to 3.4.0 interval, which might explain why this shows up then...)


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to