Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

Memory Leak in TCL UDP socket

Hi all,

I am currently looking at a memory leak issue in the TCL UDP socket configuration when the fconfigure command is issued under a procedure.

Under a normal scenario where the socket is configured globally, the system handles the memory well and we do not see an increase.

The folowing examples are not the actual code implemented but provide an example of the condition under which the leak is seen.

 

set msg [udp_open]
fconfigure $msg -blocking false -buffering none -translation binary -remote [list 10.70.0.112 1234]

proc send {} {
    global msg
    puts -nonewline $msg "HELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLO"
    return
}

set done 0
while {($done <= 1000)} {
    set done [expr {$done + 1}]
    after 250
    send
}

 

If we wish do dynamically modify the parameters of the socket, we get an ever increasing consumption of memory (show memory dead - decrease in processor free). for example:

 

set clients [list]
lappend clients "10.70.0.111 1234"
lappend clients "10.70.0.112 1234"

set msg [udp_open]
fconfigure $msg -blocking false -buffering none -translation binary

proc send {} {
    global clients
    global msg
    foreach peer $clients {
        fconfigure $msg -remote $peer
        puts -nonewline $msg "HELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLOHELLO"
    }
    return
}

set done 0
while {($done <= 1000)} {
    set done [expr {$done + 1}]
    after 250
    send
}

 

I have tested multiple scenatios using flush, return, closing and opening the socket within the procedure, all to the same result - fconfigure in a procedure creates a memory leak in line with the data rate passing through the socket.

I am seeing this across multiple device types and IOS (819,5915,5940,2901,2921,3945) 15 series M/T/GC IOS. I guess the question is, is there a problem with the construct of the procedure in which I am missing something on the channel side to release the memory or does this appear to be a bug?

 

 

any help would be appreciated.

Regards,

Robert.

 

Everyone's tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

This does sound like a bug,

This does sound like a bug, but I couldn't find an existing one.  I recommend you open a TAC case so this can be analyzed further.

4 REPLIES
Cisco Employee

This does sound like a bug,

This does sound like a bug, but I couldn't find an existing one.  I recommend you open a TAC case so this can be analyzed further.

New Member

Thanks Joseph - Will do.

Thanks Joseph - Will do.

New Member

Hi,could you please tell me

Hi,

could you please tell me the package version number you are using?

You can obtain it by calling "package re udp".

 

thx

 

New Member

Tom,TCL UDP package is 1.0 

Tom,

TCL UDP package is 1.0

 

190
Views
0
Helpful
4
Replies