{"comment":{"created_at":"2011-10-11T08:12:01Z","body":"[artem] Moving to 2.0.1","updated_at":"2011-10-11T08:12:01Z","url":"https://api.github.com/repos/mapnik-org/mapnik/issues/comments/2358620","id":2358620,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"}},"action":"created","issue":{"number":782,"created_at":"2011-10-11T08:11:55Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"Mapnik (trunk) seems to keep shapefiles open once it finishes with them which causes stale data to be rendered if the file is deleted and replaced with another one with the same name in the meantime. lsof confirms it:\r\n\r\n{{{\r\n# After rendering isocronas.shp:\r\nsigym@sigym-staging2:~$ md5sum /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\n7649e466bc4a8ff01d370de569a1fa87  /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\n# set ISOCRONAS_INODE to the inode of this file retrieved with stat\r\nsigym@sigym-staging2:~$ lsof | grep $ISOCRONAS_INODE\r\napache2    6614    sigym  mem       REG      202,6     68204 3132969133 /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\n# some process modifies isocronas.shp...\r\nmd5sum /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\n285b592e4f0130750e99e8ba88057107  /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\nsigym@sigym-staging2:~$ lsof | grep $ISOCRONAS_INODE\r\napache2    6614    sigym  DEL       REG      202,6           3132969133 /var/local/sigym/ctxs/propag_luis_k1c2dk/isocronas.shp\r\n# notice how apache2 still refers to the old and deleted file\r\n}}}\r\n\r\nIf apache is restarted then the correct shapefile is rendered. This regression was introduced somewhen after r2344 but I can't find the exact revision. Any clues?","comments":8,"title":"Shape plugin keeps stale references to deleted files","updated_at":"2011-10-11T08:12:01Z","url":"https://api.github.com/repos/mapnik-org/mapnik/issues/782","id":1872475,"assignee":null,"milestone":null,"closed_at":null,"user":{"avatar_url":"https://secure.gravatar.com/avatar/941f68386168a8a6b60f2529a7830af7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/artemp","id":59056,"login":"artemp"},"html_url":"https://github.com/mapnik-org/mapnik/issues/782","labels":[{"name":"Core_Library","url":"https://api.github.com/repos/mapnik-org/mapnik/labels/Core_Library","color":"FFFFFF"}],"state":"open"},"legacy":{"issue_id":1872475,"comment_id":2358620}}