[erlang-questions] Help: ct_telnet_client memory overflow

Peter Andersson peppe@REDACTED
Wed Apr 23 22:23:41 CEST 2014


Hi,

Could you give me some more info? Do you mean that the problem is that 
loop/3 is not tail recursive? Reading the code I can't see that's the 
case. Or do you mean you're sure the problem must be something other 
than the loop/3 function? In any event, please share the results of your 
performance analysis. Do you see that loop/3 causes large stack usage? Or 
does the telnet client process heap grow very large?

Has ct_telnet_client worked ok for you before (ie pre v1.8), and started 
failing since v1.8 (OTP 17.0)?

Reading the code I only see two scenarios where received strings get 
buffered and not properly flushed. One is if the user doesn't read data 
often enough (compared to the rate of data sent from the server). Second 
is if the process that requests data from the telnet client crashes before 
the get_data request has been processed.

Here's something to try: Read about the new telnet logging feature in the
ct_telnet ref manual (http://www.erlang.org/doc/man/ct_telnet.html). 
Install the ct_conn_log hook (log type raw) and run your tests. Check the 
raw telnet log file during execution to see what and how much is received 
from the server. This might reveal if something weird is going on in the 
ct_telnet logging system.

I will check the code again and run some extensive profiling tests to see 
what I can find. Please get back to me with more info ASAP.

Best regards,
Peter

Ericsson AB, Erlang/OTP


On Wed, 23 Apr 2014, yasoho@REDACTED wrote:

> Hi, Peter
> Our performance analysis discover the cause of the problem is not tail recursion function loop(State, Sock, Acc)) to ct_telnet_client;
> Can you give me a advice How to modifiy it?   thanks!
>
> B.R
>
>
> yasoho@REDACTED
>
> From: Peter Andersson
> Date: 2014-04-22 15:53
> To: yasoho@REDACTED
> CC: erlang-questions
> Subject: Re: [erlang-questions] Help: ct_telnet_client memory overflow
>
> Hi,
>
> Can you please tell me which Common Test version (or OTP version) you're
> running? (The CT telnet client got modified a bit from v1.7 to v1.8).
>
> Best regards,
> Peter
>
> Ericsson AB, Erlang/OTP
>
> yasoho@REDACTED wrote:
>>
>> Hi, dear
>>
>>
>> I use ct_telnet_client.erl, found that when a telnet command returning
>> message reaches 10MB, the Erlang process consumes memory up to
>> 4~5GB, when the greater will memory overflow,.
>>
>>
>> Can anybody help me, what is the cause? thanks a lot!
>>
>>
>> B.R
>> ------------------------------------------------------------------------
>> yasoho@REDACTED
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>



More information about the erlang-questions mailing list