[GRASS-dev] G7: endless loop with NFS mounted grassdata: libgis.G_mapset_permissions() problem

Markus Neteler neteler at osgeo.org
Wed Feb 4 09:59:44 PST 2015


Hi,

we are currently stuck with a problem which prevents t.create from
concluding its job.
We run GRASS 7.1 in the office and mount /grassdata via NFS3 from our
cluster frontend machine.

With strace we got an idea where the problem is. Note that the user is
not operating in the mapset "lexem_matteo" cited below nor is it in
the mapset search path but it simply exists in the same location which
we share among our group:

GRASS 7.1.svn (eu_laea): >
strace t.create output=Tdaily_modis_hants type=strds semantictype=mean
temporaltype=absolute title="daily temperature from Mod lst hants"
description="daily T from hants on modis lst"
...
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
[...]
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
getuid()                                = 10014
stat("/grassdata/eu_laea/lexem_matteo", {st_mode=S_IFDIR|0755,
st_size=4096, ...}) = 0
[...]
^CTraceback (most recent call last):
  File "/usr/local/grass-7.1.svn/scripts/t.create", line 84, in <module>
    main()
  File "/usr/local/grass-7.1.svn/scripts/t.create", line 77, in main
    tgis.init()
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/core.py",
line 593, in init
Process Process-1:
Process Process-2:
Traceback (most recent call last):
Traceback (most recent call last):
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in
_bootstrap
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 232, in
_bootstrap
    self.run()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/grass-7.1.svn/etc/python/grass/pygrass/messages/__init__.py",
line 65, in message_server
    self.run()
  File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 769, in c_library_server
    conn.poll(None)
KeyboardInterrupt
    dbif = SQLDatabaseInterfaceConnection()
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/core.py",
line 839, in __init__
    self.tgis_mapsets = get_available_temporal_mapsets()
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/core.py",
line 439, in get_available_temporal_mapsets
    mapsets = c_library_interface.available_mapsets()
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 1220, in available_mapsets
    return self.client_conn.recv()
KeyboardInterrupt
    functions[data[0]](lock, conn, data)
  File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 159, in _available_mapsets
    if libgis.G_mapset_permissions(mapset) > 0:
KeyboardInterrupt


The ID of the actual user is 10014.

PROBLEM:
The issue happens in line 142
lib/python/temporal/c_libraries_interface.py

function def _available_mapsets(lock, conn, data):

where a while loop is used. The issue is apparently caused by the fact
that in our current cluster setup, after reinstallation, the NFS
daemon doesn't properly map the user ID's to the local workstation in
the office where not all users are existing. While we have to fix
this, it should not lead to an endless loop:
Apparently libgis.G_mapset_permissions() does not behave properly for
this NFS case. It should be able to leave the while loop rather than
getting stuck there.

# example for one of our NFS mounted directories as seen on the office
workstation:
ls -la /grassdata/eu_laea/lexem_matteo
total 312
drwxr-xr-x  13 10012 gis   4096 Jan 17 16:09 .
drwxrwxr-x 125  1338 gis  16384 Feb  3 18:35 ..
-rw-------   1 10012 gis 122050 Jan  1 18:26 .bash_history
-rw-r--r--   1 10012 gis   1949 Jan 17 16:09 .bashrc
drwxr-xr-x   2 10012 gis  20480 Dec 27 14:22 cats
drwxr-xr-x   2 10012 gis  20480 Dec 27 14:22 cell
drwxr-xr-x   2 10012 gis  20480 Dec 27 14:22 cellhd
drwxr-xr-x  19 10012 gis  20480 Dec 27 14:22 cell_misc
...

--> user IDs not transmitted, our problem, but
libgis.G_mapset_permissions() doesn't deal with it properly (or def
_available_mapsets()).

Help welcome,
thanks,

Markus


More information about the grass-dev mailing list