[tbnl-devel] Re: [mod-lisp-devel] Apache 2 support

On Wed, 10 Nov 2004 19:36:35 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
Don't bet ;-) I'm always horrified by the time it takes when I write some C code like that. allocation/deallocation/pointers/tortuous poorly documented APIs (I had to read the Apache sources to understand what they mean with their threadkey stuff...) etc. bleah...
Same here... :( I'm going to spend some time with this now. If you've got something better to do (like fighting deadlines or playing with your kids) please do it and wait until I give up or deliver something. Maybe tonight. Cheers, Edi.

"Edi Weitz" <edi@agharta.de> wrote:
On Wed, 10 Nov 2004 19:36:35 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
Don't bet ;-) I'm always horrified by the time it takes when I write some C code like that. allocation/deallocation/pointers/tortuous poorly documented APIs (I had to read the Apache sources to understand what they mean with their threadkey stuff...) etc. bleah...
Same here... :(
I'm going to spend some time with this now. If you've got something better to do (like fighting deadlines or playing with your kids) please do it and wait until I give up or deliver something. Maybe tonight.
We should get a better sync. ;-) I finished the modifications and put mod_lisp2.c in the mod_lisp repository. Now what is needed is to test it (and fix it ;-) If you could test it on Linux while I debug it on Windows it would be cool. Cheers, Marc

On Thu, 11 Nov 2004 12:33:08 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
We should get a better sync. ;-)
Yes... :)
I finished the modifications and put mod_lisp2.c in the mod_lisp repository.
Now what is needed is to test it (and fix it ;-) If you could test it on Linux while I debug it on Windows it would be cool.
Just for fun here's what I have now - see attachment. I'm gonna look at your code. Cheers, Edi.

"Edi Weitz" <edi@agharta.de> wrote:
On Thu, 11 Nov 2004 12:33:08 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
We should get a better sync. ;-)
Yes... :)
hehe...
I finished the modifications and put mod_lisp2.c in the mod_lisp repository.
Now what is needed is to test it (and fix it ;-) If you could test it on Linux while I debug it on Windows it would be cool.
Just for fun here's what I have now - see attachment.
I'm gonna look at your code.
Looks like I'm more lazy. I just added a per thread configuration but did not touch anything else. Cheers, Marc

"Edi Weitz" <edi@agharta.de> wrote:
On Thu, 11 Nov 2004 12:42:51 +0100, Edi Weitz <edi@agharta.de> wrote:
Just for fun here's what I have now - see attachment.
I received this a couple of minutes ago but it was sent on Nov 11. Are there again problems with the c-l.net mailing lists?
Probably, as you may have noticed on the cl-pdf-devel mailing list yesterday, the messages are forwarded with a very long delay (up to several hours) and in a wrong order. Cheers, Marc

On Thu, 11 Nov 2004 12:33:08 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
Now what is needed is to test it (and fix it ;-) If you could test it on Linux while I debug it on Windows it would be cool.
Your version fails if multiple Lisp images are running - it re-uses the socket although it shouldn't. That's why I have the lisp_private_t structure in my code.

"Edi Weitz" <edi@agharta.de> wrote:
On Thu, 11 Nov 2004 12:33:08 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
Now what is needed is to test it (and fix it ;-) If you could test it on Linux while I debug it on Windows it would be cool.
Your version fails if multiple Lisp images are running - it re-uses the socket although it shouldn't. That's why I have the lisp_private_t structure in my code.
No. The check_cfg_for_reuse will mark the socket as unsafe if it's not the same lisp image. It's just that I forgot to call it. :( It should be called like this: local_lisp_cfg (lisp_cfg_t *cfg) { lisp_cfg_t *local_cfg = NULL; apr_threadkey_private_get((void**)&local_cfg, cfg_key); if (local_cfg == NULL) { local_cfg = copy_lisp_cfg (socket_pool, cfg); apr_threadkey_private_set((void*)local_cfg, cfg_key); return local_cfg; } check_cfg_for_reuse(local_cfg, cfg); return local_cfg; } Cheers, Marc

On Thu, 11 Nov 2004 12:58:22 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
No. The check_cfg_for_reuse will mark the socket as unsafe if it's not the same lisp image. It's just that I forgot to call it. :(
Yeah, I hadn't seen it when I took a quick glance at your code but now I do. I checked the modified code with and without threads on Linux and it seems to work fine now. I'll update the TBNL docs so people know where to get mod_lisp2. Thanks, Edi.

"Edi Weitz" <edi@agharta.de> wrote:
On Thu, 11 Nov 2004 12:58:22 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
No. The check_cfg_for_reuse will mark the socket as unsafe if it's not the same lisp image. It's just that I forgot to call it. :(
Yeah, I hadn't seen it when I took a quick glance at your code but now I do. I checked the modified code with and without threads on Linux and it seems to work fine now.
I'll update the TBNL docs so people know where to get mod_lisp2.
Maybe you should wait a little bit for some more testing... Have you also tested the multi-threaded modes ? Cheers, Marc

On Thu, 11 Nov 2004 13:48:02 +0100, "Marc Battyani" <marc.battyani@fractalconcept.com> wrote:
Maybe you should wait a little bit for some more testing...
I wouldn't mind if other mod_lisp/TBNL would also do some testing... :)
Have you also tested the multi-threaded modes ?
Yes, I've tested with the 'prefork' and with the 'worker' model. (After I had done the same thing with my code. I think that's enough testing for today... :)
participants (2)
-
Edi Weitz
-
Marc Battyani