[Ur] cygwin, pthread_attr_init failed

Adam Chlipala adamc at csail.mit.edu
Mon Oct 14 08:10:52 EDT 2013


I've pushed a slightly different change to the public repo.  Your patch 
disables support for setting the stack size, but mine instead avoids 
making the fancier kind of call only when the user hasn't requested a 
custom stack size anyway.  It should still work in UNIX-land when 
someone does want to set the stack size.

Does my patch fix the problem?

On 10/14/2013 06:48 AM, Sergey Mironov wrote:
> I've prepared the patch containing the hack from my previous letter.
>
>      https://github.com/grwlf/uru/blob/master/urweb/1_of_1_CYGWIN_HACK__disable_stack_size_option.patch
>
> 2013/10/14 Sergey Mironov<grrwlf at gmail.com>:
>    
>> Hi. I've tried to build apps under cygwin and faced pthread issue. The
>> application issued the following error:
>>
>> $ ./AppMM.exe
>> Database connection initialized.
>> Unlimited retry during init: Couldn't allocate new heap chunk contiguously; incr
>> Unlimited retry during init: Couldn't allocate new heap chunk contiguously; incr
>> Unlimited retry during init: Couldn't allocate new heap chunk contiguously; incr
>> Listening on port 8080....
>> Database connection initialized.
>> Error creating worker thread #0
>>
>> ..
>> and quits
>>
>> Quick investigation showed that something goes wrong inside
>> pthread_attr_init() function called from pthread_create_big()
>> (src/c/request.c). It returns error code 16 (EBUSY?). I didn't find
>> any clean reasons for that. I was able to run the application by
>> commenting out all the custom stack size logic and calling
>> pthread_create with default attributes regardless of user settings.
>> Any suggestions?
>>      



More information about the Ur mailing list