#2337: t.list hangs on newly created temporal DB
-------------------------+--------------------------------------------------
Reporter: neteler | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Temporal | Version: svn-trunk
Keywords: t.list | Platform: Linux
Cpu: Unspecified |
-------------------------+--------------------------------------------------
t.list hangs when used on a newly created temporal DB which is still
empty:
{{{
GRASS 7.1.svn (eu_laea):~ > t.list -h
D1/1: grass.script.core.start_command(): t.connect -c
D1/1: grass.script.core.start_command(): t.connect -pg
D1/1: grass.script.core.start_command(): g.gisenv -n
D1/1: Start messenger server
D1/1: Initiate the temporal database
D1/1: SQLDatabaseInterfaceConnection constructor
D1/1: Start C-interface server
----------------------------------------------
D1/1: SQLDatabaseInterfaceConnection constructor
}}}
... then it hangs. CTRL-C "helps":
{{{
^CProcess Process-2:
Process Process-1:
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()
self.run()
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
File "/usr/lib64/python2.6/multiprocessing/process.py", line 88, in run
self._target(*self._args, **self._kwargs)
self._target(*self._args, **self._kwargs)
File
"/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 644, in c_library_server
File
"/usr/local/grass-7.1.svn/etc/python/grass/pygrass/messages/__init__.py",
line 73, in message_server
conn.poll(None)
KeyboardInterrupt
functions[data[0]](lock, conn, data)
File
"/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 65, in available_mapsets
if libgis.G__mapset_permissions(mapset) > 0:
KeyboardInterrupt
Traceback (most recent call last):
File "/usr/local/grass-7.1.svn/scripts/t.list", line 157, in <module>
main()
File "/usr/local/grass-7.1.svn/scripts/t.list", line 111, in main
stds_list = tgis.get_dataset_list(type, ttype, columns, where,
order)
File "/usr/local/grass-7.1.svn/etc/python/grass/temporal/list_stds.py",
line 73, in get_dataset_list
mapsets = get_tgis_c_library_interface().available_mapsets()
File
"/usr/local/grass-7.1.svn/etc/python/grass/temporal/c_libraries_interface.py",
line 1088, in available_mapsets
return self.client_conn.recv()
KeyboardInterrupt
}}}
Using strace:
{{{
strace t.list -h
...
D1/1: SQLDatabaseInterfaceConnection constructor
stat("/grassdata/eu_laea/PERMANENT/tgis/sqlite.db", {st_mode=S_IFREG|0644,
st_size=159744, ...}) = 0
open("/grassdata/eu_laea/PERMANENT/tgis/sqlite.db", O_RDWR|O_CREAT, 0644)
= 3
fcntl(3, F_GETFD) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=159744, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "SQLite format 3\0\4\0\1\1\0@ \0\0\0X\0\0\0\0"..., 100) = 100
fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741824,
len=1}) = 0
fcntl(3, F_SETLK, {type=F_RDLCK, whence=SEEK_SET, start=1073741826,
len=510}) = 0
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=1073741824,
len=1}) = 0
access("/grassdata/eu_laea/PERMANENT/tgis/sqlite.db-journal", F_OK) = -1
ENOENT (No such file or directory)
fstat(3, {st_mode=S_IFREG|0644, st_size=159744, ...}) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "SQLite format 3\0\4\0\1\1\0@ \0\0\0X\0\0\0\0"..., 1024) = 1024
lseek(3, 5120, SEEK_SET) = 5120
read(3,
"\r\0\0\0\1\0\376\0\0\376\3\305\0z\0z\0\0\0\0\0\0G\4\6\27[5\1\0in"...,
1024) = 1024
lseek(3, 6144, SEEK_SET) = 6144
read(3,
"\r\0\0\0\3\1\201\0\1\201\1\270\3\267\0014\0014\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
1024) = 1024
...
read(3,
"\r\0\0\0\6\0\300\0\0\300\1G\1\312\2/\2\320\3q\3u\0\0\0\0\0\0\0\0\0\0"...,
1024) = 1024
lseek(3, 149504, SEEK_SET) = 149504
read(3,
"\r\0\0\0\5\1_\0\1_\1\352\2G\2\340\3y\3\212\0\203\0\0\0\0\0\0\0\0\0\0"...,
1024) = 1024
lseek(3, 157696, SEEK_SET) = 157696
read(3,
"\r\0\0\0\5\1\301\0\2+\2\256\3$\3\222\1\301\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
1024) = 1024
fcntl(3, F_SETLK, {type=F_UNLCK, whence=SEEK_SET, start=0, len=0}) = 0
wait4(11171, 0x7fff6df96024, WNOHANG, NULL) = 0
write(7, "\0\0\0\t\200\2]q\1K\10a.", 13) = 13
read(7,
}}}
It is polling for something unknown...
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2337>
GRASS GIS <http://grass.osgeo.org>