On Thu, Jul 26, 2018 at 01:32:15AM -0700, Jiri Slaby wrote:<br>
> Running<br>
> ```<br>
> for aa in `seq 1 120`; do ./tests/bpf-obj_get_info_by_fd >> log & done<br>
> ```<br>
> results in *no* `EPERM`. It must be some other test interfering. Looking into the bpf code, `EPERM` is returned when we are over `RLIMIT_MEMLOCK`. And this `BPF_MAP_CREATE` only adds few bytes to that limit AFAIU (`value_size=8` × `max_entries=1` + some constant, the sum rounded to `PAGE_SIZE`, i.e. exactly one page). And `ulimit -l` is set 64 k (which is not that much, I agree, looking where is this limit from; my machine has set that to 16 M). <br>
<br>
Finally, I've managed to reproduce this issue:<br>
<br>
$ uname -a<br>
Linux ppc64le-test.fedorainfracloud.org 5.2.16-200.fc30.ppc64le #1 SMP Thu Sep 19 15:47:22 UTC 2019 ppc64le ppc64le ppc64le GNU/Linux<br>
<br>
$ ulimit -l<br>
64<br>
<br>
$ for n in `seq 1 5`; do i=1; while ./bpf-obj_get_info_by_fd; do i="$(($i+1))"; done &>/dev/null; echo $i; done<br>
3<br>
1448<br>
484<br>
1139<br>
903<br>
<br>
Yes, these were consequent invocations with no concurrency whatsoever.<br>
What can I say?  It's definitely a kernel bug that has to be addressed<br>
on the kernel side.<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/strace/strace/issues/74?email_source=notifications&email_token=AAFX7DFIVEZNL2XCBAMAVE3QXU4V3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHF5HQ#issuecomment-562978462">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAFX7DFTKNGKLIZHRUK5W3TQXU4V3ANCNFSM4FMFBRLA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAFX7DEVAPQPPEE54I3UZMLQXU4V3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHF5HQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/strace/strace/issues/74?email_source=notifications\u0026email_token=AAFX7DFIVEZNL2XCBAMAVE3QXU4V3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHF5HQ#issuecomment-562978462",
"url": "https://github.com/strace/strace/issues/74?email_source=notifications\u0026email_token=AAFX7DFIVEZNL2XCBAMAVE3QXU4V3A5CNFSM4FMFBRLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGHF5HQ#issuecomment-562978462",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>