You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_dtcl@tcl.apache.org by Craig Huckabee <hu...@spawar.navy.mil> on 2003/02/12 20:29:38 UTC

Re: mod_dtcl threaded changes

At 08:54 AM 2/12/2003 -0500, Craig Huckabee wrote:
>At 11:43 PM 2/11/2003 -0800, David N. Welton wrote:
>
>>So, to simplify things, does anyone see problems with removing the
>>bits about THREADED_TCL, and just doing InitTclStuff from the
>>ChildInit?
>>
>>Does this work on windows?
>
>I'll have an answer for that in about an hour.


OK, took me a bit longer than expected.  I took out the THREADED_TCL bits, 
made sure the only init calls were made from the child, and rebuilt 
everything.  I made two builds - one with a threaded Tcl lib, one
without.

I also pulled out the bits that check to see if we've already been loaded 
once (the static flag).

Both builds run but crash when used with frames (as seen previously)

I'm going to put the loading check back in to see if that gets rid of the 
crashes - I'll see if I can find a way to do it that will be more 
acceptable/portable.

--Craig


/ Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
/ Code 71B-CH           | phone: (843) 218 5653         /
/ SPAWAR Systems Center         | close proximity: HeyYou!      /
/ Charleston, SC                | ICBM: 32.78N, 79.93W          / 


---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by Oliver Bienert <ob...@waldwerk.de>.
Craig,

good news, indeed. I am willing to test it on my box if you can send me 
the binaries, don't know if I have the time to try and compile it and, 
by the way, I'm not that c-crack...
I have posted to this list a couple of weeks ago, addressing a problem 
with frames and mssql server, that has frequently crashed apache.

Regards Oliver

Craig Huckabee wrote:
> At 01:42 PM 2/12/2003 -0800, David N. Welton wrote:
> 
>> Craig Huckabee <hu...@spawar.navy.mil> writes:
>>
>> > I think I have it fixed.  I don't think the previous "threaded"
>> > build was actually using the mutex locks - that's why I saw the bad
>> > behavior.  I'm checking in the changes now so you can look at what I
>> > did and maybe copy it to the rivet code base.
>>
>> Ok - and it definitely works, passes the tests, works ok with frames,
>> etc?  I suppose it would be nice to create a test (probably in Rivet,
>> as it has a more complete framework) that opens up a few connections
>> simultaneously.
> 
> 
> I gave it as good a beating as possible - basically a multiple frame 
> page with sql and other processes running in each frame, then running 
> test program that fetches the pages a few bazillion times.
> 
> 
> 
>> Has anyone ever written Tcl code that will consistently reproduce the
>> crash on windows?  For instance, something that does two threads that
>> each open a connection, or http::geturl with -command or -handler...
> 
> 
> I based my tests on what was posted here but I'd be happy to send some 
> binaries to someone else.
> 
> --Craig
> 
> 
> / Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
> / Code 71B-CH           | phone: (843) 218 5653         /
> / SPAWAR Systems Center         | close proximity: HeyYou!      /
> / Charleston, SC                | ICBM: 32.78N, 79.93W          /
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
> For additional commands, e-mail: mod_dtcl-help@tcl.apache.org
> 
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by Craig Huckabee <hu...@spawar.navy.mil>.
At 01:42 PM 2/12/2003 -0800, David N. Welton wrote:
>Craig Huckabee <hu...@spawar.navy.mil> writes:
>
> > I think I have it fixed.  I don't think the previous "threaded"
> > build was actually using the mutex locks - that's why I saw the bad
> > behavior.  I'm checking in the changes now so you can look at what I
> > did and maybe copy it to the rivet code base.
>
>Ok - and it definitely works, passes the tests, works ok with frames,
>etc?  I suppose it would be nice to create a test (probably in Rivet,
>as it has a more complete framework) that opens up a few connections
>simultaneously.

I gave it as good a beating as possible - basically a multiple frame page 
with sql and other processes running in each frame, then running test 
program that fetches the pages a few bazillion times.



>Has anyone ever written Tcl code that will consistently reproduce the
>crash on windows?  For instance, something that does two threads that
>each open a connection, or http::geturl with -command or -handler...

I based my tests on what was posted here but I'd be happy to send some 
binaries to someone else.

--Craig


/ Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
/ Code 71B-CH           | phone: (843) 218 5653         /
/ SPAWAR Systems Center         | close proximity: HeyYou!      /
/ Charleston, SC                | ICBM: 32.78N, 79.93W          / 


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by Craig Huckabee <hu...@spawar.navy.mil>.
At 01:42 PM 2/12/2003 -0800, David N. Welton wrote:
>Craig Huckabee <hu...@spawar.navy.mil> writes:
>
> > I think I have it fixed.  I don't think the previous "threaded"
> > build was actually using the mutex locks - that's why I saw the bad
> > behavior.  I'm checking in the changes now so you can look at what I
> > did and maybe copy it to the rivet code base.
>
>Ok - and it definitely works, passes the tests, works ok with frames,
>etc?  I suppose it would be nice to create a test (probably in Rivet,
>as it has a more complete framework) that opens up a few connections
>simultaneously.

I gave it as good a beating as possible - basically a multiple frame page 
with sql and other processes running in each frame, then running test 
program that fetches the pages a few bazillion times.



>Has anyone ever written Tcl code that will consistently reproduce the
>crash on windows?  For instance, something that does two threads that
>each open a connection, or http::geturl with -command or -handler...

I based my tests on what was posted here but I'd be happy to send some 
binaries to someone else.

--Craig


/ Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
/ Code 71B-CH           | phone: (843) 218 5653         /
/ SPAWAR Systems Center         | close proximity: HeyYou!      /
/ Charleston, SC                | ICBM: 32.78N, 79.93W          / 


