Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tcl on 64 bit & no. of sockets

7 views
Skip to first unread message

baljit77

unread,
Nov 23, 2009, 9:39:44 AM11/23/09
to
is there a bug with tcl version on 64 bit that # of scoket does not go
beyond 16?
check the code below; which opens 50 connections on 32 bit machine but
stucks at 14/15 connections on a 64 bit machine.. ( change IP address
before trying the code below)

I tried with versions 8.3.5,8.3.2, 8.4,8.5.7- only version 8.3.5 works
fine with 64 bit.

proc serverOpen {channel addr port} {
global connected
set connected 1
fileevent $channel readable "readLine Server $channel"
puts "OPENED"
}

proc readLine {who channel} {
global didRead
if { [gets $channel line] < 0} {
fileevent $channel readable {}
after idle "close $channel;set out 1"
} else {
puts "READ LINE: $line"
puts $channel "This is a return"
flush $channel;
set didRead 1
}
}
set connected 0
catch {set server [socket -server serverOpen 33000]}
after 100 update
for {set i 0 } { $i < 50 } { incr i } {
set sock [socket -async 10.30.51.102 33000]
#set sock [socket -async 10.30.51.49 33000]
vwait connected
puts $sock "A Test Line $i"
flush $sock
vwait didRead
set len [gets $sock line]
puts "Return line: $len -- $line"
}
catch {close $sock}
vwait out
close $server

Donal K. Fellows

unread,
Nov 23, 2009, 9:52:03 AM11/23/09
to
On 23 Nov, 14:39, baljit77 <balji...@gmail.com> wrote:
> is there a bug with tcl version on 64 bit that # of scoket does not go
> beyond 16?

While we've got a few issues in this area, I'd expect the limit to be
closer to a thousand or so. 16 is... a bit low. Is this on a consumer
version of windows (where there is a registry setting in the way
IIRC)?

Donal.

Don Porter

unread,
Nov 23, 2009, 10:49:14 AM11/23/09
to
baljit77 wrote:
> is there a bug with tcl version on 64 bit that # of scoket does not go
> beyond 16?
> check the code below; which opens 50 connections on 32 bit machine but
> stucks at 14/15 connections on a 64 bit machine.. ( change IP address
> before trying the code below)

Sounds vaguely like Tcl Bugs 488972 or 1071807 which were fixed long ago.

http://sourceforge.net/tracker/index.php?func=detail&aid=488972&group_id=10894&atid=110894
http://sourceforge.net/tracker/index.php?func=detail&aid=1071807&group_id=10894&atid=110894

> I tried with versions 8.3.5,8.3.2, 8.4,8.5.7- only version 8.3.5 works
> fine with 64 bit.

I suspect something flawed in your testing, and if you just avoid the
extremely outdated releases you should be fine.

Test with 8.5.7 again (or 8.5.8!) to be sure. If you still reproduce a
problem file a bug report with full details.

--
| Don Porter Mathematical and Computational Sciences Division |
| donald...@nist.gov Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|

0 new messages