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

Sandro Santilli strk at kbt.io
Tue Sep 27 01:22:03 PDT 2016


Author: strk
Date: 2016-09-27 01:22:02 -0700 (Tue, 27 Sep 2016)
New Revision: 15158

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

Closes #3644 for 2.2 branch

Modified: branches/2.2/NEWS
===================================================================
--- branches/2.2/NEWS	2016-09-27 08:12:03 UTC (rev 15157)
+++ branches/2.2/NEWS	2016-09-27 08:22:02 UTC (rev 15158)
@@ -32,6 +32,7 @@
           raster max extent constraint
   - #3640, interpolate_from_address sometimes results in "" invalid for numeric
   - #3641 tiger normalize, pagc_normalize integer out of range
+  - #3644 Deadlock on interrupt
   - Numerous documentation corrections from ruvyn
 
 

Modified: branches/2.2/postgis/postgis_module.c
===================================================================
--- branches/2.2/postgis/postgis_module.c	2016-09-27 08:12:03 UTC (rev 15157)
+++ branches/2.2/postgis/postgis_module.c	2016-09-27 08:22:02 UTC (rev 15158)
@@ -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