Re: [Libevent-users] Problems with deferred HTTP handlers over SSL

2012-01-13 Thread Amarin Phaosawasdi
Hi Oscar, Thanks for following up. We tried building and linking with the same versions of libevent, libevhtp as static libraries, and openssl as a shared library as you did on our Linux machines and still got the same errors. (Unfortunately, we didn't get any "hello"s.) The rate of error might

Re: [Libevent-users] Problems with deferred HTTP handlers over SSL

2012-01-13 Thread Oscar Koeroo
Hi Amarin, I've retried it by looping curl and it indeed seg. faults after about 10k invocations (just a guestimate). I did remove the sleep(1); to make it crash faster, it doesn't really matter. BTW: why did you use the evhtp_set_gencb()? Example: https://github.com/okoeroo/lcmaps-rest/blob/mast

Re: [Libevent-users] Problems with deferred HTTP handlers over SSL

2012-01-13 Thread Oscar Koeroo
Hi Amarin, Could you checkout the "0.4.5" tag of libevhtp and rebuild with that one? I don't think master is the right starting point. I tried your code and my Chrome (version 18.x devel), Firefox 9.0.1 and Opera 11.60 worked fine. I've statically build your code against libevent release-2.0.16-

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 12:56 PM, Nick Mathewson wrote: > On Fri, Jan 13, 2012 at 2:52 PM, Ralph Castain wrote: >> >> Hah! I see what happened. I removed it because it was marked as an OMPI >> change: >> >> - /OMPI CHANGE/ >> - /* set a timeval to avoid

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Nick Mathewson
On Fri, Jan 13, 2012 at 2:52 PM, Ralph Castain wrote: > > Hah! I see what happened. I removed it because it was marked as an OMPI > change: > > -               /    OMPI CHANGE    / > -               /* set a timeval to avoid blocking select on Windows */ > -#ifndef WIN32 > -            

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 12:40 PM, Nick Mathewson wrote: >>if (ev == NULL) { >>/* if no time-based events are active wait for I/O */ >>fprintf(stderr, "NO TIME-BASED EVENTS ACTIVE - tvp %d\n", (tv == >> NULL) ? -1 : (int)tv->tv_sec); >>goto out; >>

[Libevent-users] Problems with deferred HTTP handlers over SSL

2012-01-13 Thread Amarin Phaosawasdi
Hi All, We're working on fixing an issue with one of our servers, which serves HTTPS requests on one end, and makes asynchronous RPCs on the other end. The server uses libevhtp to serve HTTPS requests. But since it is also based on libevent and we suspect it might have something to do with buffer

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 12:40 PM, Nick Mathewson wrote: >>if (ev == NULL) { >>/* if no time-based events are active wait for I/O */ >>fprintf(stderr, "NO TIME-BASED EVENTS ACTIVE - tvp %d\n", (tv == >> NULL) ? -1 : (int)tv->tv_sec); >>goto out; >>

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Nick Mathewson
>        if (ev == NULL) { >                /* if no time-based events are active wait for I/O */ >            fprintf(stderr, "NO TIME-BASED EVENTS ACTIVE - tvp %d\n", (tv == > NULL) ? -1 : (int)tv->tv_sec); >                goto out; >        } > That's not Libevent's code! Libevent, even in 2

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 9:53 AM, Nick Mathewson wrote: > On Fri, Jan 13, 2012 at 11:46 AM, Ralph Castain wrote: > >>> Adding some assertions in event_add_internal might track this down. >>> Trivially, you could do >>> if (tv && !tv_is_absolute) { >>> /* waiting one billion seconds should be

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Nick Mathewson
On Fri, Jan 13, 2012 at 11:46 AM, Ralph Castain wrote: >> Adding some assertions in event_add_internal might track this down. >> Trivially, you could do >>   if (tv && !tv_is_absolute) { >>       /* waiting one billion seconds should be enough for anyone */ >>       EVUTIL_ASSERT(tv->tv_sec < 100

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 8:29 AM, Nick Mathewson wrote: > On Fri, Jan 13, 2012 at 10:13 AM, Ralph Castain wrote: > >>> What kind of illegal value are you seeing, >> >> 1326467251, 774650 > > Okay, that looks like it's the actual current time! I wonder why that > would make select() give an error,

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Nick Mathewson
On Fri, Jan 13, 2012 at 10:13 AM, Ralph Castain wrote: >> What kind of illegal value are you seeing, > > 1326467251, 774650 Okay, that looks like it's the actual current time! I wonder why that would make select() give an error, though. Maybe because the current time plus that many seconds exc

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
On Jan 13, 2012, at 7:29 AM, Nick Mathewson wrote: > On Fri, Jan 13, 2012 at 7:47 AM, Ralph Castain wrote: >> I've been digging further into this, and I believe I have much of it >> resolved now. However, I have encountered a problem that appears to be >> something in libevent itself. >> >> I

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Nick Mathewson
On Fri, Jan 13, 2012 at 7:47 AM, Ralph Castain wrote: > I've been digging further into this, and I believe I have much of it resolved > now. However, I have encountered a problem that appears to be something in > libevent itself. > > I configured libevent with debug enabled, and turned it on at

Re: [Libevent-users] Signals and priority queues

2012-01-13 Thread Ralph Castain
I've been digging further into this, and I believe I have much of it resolved now. However, I have encountered a problem that appears to be something in libevent itself. I configured libevent with debug enabled, and turned it on at execution - and was barraged by: [warn] select: Invalid argume