#2230: 'g.region -p' writes new WIND file, causes race condition for parallel jobs ----------------------+----------------------------------------------------- Reporter: hamish | Owner: grass-dev@… Type: defect | Status: new Priority: normal | Milestone: 6.4.4 Component: Default | Version: svn-develbranch6 Keywords: g.region | Platform: Linux Cpu: x86-64 | ----------------------+----------------------------------------------------- Hi,
In tracking down some strangeness I've just noticed that 'g.region -p' or 'g.region -g' writes out a new (unchanged) WIND file whenever it runs. This is a problem when you have many jobs working in parallel and a bunch of them starting at the same time all call 'eval `g.region -g`' at the start of their scripts. About 5% of the time I'm hitting the file before it is completely written and the unfortunate g.region G_fatal_error()s with a missing projection parameter or similar. one solution is to not open the WIND file for writing if just read-only command line terms are given, another is to write to a .tmp file and move it into place atomically. Hamish -- Ticket URL: <https://trac.osgeo.org/grass/ticket/2230> GRASS GIS <http://grass.osgeo.org> _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev