Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2009-07-11 Thread ABorka
GNU/Linux Leonardo. - Original Message From: ABorka To: FPC developers' list Sent: Tuesday, September 30, 2008 11:03:26 PM Subject: Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests Nevermind, on Ubuntu the request_rec is only 384 bytes for FPC instea

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2009-07-10 Thread Leonardo M . Ramé
4-3 [2009/06/03] for i386 Copyright (c) 1993-2008 by Florian Klaempfl Linux debian 2.6.26-1-686 #1 SMP Fri Mar 13 18:08:45 UTC 2009 i686 GNU/Linux Leonardo. - Original Message From: ABorka To: FPC developers' list Sent: Tuesday, September 30, 2008 11:03:26 PM Subject: Re: [fpc-dev

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-10-05 Thread ABorka
Hi Jonas, This seems to work on Windows (and solves the problem), but on Linux WaitForThreadTerminate waits forever. WaitForThreadTerminate(BeginThread(@__dummythread), 300); apache just waits and doesn't start until I stop the apache loading with ctrl+c, as if it is in an infinite loop and

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-30 Thread ABorka
Nevermind, on Ubuntu the request_rec is only 384 bytes for FPC instead of 412. But that still does not explain why the handler function is not even getting called by apache. ABorka wrote: OK, after 4 days of pulling my (remaining) hair out I was able to compile a basic C apache module on Ub

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-30 Thread ABorka
OK, after 4 days of pulling my (remaining) hair out I was able to compile a basic C apache module on Ubuntu 8.04 (apache 2.2.8). It seems both fpc/lazarus (not working apache module) and the C compiled (working apache module) one shows sizeof(request_rec) = 412 sizeof(module_struct) = 56 So

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread ABorka
For me in Windows XP 32bit/ FPC (apache modules load properly): sizeof(request_rec)=416 sizeof(module_struct)=56 For me in Ubuntu 8.04 32bit/ FPC (apache modules don't load): sizeof(request_rec)=412 sizeof(module_struct)=56 Used exactly the same files to compile a project on Ubuntu but for some

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread ABorka
Well, it seems we have some progress now. The WaitForThreadTerminate(BeginThread(@__dummythread), 300); seems to fix it on Windows. At least for 2 concurrent requests. For some reason Apache cannot seem to want to run more than 2 requests at a time. If more comes in at a time, the first 2 start

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Michael Van Canneyt
On Wed, 24 Sep 2008, Jonas Maebe wrote: > > On 24 Sep 2008, at 13:02, Michael Van Canneyt wrote: > > >On Wed, 24 Sep 2008, Jonas Maebe wrote: > > > > > > > >On 24 Sep 2008, at 12:35, Michael Van Canneyt wrote: > > > > > > >This is a known problem; the heap manager does not function correctly i

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Felipe Monteiro de Carvalho
Could it be then related to the Apache method of working? Apache has a non-threaded version and several threaded versions. In my Mandriva where it didn't crash I installed the non-threaded version. (not sure if it won't create threads anyway for something else, even if it works in a non-threaded p

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Jonas Maebe
On 24 Sep 2008, at 13:02, Michael Van Canneyt wrote: On Wed, 24 Sep 2008, Jonas Maebe wrote: On 24 Sep 2008, at 12:35, Michael Van Canneyt wrote: This is a known problem; the heap manager does not function correctly in a DLL when an external program (apache, in this case) creates new th

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Michael Van Canneyt
On Wed, 24 Sep 2008, Jonas Maebe wrote: > > On 24 Sep 2008, at 12:35, Michael Van Canneyt wrote: > > >This is a known problem; the heap manager does not function correctly in a > >DLL when an external program (apache, in this case) creates new threads. > > The heap manager is simply not threa

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Jonas Maebe
On 24 Sep 2008, at 12:35, Michael Van Canneyt wrote: This is a known problem; the heap manager does not function correctly in a DLL when an external program (apache, in this case) creates new threads. The heap manager is simply not thread safe until the FPC threading system has been init

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Michael Van Canneyt
On Wed, 24 Sep 2008, ABorka wrote: > I'm not sure that something is changed to make it incompatible. > The apache modules compiled on windows are only crashing if multiple requests > are coming at the same time, and they are crushing at function/procedure > returns (Yes, on Linux it is even wors

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread Jonas Maebe
On 24 Sep 2008, at 10:58, ABorka wrote: I'm not sure that something is changed to make it incompatible. The apache modules compiled on windows are only crashing if multiple requests are coming at the same time, and they are crushing at function/procedure returns (Yes, on Linux it is even wo

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-24 Thread ABorka
I'm not sure that something is changed to make it incompatible. The apache modules compiled on windows are only crashing if multiple requests are coming at the same time, and they are crushing at function/procedure returns (Yes, on Linux it is even worse, since no module gets even loaded by apa

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-23 Thread Felipe Monteiro de Carvalho
Try installing an older Apache. I installed here with XAMMP, Apache 2.2.9 and it just quits without any error message when loading my Pascal module. But when using the standard Apache 2.2.6 in Mandriva 2008 it works. Actually I can't get it to show the page (some config problem?), but it loads wi

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-23 Thread ABorka
Hi Michael, Unfortunately, I do not have any C compilers - nor the knowledge to compile something with the apache header files in C. I manually compared the .h/.inc and the translated pascal structures/records for the two you have mentioned (module_struct and request_rec) and they seem to have

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-22 Thread Michael Van Canneyt
On Mon, 22 Sep 2008, ABorka wrote: > After some more debugging the result is even stranger: > > If I reduce the code to the bare minimum there is still a crash most of the > time. > > 1. works always for 2 concurrent requests: > procedure TCustomApacheApplication.HandleRequest(ARequest: TReque

Re: [fpc-devel] Lazarus Apache module crashes during concurrent requests

2008-09-22 Thread ABorka
After some more debugging the result is even stranger: If I reduce the code to the bare minimum there is still a crash most of the time. 1. works always for 2 concurrent requests: procedure TCustomApacheApplication.HandleRequest(ARequest: TRequest; AResponse: TResponse); Var MC : TCustomHT