Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Differences of behaviour between Windows and Linux (sockets, 8.6b)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Emmanuel Frecon  
View profile  
 More options May 25 2012, 4:32 pm
Newsgroups: comp.lang.tcl
From: Emmanuel Frecon <efre...@gmail.com>
Date: Fri, 25 May 2012 13:32:28 -0700 (PDT)
Local: Fri, May 25 2012 4:32 pm
Subject: Differences of behaviour between Windows and Linux (sockets, 8.6b)
Dear fellow Tcl:ers,

I am going to give it a go at a question, even though I have at this point difficulties to understand what is happening right now.

I have some code that was working perfectly in 8.5 both on Linux and Windows. The software, among other things implements a web server (it is my old web server from til, revamped and now hosted at Google code http://code.google.com/p/efr-tools/source/browse/#svn%2Ftrunk%2Ftil%2...).

You might have understood from my previous post today that I am slowly moving to IPv6, so I am trying to run the code under 8.6. Basically, what I have problem with is that the code runs perfectly on Linux, but blocks on Windows. I have been able to track it down to the procedure being bound to "accept", i.e. to be run when a client connects, is never called on Windows. Every access to the server timeouts for reasons that I cannot explain. Since the code has moved from versions to versions of Tcl (actually, since 8.2 if I remember it right), it is event based and does not make use of the new stuff from 8.6.

I don't really know where to start. I have tried with all firewalls turned off and on two different Windows (7, 32bits Tcl on 64bits OS) installations. Any ideas?

/Emmanuel


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
tomás zerolo  
View profile  
 More options May 26 2012, 4:13 am
Newsgroups: comp.lang.tcl
From: to...@tuxteam.de (tomás zerolo)
Date: Sat, 26 May 2012 10:13:43 +0200
Local: Sat, May 26 2012 4:13 am
Subject: Re: Differences of behaviour between Windows and Linux (sockets, 8.6b)

Emmanuel Frecon <efre...@gmail.com> writes:
> Dear fellow Tcl:ers,

[accept works on Linux, seems to hang on Windows]

> I don't really know where to start. I have tried with all firewalls turned off and on two different Windows (7, 32bits Tcl on 64bits OS) installations. Any ideas?

No concrete idea, but (possibly obvious to you, sorry in that case)
general advice:

Have you tried to throw a network monitor (running on the Windows box)
at that (Wireshark is a good choice)? Can you see the SYN coming in? The
SYN ACK going out? Etc.

There must be some sort of system call monitor for Windows (ŕ la
strace). This might help to further narrow the search space.

HTH
-- tomás


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Emmanuel Frecon  
View profile  
 More options May 27 2012, 7:41 am
Newsgroups: comp.lang.tcl
From: Emmanuel Frecon <efre...@gmail.com>
Date: Sun, 27 May 2012 04:41:35 -0700 (PDT)
Local: Sun, May 27 2012 7:41 am
Subject: Re: Differences of behaviour between Windows and Linux (sockets, 8.6b)
You are right, I will try to have a look with wireshark. I wish I could shrink this to an example that I can share on the group, but it is a whole lot of code... I will keep you all posted. Thanks.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris.shu...@ymail.com  
View profile  
 More options Dec 19 2012, 12:27 pm
Newsgroups: comp.lang.tcl
From: chris.shu...@ymail.com
Date: Wed, 19 Dec 2012 09:27:11 -0800 (PST)
Local: Wed, Dec 19 2012 12:27 pm
Subject: Re: Differences of behaviour between Windows and Linux (sockets, 8.6b)
Are you using -myaddr in your call to socket?

Check out this page (replace java with Tcl) and this is the problem I was having:
http://stackoverflow.com/questions/3375435/avoid-windows-firewall-pop...
Following the advice of the answer, I popped open tkcon (8.6.0.0 beta-7) and found the following results in accept being properly called:

proc accept {c a p} {puts "accept $c $a $p"}
set server_socket [socket -myaddr 127.0.0.1 -server accept 9900]
set client_socket [socket localhost 9900]

and the following does not:

proc accept {c a p} {puts "accept $c $a $p"}
set server_socket [socket -server accept 9900]
set client_socket [socket localhost 9900]

In 8.5, both versions work.  Hope this helps. -crs


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
chris.shu...@ymail.com  
View profile  
 More options Dec 19 2012, 1:41 pm
Newsgroups: comp.lang.tcl
From: chris.shu...@ymail.com
Date: Wed, 19 Dec 2012 10:41:13 -0800 (PST)
Local: Wed, Dec 19 2012 1:41 pm
Subject: Re: Differences of behaviour between Windows and Linux (sockets, 8.6b)
I decided to do more digging and found this to be fixed in 8.6.0.0b8

I use the pre-builts from here:
http://www.activestate.com/activetcl/downloads

I installed the Windows (x86) on both a 32-bit XP box and a 64-bit Windows 7 box
I installed the Windows (64-bit, x64) on the Windows 7 box

The accept proc is called whether or not -myaddr is specified in the socket command - fixed!

Also, time {socket localhost 9900} was indicating that it was taking ~1 SECOND to connect in 8.6.0.0b7. This is back down to the ~1 ms range in 8.6.0.0b8

Aside: Now I need to find or open a bug against tkcon - up arrow no longer cycles through command history in 8.6.0.0b8


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »