You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by "Ashok P. Nadkarni" <ap...@yahoo.com> on 2009/06/20 10:27:46 UTC

websh crash - possible cause

It appears as though websh will crash if "logdest delete" is called on 
log destination that is a channel after closing the channel via Tcl's 
close command. In particular, test log-2.6 has the following sequence:
    close $fh
    web::logdest delete
This results eventually in a call to Tcl_Flush from 
destroyLogToChannelData with a channel pointer that is no longer valid. 
The end-result is likely to be random crashes as Tcl_Flush does not seem 
to do any validation.

Please verify if that might the problem. Of course, that may or may not 
be the cause of the crashes you are seeing.

Funnily enough on XP and Tcl 8.6 the test suite runs fine. I suppose it 
depends when that memory gets reused.

Regards

/Ashok

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


Re: websh crash - possible cause

Posted by "Ashok P. Nadkarni" <ap...@yahoo.com>.
After fixing the logdest/close problem, the rest of the tests from 'make 
test' ran fine. I have not gotten around to running apachetest. It 
failed when I tried it because Ubuntu Apache does not have its 
configuration layout in the format expected by the test suite. I need to 
uninstall it and install a standard Apache distribution first and retry. 
Maybe today or tomorrow.

/Ashok

Ronnie Brunner wrote:
>> It appears as though websh will crash if "logdest delete" is called on  
>> log destination that is a channel after closing the channel via Tcl's  
>> close command. In particular, test log-2.6 has the following sequence:
>>    close $fh
>>    web::logdest delete
>>     
>
> Yes, web::logdest has a problem if the channel is closed. I'll be
> looking at this in the next few days. Thanks for finding that one.
>
> In the mean time: if you just put the [close $fh] statement after the
> [web::logdest delete] statement in this test: does your setup still
> crash? Do you get other errors?
>
>   
>> Please verify if that might the problem. Of course, that may or may not  
>> be the cause of the crashes you are seeing.
>>     
>
> It is not the cause for my problems.
>
>   
>> Funnily enough on XP and Tcl 8.6 the test suite runs fine. I suppose it  
>> depends when that memory gets reused.
>>     
>
> Yeah, probably. (I never had this test fail on my RedHat boxes either).
>
> Ronnie
>   

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


Re: websh crash - possible cause

Posted by Ronnie Brunner <ro...@netcetera.ch>.
> It appears as though websh will crash if "logdest delete" is called on  
> log destination that is a channel after closing the channel via Tcl's  
> close command. In particular, test log-2.6 has the following sequence:
>    close $fh
>    web::logdest delete

Yes, web::logdest has a problem if the channel is closed. I'll be
looking at this in the next few days. Thanks for finding that one.

In the mean time: if you just put the [close $fh] statement after the
[web::logdest delete] statement in this test: does your setup still
crash? Do you get other errors?

> Please verify if that might the problem. Of course, that may or may not  
> be the cause of the crashes you are seeing.

It is not the cause for my problems.

> Funnily enough on XP and Tcl 8.6 the test suite runs fine. I suppose it  
> depends when that memory gets reused.

Yeah, probably. (I never had this test fail on my RedHat boxes either).

Ronnie
-- 
Ronnie Brunner | ronnie.brunner@netcetera.ch
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Zürich | Switzerland | http://netcetera.ch

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