tmpfs corrupt file (aarch64/12.0-ALPHA5)

From: Ronald Klop <ronald_at_klop.ws>
Date: Thu, 25 Oct 2018 15:13:36 +0200
Hello,

I'm running this small script which generates changelog file in gzipped  
JSON format.

TMPDIR=/var/tmp
START=1
END=$(( $START + $STEP - 1 ))
while test $START -lt 300000
do
         svnlite log --xml -r $START:$END -v ~/src/freebsd-base >  
$TMPDIR/bla.xml
         bin/xml2json.py > $TMPDIR/commits.$START-$END.json
         gzip -f $TMPDIR/commits.$START-$END.json
         START=$(( $START + $STEP ))
         END=$(( $START + $STEP - 1 ))
done

So $TMPDIR/bla.xml is overwritten every iteration.
Well:
- If $TMPDIR=/var/tmp which is on UFS the script works.
- If %TMPDIR=/tmp which is tmpfs the xml2json.py script very often gives  
errors about the XML structure of bla.xml like if the file is truncated or  
empty.

So it looks like something is happening on tmpfs that the data is not yet  
'synced'. Can this be a threading/cpu-cache issue on aarch64?

This is on an RPI3B+.
FreeBSD rpi3 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 #5 r338616: Wed Sep 12  
22:23:05 CEST 2018      
builder_at_rpi3:/data/src/obj-head/data/src/head/arm64.aarch64/sys/GENERIC-NODEBUG   
arm64

Can I do more testing or provide more information before creating a PR  
about this?

Regards,
Ronald.
Received on Thu Oct 25 2018 - 11:13:44 UTC

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