Subject: Re: bug#77613: grep-3.11.69-a4628 on GNU/Hurd

From: Jim Meyering <[email-masked]>
Date: Tue, 8 Apr 2025 07:26:40 -0700

On Tue, Apr 8, 2025 at 12:54 AM Bruno Haible <[email-masked]> wrote:
> Hi Jim,
>
> > > So, IMO, there are two bugs:
> > >
> > >   1) When the allocation of the kwset takes more memory than available,
> > >      'grep' should exit via xalloc_die(), instead of waiting to be killed
> > >      by the OOM killer.
> > >
> > >   2) In the 'hash-collision-perf' unit test: The use of a perl primitive
> > >      for measuring the execution time of a child process, that is not
> > >      properly ported to GNU/Hurd.
> >
> > Thanks for reporting that!
> > Adding a timeout should resolve this. Expect to push tomorrow:
>
> No, it does not resolve the problem.
>
> In both of my Hurd machines, with the patch, the 'hash-collision-perf'
> unit test is still running after 20 minutes.
> In the Hurd (32-bit) machine, a 'grep --file=in empty' command crashed from
> signal 6 (SIGABRT); see attached screenshot.
> Both machines are unresponsive and need to be rebooted.

Oh! Sorry. I made only the final invocation use the timeout. Must use
it in the loop, too.
Here's a better patch: