Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/mongodb: fix for #5117

From: Timo Teras <timo.teras_at_iki.fi>
Date: Tue, 23 Feb 2016 19:44:40 +0200

On Tue, 23 Feb 2016 18:26:12 +0100
Marc Vertes <marc.vertes_at_ugrid.net> wrote:

> > Le 23 févr. 2016 à 18:18, Marc Vertes <marc.vertes_at_ugrid.net> a
> > écrit :
> >
> >
> >>
> >> Technically the getrlimit() is perfectly ok to do on all
> >> platforms. But we know glibc returns rlimit anway, so it can be
> >> skipped there.
> >>
> >> I would have put all of the base/size twiddling inside the if().
> >> Then struct rlimit does not need initialization either. But thats
> >> a minor thingy. You care to fix that, or should I just apply this?
> >>
> > Ok, let met fix, test and resubmit.
>
> Adjusting the base/size outside of if() is necessary if init is not
> performed by main thread, which is the case for mongo shell. If you
> agree with that, you can commit as it is.

No. And that's actually wrong. If you adjust with 2mb for non-main
threads, you end up returning wrong info.

When adjustment is not done, base is just += size -= size, which is
no-op.

So the current patch is wrong. pthread_getattr_np returns valid and
correct data for non-main threads. Only main thread should get the
"treatment".

Thanks.

Also, sorry for pushing my earlier broken patch. I forgot to reset my
git tree before pushing the other patches out.


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Tue Feb 23 2016 - 19:44:40 GMT