---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by "David N. Welton" <da...@dedasys.com>.
Craig Huckabee <hu...@spawar.navy.mil> writes:

> I think I have it fixed.  I don't think the previous "threaded"
> build was actually using the mutex locks - that's why I saw the bad
> behavior.  I'm checking in the changes now so you can look at what I
> did and maybe copy it to the rivet code base.

Ok - and it definitely works, passes the tests, works ok with frames,
etc?  I suppose it would be nice to create a test (probably in Rivet,
as it has a more complete framework) that opens up a few connections
simultaneously.

Has anyone ever written Tcl code that will consistently reproduce the
crash on windows?  For instance, something that does two threads that
each open a connection, or http::geturl with -command or -handler...

In any case, thanks for testing this out, Craig!
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by "David N. Welton" <da...@dedasys.com>.
Craig Huckabee <hu...@spawar.navy.mil> writes:

> I think I have it fixed.  I don't think the previous "threaded"
> build was actually using the mutex locks - that's why I saw the bad
> behavior.  I'm checking in the changes now so you can look at what I
> did and maybe copy it to the rivet code base.

Ok - and it definitely works, passes the tests, works ok with frames,
etc?  I suppose it would be nice to create a test (probably in Rivet,
as it has a more complete framework) that opens up a few connections
simultaneously.

Has anyone ever written Tcl code that will consistently reproduce the
crash on windows?  For instance, something that does two threads that
each open a connection, or http::geturl with -command or -handler...

In any case, thanks for testing this out, Craig!
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by Craig Huckabee <hu...@spawar.navy.mil>.
At 12:08 PM 2/12/2003 -0800, David N. Welton wrote:

>I think on windows, the non-threaded version is useless - it will
>crash in any case.  It needs the mutex, because apache on windows is
>threaded.

OK - I pulled out the non-threaded support and updated the readme to 
reflect that.


>I wonder exactly what's going on... does that code get loaded multiple
>times in the same thread on windows?  That might be a useful test.  Do
>a fprintf(stderr with some useful stats... thread ID and such...

I think I have it fixed.  I don't think the previous "threaded" build was 
actually using the mutex locks - that's why I saw the bad behavior.  I'm 
checking in the changes now so you can look at what I did and maybe copy it 
to the rivet code base.

--Craig


/ Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
/ Code 71B-CH           | phone: (843) 218 5653         /
/ SPAWAR Systems Center         | close proximity: HeyYou!      /
/ Charleston, SC                | ICBM: 32.78N, 79.93W          / 


---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by Craig Huckabee <hu...@spawar.navy.mil>.
At 12:08 PM 2/12/2003 -0800, David N. Welton wrote:

>I think on windows, the non-threaded version is useless - it will
>crash in any case.  It needs the mutex, because apache on windows is
>threaded.

OK - I pulled out the non-threaded support and updated the readme to 
reflect that.


>I wonder exactly what's going on... does that code get loaded multiple
>times in the same thread on windows?  That might be a useful test.  Do
>a fprintf(stderr with some useful stats... thread ID and such...

I think I have it fixed.  I don't think the previous "threaded" build was 
actually using the mutex locks - that's why I saw the bad behavior.  I'm 
checking in the changes now so you can look at what I did and maybe copy it 
to the rivet code base.

--Craig


/ Craig Huckabee                | e-mail: huck@spawar.navy.mil  /
/ Code 71B-CH           | phone: (843) 218 5653         /
/ SPAWAR Systems Center         | close proximity: HeyYou!      /
/ Charleston, SC                | ICBM: 32.78N, 79.93W          / 


---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by "David N. Welton" <da...@dedasys.com>.
[ Please leave the rivet list in the CC - this concerns that codebase
as well ]

Craig Huckabee <hu...@spawar.navy.mil> writes:

> OK, took me a bit longer than expected.  I took out the THREADED_TCL
> bits, made sure the only init calls were made from the child, and
> rebuilt everything.  I made two builds - one with a threaded Tcl
> lib, one without.

I think on windows, the non-threaded version is useless - it will
crash in any case.  It needs the mutex, because apache on windows is
threaded.

> I also pulled out the bits that check to see if we've already been
> loaded once (the static flag).

> Both builds run but crash when used with frames (as seen previously)

> I'm going to put the loading check back in to see if that gets rid
> of the crashes - I'll see if I can find a way to do it that will be
> more acceptable/portable.

I wonder exactly what's going on... does that code get loaded multiple
times in the same thread on windows?  That might be a useful test.  Do
a fprintf(stderr with some useful stats... thread ID and such...

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: mod_dtcl-unsubscribe@tcl.apache.org
For additional commands, e-mail: mod_dtcl-help@tcl.apache.org


Re: mod_dtcl threaded changes

Posted by "David N. Welton" <da...@dedasys.com>.
[ Please leave the rivet list in the CC - this concerns that codebase
as well ]

Craig Huckabee <hu...@spawar.navy.mil> writes:

> OK, took me a bit longer than expected.  I took out the THREADED_TCL
> bits, made sure the only init calls were made from the child, and
> rebuilt everything.  I made two builds - one with a threaded Tcl
> lib, one without.

I think on windows, the non-threaded version is useless - it will
crash in any case.  It needs the mutex, because apache on windows is
threaded.

> I also pulled out the bits that check to see if we've already been
> loaded once (the static flag).

> Both builds run but crash when used with frames (as seen previously)

> I'm going to put the loading check back in to see if that gets rid
> of the crashes - I'll see if I can find a way to do it that will be
> more acceptable/portable.

I wonder exactly what's going on... does that code get loaded multiple
times in the same thread on windows?  That might be a useful test.  Do
a fprintf(stderr with some useful stats... thread ID and such...

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org