Re: [Libevent-users] Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Alap Kumar Sinha
Hi, Thank you I would try with the configuring libevent for multithreading. Mark also has the same suggestion. Regarding, syncronize & connection close event. In actual code it is implemented properly. My bad I did not do that in the sample code. Regards, Alap _

Re: [Libevent-users] Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Nir Soffer
The example code you sent is expected to crash and burn randomly: - You use multiple threads, but you do not configure libevent to use multithreading - You do not synchronize the threads in your own code. For example, accessing startSend and req from multiple threads. - You do not handle the conne

Re: [Libevent-users] Re: Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Mark Ellzey
On Thu, May 31, 2012 at 06:48:32AM -0700, Alap Kumar Sinha wrote: > Hi, > > I have attached code snippet. Please let me know if it is better now. > > Regards, > Alap > Use evthread_use_pthreads() before anything else and compile with -levent_pthreads. You cannot use events across different threa

Re: [Libevent-users] Re: Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Alap Kumar Sinha
Hi, I have attached code snippet. Please let me know if it is better now. Regards, Alap From: Mark Ellzey To: libevent-us...@freehaven.net Sent: Thursday, May 31, 2012 9:39 AM Subject: Re: [Libevent-users] Re: Crash in evhttp_send_reply_chunk() On Thu, May

Re: [Libevent-users] Re: Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Mark Ellzey
On Thu, May 31, 2012 at 06:32:38AM -0700, Alap Kumar Sinha wrote: > Hi, > > Any help on this please? > > Regards, > Alap > Can you either put this up on pastebin/gist, or make the code an attachment? You are using a non-plaintext encoding so it's kind of hard to read. *

[Libevent-users] Re: Crash in evhttp_send_reply_chunk()

2012-05-31 Thread Alap Kumar Sinha
Hi, Any help on this please? Regards, Alap From: Alap Kumar Sinha To: "libevent-us...@freehaven.net" Sent: Wednesday, May 23, 2012 10:24 AM Subject: Crash in evhttp_send_reply_chunk() Hi,   I am using libevent to implement a HTTP server. I am observing a