[GRASS-dev] [GRASS GIS] #3693: Issue with G76 in docker: creating a location fails

GRASS GIS trac at osgeo.org
Sat Nov 10 07:59:33 PST 2018


#3693: Issue with G76 in docker: creating a location fails
----------------------+---------------------------------
  Reporter:  neteler  |      Owner:  grass-dev@…
      Type:  defect   |     Status:  new
  Priority:  normal   |  Milestone:  7.4.3
 Component:  Startup  |    Version:  svn-releasebranch76
Resolution:           |   Keywords:  docker g.proj
       CPU:  x86-64   |   Platform:  Linux
----------------------+---------------------------------
Changes (by neteler):

 * keywords:  docker => docker g.proj
 * platform:  Unspecified => Linux
 * component:  Python => Startup
 * cpu:  Unspecified => x86-64
 * cc: carmenTawalika (added)


Comment:

 (I am a bit verbose here in order to show the debugging within docker)

 Replying to [comment:1 mmetz]:
 > I disagree, the mapset should have been created by g.proj:
 >
 https://trac.osgeo.org/grass/browser/grass/branches/releasebranch_7_6/lib/python/script/core.py#L1515

 > ...
 > You need to find out why g.proj called by create_location() has not
 created the location with mapset PERMANENT
 (/actinia_core/grassdb/latlongtest/PERMANENT)

 I see, thanks for the hint. So I get (wow!):

 {{{
 GRASS 7.6.svn (latlongtest3):/grassdb > g.proj -t epsg=4326
 location=location
 Illegal instruction (core dumped)
 }}}

 Trying with gdb in docker:

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

 (gdb) r -t epsg=4326 location=location
 Starting program: /usr/local/grass-7.6.svn/bin/g.proj -t epsg=4326
 location=location
 warning: Error disabling address space randomization: Operation not
 permitted
 warning: Could not trace the inferior process.
 Error:
 warning: ptrace: Operation not permitted
 During startup program exited with code 127.
 }}}

 Following http://visualgdb.com/gdbreference/commands/set_disable-
 randomization I get
 {{{
 (gdb) set disable-randomization off
 (gdb) r -t epsg=4326 location=location
 Starting program: /usr/local/grass-7.6.svn/bin/g.proj -t epsg=4326
 location=location
 warning: Could not trace the inferior process.
 Error:
 warning: ptrace: Operation not permitted
 During startup program exited with code 127.
 }}}

 Normally one has to use `docker run --cap-add=SYS_PTRACE ...` but we use
 docker-compose here, so that goes into the related .yml file
 ([https://stackoverflow.com/a/51530034/452464 hint]).

 Now debugging is enabled:
 {{{
 (gdb) r -t epsg=4326 location=location
 Starting program: /usr/local/grass-7.6.svn/bin/g.proj -t epsg=4326
 location=location
 [Thread debugging using libthread_db enabled]
 Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

 Program received signal SIGILL, Illegal instruction.
 0x00007ffff7bced1e in read_datum_table () from
 /usr/local/grass-7.6.svn/lib/libgrass_gproj.7.6.svn.so
 (gdb) bt full
 #0  0x00007ffff7bced1e in read_datum_table () from
 /usr/local/grass-7.6.svn/lib/libgrass_gproj.7.6.svn.so
 No symbol table info available.
 #1  0x00007ffff7bcde4b in GPJ_osr_to_grass () from
 /usr/local/grass-7.6.svn/lib/libgrass_gproj.7.6.svn.so
 No symbol table info available.
 #2  0x0000555555557dab in input_epsg ()
 No symbol table info available.
 #3  0x0000555555556d57 in main ()
 No symbol table info available.
 }}}

 Trying with strace:

 {{{
 GRASS 7.6.svn (latlongtest3):/grassdb > strace g.proj -t epsg=4326
 location=location
 ...
 futex(0x7fecb07d73a4, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 stat("/usr/share/gdal/2.2/gcs.csv", {st_mode=S_IFREG|0644, st_size=53326,
 ...}) = 0
 openat(AT_FDCWD, "/usr/share/gdal/2.2/gcs.csv", O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=53326, ...}) = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 4096) = 4096
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 4096) = 4096
 brk(0x5632c9f8b000)                     = 0x5632c9f8b000
 fstat(3, {st_mode=S_IFREG|0644, st_size=53326, ...}) = 0
 lseek(3, 53248, SEEK_SET)               = 53248
 read(3, "Helena Geodetic Datum 2015,1174,"..., 4096) = 78
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 53248) = 53248
 read(3, "Helena Geodetic Datum 2015,1174,"..., 4096) = 78
 close(3)                                = 0
 stat("/usr/share/gdal/2.2/gcs.override.csv", {st_mode=S_IFREG|0644,
 st_size=513, ...}) = 0
 openat(AT_FDCWD, "/usr/share/gdal/2.2/gcs.override.csv", O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 4096) = 513
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 4096) = 513
 fstat(3, {st_mode=S_IFREG|0644, st_size=513, ...}) = 0
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "\"COORD_REF_SYS_CODE\",\"COORD_REF_"..., 4096) = 513
 lseek(3, 513, SEEK_SET)                 = 513
 close(3)                                = 0
 stat("/usr/share/gdal/2.2/ellipsoid.csv", {st_mode=S_IFREG|0644,
 st_size=14365, ...}) = 0
 openat(AT_FDCWD, "/usr/share/gdal/2.2/ellipsoid.csv", O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=14365, ...}) = 0
 read(3, "ellipsoid_code,ellipsoid_name,se"..., 4096) = 4096
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "ellipsoid_code,ellipsoid_name,se"..., 4096) = 4096
 fstat(3, {st_mode=S_IFREG|0644, st_size=14365, ...}) = 0
 lseek(3, 12288, SEEK_SET)               = 12288
 read(3, "been used in Danish work.,\"Kort "..., 4096) = 2077
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "ellipsoid_code,ellipsoid_name,se"..., 12288) = 12288
 read(3, "been used in Danish work.,\"Kort "..., 4096) = 2077
 close(3)                                = 0
 stat("/usr/share/gdal/2.2/gdal_datum.csv", {st_mode=S_IFREG|0644,
 st_size=234839, ...}) = 0
 openat(AT_FDCWD, "/usr/share/gdal/2.2/gdal_datum.csv", O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=234839, ...}) = 0
 read(3, "\"DATUM_CODE\",\"DATUM_NAME\",\"DATUM"..., 4096) = 4096
 lseek(3, 0, SEEK_SET)                   = 0
 read(3, "\"DATUM_CODE\",\"DATUM_NAME\",\"DATUM"..., 4096) = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 lseek(3, 4096, SEEK_SET)                = 4096
 read(3, "seau_Geodesique_de_la_RDC_2005\"\n"..., 4096) = 4096
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 lseek(3, 8192, SEEK_SET)                = 8192
 read(3, "1982-01-01,7024,8901,3228,Topogr"..., 4096) = 4096
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 lseek(3, 12288, SEEK_SET)               = 12288
 read(3, "al Reference Frame,geodetic,ITRF"..., 4096) = 4096
 lseek(3, 8192, SEEK_SET)                = 8192
 ...
 read(3, "Santa Maria de Ipire,engineering"..., 4096) = 1367
 lseek(3, 229376, SEEK_SET)              = 229376
 read(3, ". Latitude: 40.835864 grads N, l"..., 4096) = 4096
 read(3, "Santa Maria de Ipire,engineering"..., 4096) = 1367
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 lseek(3, 234839, SEEK_SET)              = 234839
 read(3, "", 4096)                       = 0
 lseek(3, 0, SEEK_CUR)                   = 234839
 read(3, "", 4096)                       = 0
 lseek(3, 0, SEEK_CUR)                   = 234839
 close(3)                                = 0
 openat(AT_FDCWD, "/usr/local/grass-7.6.svn/etc/proj/datum.table",
 O_RDONLY) = 3
 fstat(3, {st_mode=S_IFREG|0644, st_size=5725, ...}) = 0
 read(3, "# Datum Transformation Parameter"..., 4096) = 4096
 --- SIGILL {si_signo=SIGILL, si_code=ILL_ILLOPN, si_addr=0x7fecb0a2ed1e}
 ---
 +++ killed by SIGILL (core dumped) +++
 Illegal instruction (core dumped)
 }}}

 Quite confusing for me. The file starts like this:
 {{{
 head /usr/local/grass-7.6.svn/etc/proj/datum.table
 # Datum Transformation Parameter Lists for GRASS
 # (single 3-parameter datum transformation))
 #
 # This file contains datum shift parameters,
 # it supplies a datum database table for GRASS
 ...
 }}}

 The version used here is:
 {{{
 GRASS 7.6.svn (latlongtest3):/grassdb > g.version -rbe
 GRASS 7.6.svn (2018)

  ./configure  --enable-largefile --with-cxx --with-nls --with-readline
 --with-sqlite --with-bzlib --with-zstd --with-cairo --with-cairo-
 ldflags=-lfontconfig --with-freetype --with-freetype-
 includes=/usr/include/freetype2/ --with-fftw --with-netcdf --with-liblas
 --with-liblas-config=/usr/bin/liblas-config --with-pdal --with-proj
 --with-proj-share=/usr/share/proj --with-geos=/usr/bin/geos-config --with-
 postgres --with-postgres-includes=/usr/include/postgresql --with-opengl-
 libs=/usr/include/GL
 libgis Revision: 72327
 libgis Date: 2018-03-06 12:12:44 +0100 (Tue, 06 Mar 2018)
 PROJ.4: 4.9.3
 GDAL/OGR: 2.2.3
 GEOS: 3.6.2
 SQLite: 3.22.0

 uname -a
 Linux d30387cd7649 4.4.0-133-generic #159-Ubuntu SMP Fri Aug 10 07:31:43
 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
 }}}

 Honestly, I have no idea what's wrong.

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



More information about the grass-dev mailing list