"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: sparc64 regress ulimit
To:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Fri, 20 Jan 2023 23:17:49 +0100

Download raw body.

Thread
On Fri, Jan 20, 2023 at 02:09:36PM -0700, Tracey Emery wrote:
> On Fri, Jan 20, 2023 at 10:01:33PM +0100, Christian Weisgerber wrote:
> > Tracey Emery:
> > 
> > > After setting up regress, it was found that 32 was too low of a ulimit
> > > for sparc64. The following is an idea to fix this for sparc64 and keep
> > > other arches untouched.
> > 
> > Why would sparc64 be different in this respect?  That doesn't make any
> > sense.
> > 
> > > --- regress/cmdline/checkout.sh
> > > +++ regress/cmdline/checkout.sh
> > > @@ -901,7 +901,17 @@ test_checkout_ulimit_n() {
> > >  	# Checkout should still work; if it does not, then either there is
> > >  	# a bug or the fixed limit used by this test case is no longer valid
> > >  	# and must be raised. Use a subshell to avoid changing global ulimit.
> > > -	(ulimit -n 32; got checkout -q $testroot/repo $testroot/wt \
> > 
> > There is absolutely no reason that limit should vary by architecture.
> > 
> 32 fails on sparc. That's the only reason.

Please run the test with this patch applied.
The 'got checkout' process should spin when it happens and you should
be able to get its list of open files with fstat -p $PID

diff /home/stsp/src/got
commit - 7713cc5e4f5544e81909670d592e89526ed86c9b
path + /home/stsp/src/got
blob - 7e698531e6e75bd34bc4b2f0c280aded67f43de0
file + lib/error.c
--- lib/error.c
+++ lib/error.c
@@ -254,6 +254,10 @@ got_error(int code)
 {
 	size_t i;
 
+	if (code == GOT_ERR_PRIVSEP_NO_FD) {
+		fprintf(stderr, "%s: no more privsep fds; spinning...\n", __func__);
+		for (;;) sleep(1);
+	}
 	for (i = 0; i < nitems(got_errors); i++) {
 		if (code == got_errors[i].code)
 			return &got_errors[i];