bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] gettxt 0.18.3.1 `configure` hangs @ "checking for work


From: Bruno Haible
Subject: Re: [bug-gettext] gettxt 0.18.3.1 `configure` hangs @ "checking for working sleep... " ?
Date: Mon, 20 May 2019 23:43:26 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-145-generic; KDE/5.18.0; x86_64; ; )

[CCing bug-gnulib. This is the history of the thread:
 <https://lists.gnu.org/archive/html/bug-gettext/2013-11/msg00009.html>
 <https://lists.gnu.org/archive/html/bug-gettext/2019-05/msg00134.html>]

Mikko Rantalainen wrote:
> >>    checking for working sleep... 
> >>
> >> and just sits there, interminably.  Ctrl-C breaks out without issue.
> > 
> > It is executing the configure test from gnulib/m4/sleep.m4, which just
> > exercises a bit of waiting and signal handling (fully POSIX compliant).
> 
> Checking the source of sleep.m4 (assuming I found the correct one) shows
> 
> >     signal (SIGALRM, handle_alarm);
> >     alarm (1);
> >     remaining = sleep (pentecost);
> 
> If system is under very high load it might take more than 1 second of
> wall clock time to get from alarm() to sleep() and this test will then
> hang for 50 days.

Indeed, you're right: the m4/sleep.m4 test may hang, as you say.

> I guess a correct way to fix this is to introduce a
> new flag to tell if test is complete and if alarm is triggered before
> the test is complete, re-arm the alarm 1 second later.

This might work. Would you like to propose a patch?

Thanks!

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]