Bug #438

Test grdmath/ops.sh fails because of corrupted gmt.history

Added by Florian about 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:2013-11-12
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:Candidate for next bugfix release
Affected version:5.x-svn Platform:Linux

Description

Fails with "pstext: Found no history for option -R" and this gmt.history:

# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
B       ^^0
J       X
JX      X3i
R       -2/2/-2/2
Y       7.5i
L       1
END
gmt.history is corrupted by grdimage:

gmt xyz2grd -GA.grd -R-2/2/-2/2 -I1 -N0
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdmath A.grd CURV = B.grd
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdmath A.grd D2DX2 = C.grd
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdmath A.grd D2DY2 = D.grd
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdmath A.grd D2DX2 A.grd D2DY2 ADD = E.grd
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdmath A.grd EXTREMA = F.grd
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt makecpt -Cpolar -T-4/5/1
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
R    -2/2/-2/2
END
---
gmt grdimage A.grd -Ct.cpt -JX3i -B0 -P -K -Y7.5i
# GMT 5 Session common arguments shelf
BEGIN GMT 5.1.1
B    0
J    X
JX    X3i
R    -2/2/-2/2
Y    7.5i
L    1
END
---
pstext: Found no history for option -R

History

#1 Updated by Paul about 4 years ago

  • Status changed from New to Feedback

From time to time these hiccups occur. For some reason, the system was busy writing/closing that file when pstext started up. I suspect this is not reproducible? I.e., running ctest -R ops.sh mostly works? It is related to issue #437. Remko might remember the history better here but there were issues with file locking on NFS-mounted volumes that made us introduce the OFF default. It is for the same reason things like map project -Rw/e/s/n ... | psxy -R -J ... > t.ps fails as the start order of the two processes is not guaranteed, so they may fight over gmt.history. If you do consistently get errors with ctest on this script, try adding a sleep 1 line between grdimage and pstext just to see if this makes a difference.

#2 Updated by Florian about 4 years ago

For some reason, the system was busy writing/closing that file when pstext started up.

This should never ever happen with file locking enabled (given local filesystem).

I suspect this is not reproducible?

Always (on gmtserver). Can you have a look?

there were issues with file locking on NFS-mounted volumes that made us introduce the OFF default.

Indeed, this can happen with buggy NFS implementations. Recent Linux should be fine though. In any case turning file locking off will not fix things with NFS. So why would you want to do that (#437)?

#3 Updated by Paul about 4 years ago

  • Status changed from Feedback to Resolved

Restrict the use of Record Separator (ASCII 30) to only be between args and not at the beginning of args. Seems to fix it, let me know. In r12498.

#4 Updated by Paul almost 4 years ago

  • Status changed from Resolved to Closed

Closing this issue

Also available in: Atom PDF