[postgis-tickets] r15159 - Do not call printf from interrupt handler, fixing deadlocks

Sandro Santilli strk at kbt.io
Tue Sep 27 01:23:51 PDT 2016


Author: strk
Date: 2016-09-27 01:23:50 -0700 (Tue, 27 Sep 2016)
New Revision: 15159

Modified:
   branches/2.1/NEWS
   branches/2.1/postgis/postgis_module.c
Log:
Do not call printf from interrupt handler, fixing deadlocks

Closes #3644 for 2.1 branch

Modified: branches/2.1/NEWS
===================================================================
--- branches/2.1/NEWS	2016-09-27 08:22:02 UTC (rev 15158)
+++ branches/2.1/NEWS	2016-09-27 08:23:50 UTC (rev 15159)
@@ -33,6 +33,7 @@
   - #3607, Fix inconsistency with multilinestring in
            ST_LocateBetweenElevations (Artur Zakirov)
   - #3608, Fix crash passing -W UTF-8 to shp2pgsql (Matt Amos)
+  - #3644 Deadlock on interrupt
 
 
 PostGIS 2.1.8

Modified: branches/2.1/postgis/postgis_module.c
===================================================================
--- branches/2.1/postgis/postgis_module.c	2016-09-27 08:22:02 UTC (rev 15158)
+++ branches/2.1/postgis/postgis_module.c	2016-09-27 08:23:50 UTC (rev 15159)
@@ -114,7 +114,12 @@
 static void
 handleInterrupt(int sig)
 {
-  printf("Interrupt requested\n"); fflush(stdout);
+  /* NOTE: printf here would be dangerous, see
+   * https://trac.osgeo.org/postgis/ticket/3644
+   *
+   * TODO: block interrupts during execution, to fix the problem
+   */
+  /* printf("Interrupt requested\n"); fflush(stdout); */
 
 #if POSTGIS_GEOS_VERSION >= 34 
   GEOS_interruptRequest();



More information about the postgis-tickets mailing list