[GRASS-dev] [GRASS GIS] #3309: Avoid errors in parallel creation of tempfiles

GRASS GIS trac at osgeo.org
Tue Mar 7 02:05:41 PST 2017


#3309: Avoid errors in parallel creation of tempfiles
--------------------------+---------------------------------
  Reporter:  sbl          |      Owner:  grass-dev@…
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  7.2.1
 Component:  LibGIS       |    Version:  svn-releasebranch72
Resolution:               |   Keywords:  G_tempfile()
       CPU:  Unspecified  |   Platform:  Unspecified
--------------------------+---------------------------------

Comment (by mlennert):

 Replying to [ticket:3309 sbl]:
 > When tempfiles are created in parallel, conflicts and thus fatal errors
 can arise when two processes try to create the .tmp/HOST dir at the same
 time:
 > https://lists.osgeo.org/pipermail/grass-dev/2017-March/084471.html
 >
 > The conflict seems to arise only from the directory.
 >
 > So, maybe it could help if the directory is created at the start of a
 GRASS session and removed only when the GRASS session is closed (exit)?

 Now that you mention it, I can confirm that I've also been confronted to
 such errors when running commands in parallel that create temp files. So
 +1 to needing a solution.

 I don't know though if the best is to create this directory once and for
 all at the startup, or whether the tempfile routines in lib/gis/tempfile.c
 could be modified to avoid such race conditions.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3309#comment:1>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list