Re: process killed: text file modification

From: Gergely Czuczy <gergely.czuczy_at_harmless.hu>
Date: Thu, 9 Mar 2017 14:20:35 +0100
On 2017. 03. 09. 11:27, Gergely Czuczy wrote:
> Hello,
>
> I'm trying to build a few things from ports on an rpi3, the ports 
> collection is mounted over NFS from another machine. When it's trying 
> to build pkg i'm getting the error message in syslog:
>
> rpi3 kernel: pid 4451 (sh), uid 0, was killed: text file modification
>
> The report to pkg_at_:
> https://lists.freebsd.org/pipermail/freebsd-pkg/2017-March/002048.html
>
> In ports-mgmt/pkg's config.log It fails at the following entry:
> configure:3726: checking whether we are cross compiling
> configure:3734: cc -o conftest -O2 -pipe  -Wno-error 
> -fno-strict-aliasing   conftest.c  >&5
> configure:3738: $? = 0
> configure:3745: ./conftest
> configure:3749: $? = 137
> configure:3756: error: in `/usr/ports/ports-mgmt/pkg/work/pkg-1.10.0':
> configure:3760: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details
>
> # uname -a
> FreeBSD rpi3 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r314949: Thu Mar 9 
> 08:58:46 CET 2017 
> aegir_at_marvin.harmless.hu:/tank/rpi3/crochet/work/obj/arm64.aarch64/tank/rpi3/src/sys/AEGIR 
> arm64
So far, a few additions:
Time is synced between the NFS server and the client.
it's an open() call which is getting the kill, and it's not the file 
what's being opened, but the process executing it.
Here's a simple code that reproduces it:
#include <stdio.h>

int main() {

   FILE *f = fopen ("/bar", "w");

   fclose(f);
   return 0;
}

Conditions to reproduce it:
  - The resulting binary must be executed from the nfs mount
  - The binary must be built after mounting the NFS share.

I haven't tried building it on a different host, I don't have access to 
multiple RPis. Also, if I build the binary, umount/remount the NFS mount 
point, which has the binary, execute it, then it works.

I've also tried this with the raspbsd.org's image, I could reproduce it 
as well.

Another interesting thing is, when I first booted the RPi up, the NFS 
server was a 10.2-STABLE, and later got updated to 11-STABLE. While it 
was 10.2 I've tried to build some port, and I don't remember having this 
issue.

So, could someone please help me figure this out and fix it? This stuff 
should work pretty much.


>
> I have no idea what's causing it, it should pretty much work out of 
> the box. Could someone please explain me what's going on here, what's 
> causing it and how can I fix it?
>
> Best regards,
> -czg
>
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to 
> "freebsd-current-unsubscribe_at_freebsd.org"
Received on Thu Mar 09 2017 - 12:20:47 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC