[postgis-tickets] [PostGIS] #3429: upgrade from 2.1.3 to 2.2+ enters infinite loop
PostGIS
trac at osgeo.org
Thu Feb 25 11:33:07 PST 2016
#3429: upgrade from 2.1.3 to 2.2+ enters infinite loop
------------------------------------+---------------------------
Reporter: strk | Owner: strk
Type: defect | Status: new
Priority: blocker | Milestone: PostGIS 2.2.2
Component: build/upgrade/install | Version: 2.2.x
Resolution: | Keywords:
------------------------------------+---------------------------
Comment (by strk):
As of r14698 I can still enter the infinite loop.
Attaching the looping process with gdb shows this backtrace:
{{{
Program received signal SIGINT, Interrupt.
rt_set_handlers (allocator=0x7fa43f5315f0 <rt_pg_alloc>,
reallocator=0x7fa43f531610 <rt_pg_realloc>, deallocator=0x7fa43f531600
<rt_pg_free>,
error_handler=0x7fa43f531c00 <rt_pg_error>,
info_handler=0x7fa43f531b60 <rt_pg_debug>, warning_handler=0x7fa43f531ac0
<rt_pg_notice>)
at rt_context.c:161
161 ctx_t.info = info_handler;
(gdb) bt
#0 init_rt_allocator (size=5856) at rt_api.c:880
#1 0x00007fa43822f5fc in rt_raster_gdal_drivers
(drv_count=drv_count at entry=0x7fff8425088c, cancc=cancc at entry=0 '\000') at
rt_api.c:8975
#2 0x00007fa438204283 in rtpg_assignHookGDALEnabledDrivers () at
rt_pg.c:172
#3 _PG_init () at rt_pg.c:291
#4 0x000000000075b8a2 in internal_load_library
(libname=libname at entry=0x2324f78
"/home/postgresql-9.3.4/lib/rtpostgis-2.1.so") at dfmgr.c:284
#5 0x000000000075c2b3 in load_external_function
(filename=filename at entry=0x2324f40 "$libdir/rtpostgis-2.1",
funcname=funcname at entry=0x2324f08 "RASTER_lib_version",
signalNotFound=signalNotFound at entry=1 '\001',
filehandle=filehandle at entry=0x7fff84250a28) at dfmgr.c:113
}}}
That shows 2.1 library being loaded and its _PG_init being called.
The 2.1 _PG_init in turn calls rtpg_assignHookGDALEnabledDrivers which
calls rt_raster_gdal_drivers
in the 2.1 rt_core library which calls init_rt_allocator in the same (2.1)
library.
BUT, the interrupt is intercepted by "rt_set_handlers" coming from the
_2.3_ library, because "rt_context.c" was not available in 2.1.
Now, ""init_rt_allocator" (in 2.1 pg_core) calls "rt_init_allocators".
The "rt_init_allocators" is in the "rt_pg" library so cannot be resolved
at compile time because is just NOT DEFINED when the rt_core library is
built. It is thus resolved at run time and ends up finding the one from
"2.3" library, generating the mess.
The --exclude-libs switch doesn't help because the symbol being looked for
just CANNOT BE internal.
This is my late-evening analisys.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3429#comment:26>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list