You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by "David N. Welton" <da...@dedasys.com> on 2002/07/12 20:57:21 UTC

anything to do for an alpha release?

I would like to do a couple of things at once in the near future:

release websh 3.5

release an alpha of rivet (0.1.0)

switch to the new web site

what's left to do for Rivet to at least get it up on the web site?

-- 
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: anything to do for an alpha release?

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> Looks like it's caused by this:
> 
>     } else if( STREQU( script, "BeforeScript" ) ) {
> 	if( rsc->rivet_before_script == NULL ) {
> 	    objarg = Tcl_NewStringObj( string, -1 );
> 	    Tcl_IncrRefCount( objarg );
> 	    Tcl_AppendToObj( objarg, "\n", 1 );
> 	    rsc->rivet_before_script = objarg;
> 
> rivet_before_script then goes away after the request is done,
> leaving the memory for the pointer hanging there.  Does that sound
> right?  If I comment out the last line, there is no more memory
> leak.  Not quite sure what the right fix is...  Maybe it would be
> easier to just deal with those things as strings.

Duh... it's the reference count, stupid!

Killing the IncrRefCount makes everything work.  Do we actually need
that?  Tcl itself doesn't ever deal with rivet_before_script
directly...

-- 
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: UserConf memory leak

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

>       ap_table_set( rdc->rivet_user_vars, var, string ); 
> 
> in Rivet_UserConf.
> 
> It leaks memory somehow... maybe it's creating the string in there
> each time and it gets spun out into the void *.  I'm not sure - we
> need to find a way around it:-/  I'm not married to the uservars, but
> I can see how they would be useful...

I think what must be happening is that the table is created with a
server pool, so each time it goes through user conf, it just adds
stuff there, and it never gets cleaned up.  Hrm... bad stuff.
Thinking about ways to fix it.

-- 
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: UserConf memory leak

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> Is there a problem with dropping the Tcl_IncrRefCount in a few
> cases?  That seems the simplest thing to do.  And before/after
> script are never executed directly...

That didn't really help.

The problem, surprisingly, came back to this:

      ap_table_set( rdc->rivet_user_vars, var, string ); 

in Rivet_UserConf.

It leaks memory somehow... maybe it's creating the string in there
each time and it gets spun out into the void *.  I'm not sure - we
need to find a way around it:-/  I'm not married to the uservars, but
I can see how they would be useful...

-- 
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: anything to do for an alpha release?

Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:

> > Looks like it's caused by this:
> > 
> >     } else if( STREQU( script, "BeforeScript" ) ) {
> > 	if( rsc->rivet_before_script == NULL ) {
> > 	    objarg = Tcl_NewStringObj( string, -1 );
> > 	    Tcl_IncrRefCount( objarg );
> > 	    Tcl_AppendToObj( objarg, "\n", 1 );
> > 	    rsc->rivet_before_script = objarg;
> > 
> > rivet_before_script then goes away after the request is done,
> > leaving the memory for the pointer hanging there.  Does that sound
> > right?  If I comment out the last line, there is no more memory
> > leak.  Not quite sure what the right fix is...  Maybe it would be
> > easier to just deal with those things as strings.
 
>     Yeah.  That's what I ran into.  Lemme' look back through the
> code.  I had a solution to this problem, just never finished coding
> it.

Is there a problem with dropping the Tcl_IncrRefCount in a few cases?
That seems the simplest thing to do.  And before/after script are
never executed directly...

-- 
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: anything to do for an alpha release?

Posted by Damon Courtney <da...@your.unreality.com>.
> Looks like it's caused by this:
> 
>     } else if( STREQU( script, "BeforeScript" ) ) {
> 	if( rsc->rivet_before_script == NULL ) {
> 	    objarg = Tcl_NewStringObj( string, -1 );
> 	    Tcl_IncrRefCount( objarg );
> 	    Tcl_AppendToObj( objarg, "\n", 1 );
> 	    rsc->rivet_before_script = objarg;
> 
> rivet_before_script then goes away after the request is done, leaving
> the memory for the pointer hanging there.  Does that sound right?  If
> I comment out the last line, there is no more memory leak.  Not quite
> sure what the right fix is...  Maybe it would be easier to just deal
> with those things as strings.

    Yeah.  That's what I ran into.  Lemme' look back through the code.
I had a solution to this problem, just never finished coding it.

D


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


Re: anything to do for an alpha release?

Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:

>     We need to cleanup that awful memory leak when using .htaccess
> to define UserConf variables.
 
>     That's the biggest one I can think of. 0-] I'll get back with
> you shortly.

Looks like it's caused by this:

    } else if( STREQU( script, "BeforeScript" ) ) {
	if( rsc->rivet_before_script == NULL ) {
	    objarg = Tcl_NewStringObj( string, -1 );
	    Tcl_IncrRefCount( objarg );
	    Tcl_AppendToObj( objarg, "\n", 1 );
	    rsc->rivet_before_script = objarg;

rivet_before_script then goes away after the request is done, leaving
the memory for the pointer hanging there.  Does that sound right?  If
I comment out the last line, there is no more memory leak.  Not quite
sure what the right fix is...  Maybe it would be easier to just deal
with those things as strings.

-- 
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: anything to do for an alpha release?

Posted by Damon Courtney <da...@your.unreality.com>.
> Off the top of my head: another thing might be a few more 'dist'
> targets to build binary collection of different pieces of the system.
> 
> I.e.: the full deal, Rivet light, and so on...
> 
> How's that sound?

    Sounds great to me.  I'm planning on building the big, "kitchen sink"
distributions and using InstallBase as the installer.  Make it looks really
slick and professional. 0-]

Damon


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


Re: anything to do for an alpha release?

Posted by "David N. Welton" <da...@dedasys.com>.
Off the top of my head: another thing might be a few more 'dist'
targets to build binary collection of different pieces of the system.

I.e.: the full deal, Rivet light, and so on...

How's that sound?

-- 
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: anything to do for an alpha release?

Posted by "David N. Welton" <da...@dedasys.com>.
Damon Courtney <da...@your.unreality.com> writes:

>     We need to cleanup that awful memory leak when using .htaccess
> to define UserConf variables.

You have any more information on this?  I might be able to take a
look...

-- 
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: anything to do for an alpha release?

Posted by Damon Courtney <da...@your.unreality.com>.
> what's left to do for Rivet to at least get it up on the web site?

    We need to cleanup that awful memory leak when using .htaccess
to define UserConf variables.

    That's the biggest one I can think of. 0-]  I'll get back with you
shortly.

Damon


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