[GRASS-dev] [GRASS GIS] #3841: script/core.py: create_location() fails with FileNotFoundError: [Errno 2] No such file or directory: '/tmp/grass7-root-94/tmploc/PERMANENT/MYNAME'

GRASS GIS trac at osgeo.org
Fri May 10 01:24:27 PDT 2019


#3841: script/core.py: create_location() fails with FileNotFoundError: [Errno 2]
No such file or directory: '/tmp/grass7-root-94/tmploc/PERMANENT/MYNAME'
----------------------+-------------------------------
  Reporter:  neteler  |      Owner:  grass-dev@…
      Type:  defect   |     Status:  new
  Priority:  normal   |  Milestone:  7.8.0
 Component:  Python   |    Version:  svn-trunk
Resolution:           |   Keywords:  python3, grass.py
       CPU:  x86-64   |   Platform:  Linux
----------------------+-------------------------------

Comment (by neteler):

 Confirmed, that PERMANENT isn't there (would be cool if core.py could say
 so...).

 After further debugging: The reason is indeed a crash of g.proj:

 {{{
 root at cea3e6ed4c0c:/grassdb# grass --tmp-location EPSG:25832 --exec
 g.version -gb
 Starting GRASS GIS...
 Creating new GRASS GIS location <tmploc>...
 >
 /usr/local/grass77/etc/python/grass/script/core.py(1584)create_location()
 -> try:
 (Pdb) s
 >
 /usr/local/grass77/etc/python/grass/script/core.py(1585)create_location()
 -> fd = open(os.path.join(dbase, location, 'PERMANENT', 'MYNAME'),
 (Pdb)
 [1]+  Stopped                 grass --tmp-location EPSG:25832 --exec
 g.version -gb

 root at cea3e6ed4c0c:/grassdb# l /tmp/
 grass7-root-50/  simple.laz

 root at cea3e6ed4c0c:/grassdb# l /tmp/grass7-root-50/
 gisrc
 }}}

 Test with an existing location:

 {{{
 GRASS 7.7.svn (nc_basic_spm_grass7):/grassdb > g.proj -t epsg=25832
 location=myloc
 Illegal instruction (core dumped)
 }}}

 PROJ Version in this Ubuntu docker:

 {{{
 cs2cs -v
 Using from definition:
 Rel. 4.9.3, 15 August 2016

 GRASS 7.7.svn (nc_basic_spm_grass7):/grassdb > ldd
 /usr/local/grass77/bin/g.proj | grep proj
         libgrass_gproj.7.7.so =>
 /usr/local/grass77/lib/libgrass_gproj.7.7.so (0x00007f4b04011000)
         libproj.so.12 => /usr/lib/x86_64-linux-gnu/libproj.so.12
 (0x00007f4b0294a000)
 }}}


 GNU Debugger:

 {{{
 GRASS 7.7.svn (nc_basic_spm_grass7):/grassdb > gdb g.proj
 GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git

 (gdb) r -t epsg=25832 location=myloc
 Starting program: /usr/local/grass77/bin/g.proj -t epsg=25832
 location=myloc
 warning: Error disabling address space randomization: Operation not
 permitted
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
 [New Thread 0x7f5b60c7c700 (LWP 193)]
 [New Thread 0x7f5b6047b700 (LWP 194)]
 [New Thread 0x7f5b5dc7a700 (LWP 195)]
 [New Thread 0x7f5b59479700 (LWP 196)]
 [New Thread 0x7f5b56c78700 (LWP 197)]
 [New Thread 0x7f5b54477700 (LWP 198)]
 [New Thread 0x7f5b53c76700 (LWP 199)]

 Thread 1 "g.proj" received signal SIGILL, Illegal instruction.
 0x00007f5b77d18b7e in read_datum_table () from
 /usr/local/grass77/lib/libgrass_gproj.7.7.so
 (gdb) bt full
 #0  0x00007f5b77d18b7e in read_datum_table () from
 /usr/local/grass77/lib/libgrass_gproj.7.7.so
 No symbol table info available.
 #1  0x00007f5b77d17d0b in GPJ_osr_to_grass () from
 /usr/local/grass77/lib/libgrass_gproj.7.7.so
 No symbol table info available.
 #2  0x00005621585e8ceb in input_epsg ()
 No symbol table info available.
 #3  0x00005621585e7de3 in main ()
 No symbol table info available.
 }}}

 Installed PROJ related packages:
 {{{
 dpkg-query -l | grep proj
 ii  libproj-dev:amd64                  4.9.3-2
 amd64        Cartographic projection library (development files)
 ii  libproj12:amd64                    4.9.3-2
 amd64        Cartographic projection library
 ii  proj-data                          4.9.3-2
 all          Cartographic projection filter and library (datum package)

 # the datum files are apparently installed:

 apt-file list proj-data
 proj-data: /usr/share/doc/proj-data/AUTHORS
 proj-data: /usr/share/doc/proj-data/NEWS.Debian.gz
 proj-data: /usr/share/doc/proj-data/NEWS.gz
 [...]
 proj-data: /usr/share/proj/alaska
 proj-data: /usr/share/proj/conus
 proj-data: /usr/share/proj/epsg
 [...]
 }}}

 I have no clue why g.proj crashes here.

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



More information about the grass-dev mailing list