Patrik Lundin <pat...@sigterm.se> writes: > On Wed, Jun 24, 2015 at 07:10:33AM +0200, Patrik Lundin wrote: >> >> The summary for now looks like this: >> Working: amd64, sparc64 >> Broken: i386, macppc >> >> Is there some relation between threading and 32/64 bit? It is the main >> thing that sticks out currently, since sparc64 rules out an endian issue >> as far as i can tell. >>
Hi Patrik. Sorry if I kinda ignored this opendnssec problem, I couldn't find a solution quickly enough. > > So there might be some light at the end of the opendnssec tunnel. > I have noticed that the thread stack size is smaller on i386 than it is > on amd64 using this code snippet: > --- > #include <stdio.h> > #include <pthread.h> > > pthread_attr_t attr; > size_t stacksize; > > int main (){ > pthread_attr_init(&attr); > pthread_attr_getstacksize(&attr, &stacksize); > > printf("stacksize: %d\n", stacksize); > > return 0; > } > --- > > While amd64 and sparc64 reports 524288, i386 says 262144. It looks like I have > been able to stop opendnssec from crashing by modifying a wrapper function to > pass an attribute variable to pthread_create(), increasing the stack size: > --- > pthread_attr_t attr; > size_t stacksize; > pthread_attr_init(&attr); > pthread_attr_getstacksize(&attr, &stacksize); > pthread_attr_setstacksize(&attr, stacksize * 2); > --- > > The above was inspired from this thread: > http://openbsd-archive.7691.n7.nabble.com/Default-Posix-thread-stack-size-td47465.html > > Anyway, I have sent a message regarding this to one of the nlnet people. I > will > report back with how things goes. I am not sure if this is the correct fix, or > if one should instead store less data on the stack or something. Very nice! Yes, asking upstream is the right thing to do. If they don't plan to do a release with that stack size problem addressed, I think it would be ok to import opendnssec with a temporary patch. -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE