Hi,
I'm experimenting some "random hangs" with my latest builds of cocoa cog (any jit version, I don't know jet if stack too)
The application was hanging (but not crashing) each X random time and with no information, even running with gdb. After a while testing, I found that the problem was gere:
/* sleep for microSeconds or until i/o becomes possible, avoiding
sleeping in select() if timeout too small */
int aioSleepForUsecs(int microSeconds)
{
#if defined(HAVE_NANOSLEEP)
if (microSeconds < (1000000/60)) /* < 1 timeslice? */
{
if (!aioPoll(0))
{
struct timespec rqtp= { 0, microSeconds * 1000 };
struct timespec rmtp;
nanosleep(&rqtp, &rmtp);
microSeconds= 0; /* poll but don't block */
}
}
#endif
return aioPoll(microSeconds);
}
and more precisely when calling nanosleep
for now, I disabled HAVE_NANOSLEEP definition, and I'm testing (right now, no hangs), but I don't know how this should work.
Someone knows?
Cheers,
Esteban