Simple program immediately killed when running on a NFS

Andrew Turner andrew at fubar.geek.nz
Sun Mar 5 11:25:55 UTC 2017


> On 5 Mar 2017, at 10:09, Otacílio <otacilio.neto at bsd.com.br> wrote:
> 
> Em 05/03/2017 06:48, Eduardo Morras via freebsd-hackers escreveu:
>> On Sat, 4 Mar 2017 23:29:57 -0300
>> Otacílio <otacilio.neto at bsd.com.br> wrote:
>> 
>>> Dears
>>> 
>>> I'm trying to compile a simple hello world program on my RPI3. The
>>> program is on a directory mounted using NFS and stored in the amd64
>>> machine. When I compile and try to run the program in the NFS mounted
>>> path it does not work, when I copy the same program to a local dir it
>>> work, and then when I copy the program from the local dir to the NFS
>>> dir it works !? !?!?! Someone can, please, explain it? Look at the
>>> historic program.
>> I assume you crosscompiled it to arm, but .. DId you static linked it? If not, it gets requiered .so from nfs server and crash, becuase they are amd64 binary.
>> 
>> 
>> 
> 
> I'm not compiling using the server tools. I'm compiling using the RPI3 tools inside the RPI3. The server is only exporting the /usr/ports. I mounted this on PRI3 /usr/ports and I'm compiling using the RPI3 clang. On this same scenario, when using a BBB this works.

I’ve seen this on a ThunderX in the netsurf cluster. It seems to be getting the check in [1] (CC’d the author of said code). Building as a static binary doesn’t affect it.

I’ve added debugging to & found np->n_mtime and np->n_vattr.na_mtime can be out by up to a few seconds. Even when the second is the same, the tv_nsec value are different, however I don’t know the nfs code well enough to know where these values come from.

Andrew

[1] http://fxr.watson.org/fxr/source/fs/nfsclient/nfs_clbio.c#L1633


More information about the freebsd-hackers mailing list