websh crash - possible cause

View: New views
3 Messages — Rating Filter:   Alert me  

websh crash - possible cause

by Ashok P. Nadkarni-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: websh-user-help@...


Re: websh crash - possible cause

by Ronnie Brunner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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@...
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@...
For additional commands, e-mail: websh-user-help@...


Re: websh crash - possible cause

by Ashok P. Nadkarni-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: websh-user-help@...