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 starts running and the rest have to wait till at least 1 current request is handled. Even when MaxConnectionsPerServer is set to higher than 2 in the registry.

uses cmem;  did not fix the crash on Windows.

I will try to make apache modules load in Linux next so some tests can be done there too.

AB

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 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 initialised (by starting a thread).

It is not that simple. The heap manager cannot handle situations where
threads have been started by code that is not aware of the FPC threading
mechanisms - such as apache.

Ah yes, that's indeed a problem with the new 2.3.x heap manager. I don't think the 2.2.x heap manager cares though, since it uses a regular critical section/mutex.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to