Source: pdns-recursor
Version: 4.1.0-1
Severity: serious
Tags: sid buster patch

Hi,

pdns-recursor FTBFS on mips64el due segfaulting (or another crash) while
executing the mtasker tests.

Build log (exit status 139 = SIGSEGV):
> Checking bad value for record type SOA test #1
> FAIL testrunner (exit status: 139)

Similar errors occur on other architectures which might be related to
the failure on mips64el, but I did not investigate those.

On mips64el the crash comes as a result of throwing an exception in the
willThrow function in test-mtasker.cc. Throwing an exception makes a
call into the stack unwinder in libgcc which uses enough stack space to
overflow the stack allocated for the currently running task. In this
case, it just so happens that the return ucontext gets overwritten by
the stack overflow and after returning from threadWrapper, we jump to
some garbage memory location.

The attached patch fixes this by increasing the stack size for all 128k
for all tasks.

The 32-bit build failures are related to #887030.

Thanks,
James
--- a/mtasker.hh
+++ b/mtasker.hh
@@ -110,7 +110,7 @@ public:
       This limit applies solely to the stack, the heap is not limited in any way. If threads need to allocate a lot of data,
       the use of new/delete is suggested. 
    */
-  MTasker(size_t stacksize=8192) : d_tid(0), d_maxtid(0), d_stacksize(stacksize), d_waitstatus(Error)
+  MTasker(size_t stacksize=16*8192) : d_tid(0), d_maxtid(0), d_stacksize(stacksize), d_waitstatus(Error)
   {
     initMainStackBounds();
   }

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to