A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Networking with Windows Vista
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Networking with Windows Vista Networking issues and questions with Windows Vista. (microsoft.public.windows.vista.networking_sharing)

BUG: All http access blocked after running Perl script



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old May 9th 07, 12:10 AM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default BUG: All http access blocked after running Perl script

BUG: All http access blocked after running Perl script

SUMMARY: Windows Vista blocks all http access from all users after running
the attached script (at the end of this post).

DESCRIPTION:

Create a file accessible at http://127.0.0.1/test.htm and run the attached
script. After about 12000-13000 fetches, the script starts reporting an
unknown error. After that, all http access on the computer is blocked on all
user accounts (after logging off and back on). When starting IE, it reports
an error immediately. I found no other way of fixing this than rebooting my
computer.

The problem can be reproduced by using any URL in the script, including a
real remote URL. The problem first occurred when I was running a real script
that fetched lots of real Web pages in a loop like the test script.

My guess is that either Perl is leaking some socket resources (and Vista
can't release them on process exit), or that Vista is somehow considering
the flood of http requests as an attack, and disabling http because of that.
It probably shouldn't disable http indefinitely, though. I have uninstalled
all anti-virus software and disabled the Windows Firewall, but the problem
persists.

Notice that the script was running without Administrative access, but it
still caused a systemwide problem.

TEST SCRIPT:

use strict;
use LWP::UserAgent;
my $n=1;
while (1) {
print "Fetching page $n...";
my $ua = LWP::UserAgent-new;
my $req = HTTP::Request-new(GET = "http://127.0.0.1/test.htm");
$req-header('Accept' = 'text/html');
my $res = $ua-request($req);
if ($res-is_success) {
print " OK!\n";
$n++;
}
else {
print " ERROR: " . $res-status_line . ".\n";
sleep 1;
}
}


--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


  #2 (permalink)  
Old May 9th 07, 03:31 AM posted to microsoft.public.windows.vista.networking_sharing
Scissor
external usenet poster
 
Posts: 1
Default BUG: All http access blocked after running Perl script


Are you running the latest version of ActiveState Perl (5.8.8.820)? Did
you download the correct version (x86 vs x64)? The latest version is
he 'ActiveState - ActivePerl free Perl open source binary language
distribution - Dynamic Tools for Dynamic Languages'
(http://www.activestate.com/Products/ActivePerl/)

Anything interesting reported in your computer's Event Logs?

If you have found a bug in Perl, I suggest reporting it to ActiveState
so that they can fix it in the next release. ActiveState's bug tracker
is he 'ActiveState Bug Database - Simple Query Page'
(http://bugs.activestate.com/query.cg...uct=ActivePerl)


--
Scissor
  #3 (permalink)  
Old May 9th 07, 07:59 AM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default BUG: All http access blocked after running Perl script

Hi,

Yes, I am running the latest x86 version of ActiveState Perl (5.8.8. "with
50 registered patches").

There are no interesting messages in the Event Logs, but after the problem
appears, I start getting other strange errors as well. For example,
PostgreSQL starts rejecting new connections, and other network-related apps
fail. Also, the following is logged in the System log: "The DNS proxy agent
was unable to allocate 0 bytes of memory". Memory seems fine in Task Manager
(my computer has 3 GB installed). DameWare Mini Remote Control reports
"error 10013: An attempt was made to access a socket in a way forbidden by
its access permissions". Generally all socket-related operations seem to
fail (not just http).

I don't think this is a Perl problem because of the following reasons:

1. It only happens on Vista. XP runs the test script fine for hours.

2. The problem persists after Perl.exe has exited. Windows should release
all resources held by user-mode applications, shouldn't it? And especially
Vista should not let non-administrative programs affect other users.

3. The problem doesn't appear if I add a "sleep 1" in the test script and
run the script for hours. It only appears when many http requests are made
in rapid succession. This sounds like some kind of attack detection logic
that doesn't get properly reset.

Did you (or anyone else) reproduce the problem?

--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Scissor" wrote in message
...

Are you running the latest version of ActiveState Perl (5.8.8.820)? Did
you download the correct version (x86 vs x64)? The latest version is
he 'ActiveState - ActivePerl free Perl open source binary language
distribution - Dynamic Tools for Dynamic Languages'
(http://www.activestate.com/Products/ActivePerl/)

Anything interesting reported in your computer's Event Logs?

If you have found a bug in Perl, I suggest reporting it to ActiveState
so that they can fix it in the next release. ActiveState's bug tracker
is he 'ActiveState Bug Database - Simple Query Page'
(http://bugs.activestate.com/query.cg...uct=ActivePerl)


--
Scissor



  #4 (permalink)  
Old May 9th 07, 06:53 PM posted to microsoft.public.windows.vista.networking_sharing
Scissor
external usenet poster
 
Posts: 1
Default BUG: All http access blocked after running Perl script


I ran your above script for 57,000+ fetches against a remote web server
without running into any problems.

I changed the GET = "http://127.0.0.1/test.htm" section GET =
"http://172.16.96.14/"

What is in your test.htm file?

Note that on my laptop I am running 32-bit Vista Ultimate and Perl -v
shows v5.8.8 and "Binary build 820 [274739] provided by ActiveState
http://www.ActiveState.com"


--
Scissor
  #5 (permalink)  
Old May 9th 07, 07:30 PM posted to microsoft.public.windows.vista.networking_sharing
Scissor
external usenet poster
 
Posts: 1
Default BUG: All http access blocked after running Perl script


Not that this matters, but I noticed that your test script is a little
inefficient because it recreates the LWP::UserAgent and HTTP::Request
objects for each iteration of the while loop.

You should be able to create the objects just once ahead of time and
then reuse the objects inside the while loop. Below is an updated
script explaining my suggestion.

Note that the suggested changes should not have any effect on the
possible bug you originally reported.



Code:
--------------------

#!perl

use strict;
use warnings;
use LWP::UserAgent;

my $n = 1;
my $ua = LWP::UserAgent-new;
my $req = HTTP::Request-new(GET = "http://127.0.0.1/test.htm");
$req-header('Accept' = 'text/html');

while (1) {
print "Fetching page $n...";
my $res = $ua-request($req);

if ($res-is_success) {
print " OK!\n";
$n++;
}
else {
print " ERROR: " . $res-status_line . ".\n";
sleep 1;
}
}

--------------------


--
Scissor
  #6 (permalink)  
Old May 9th 07, 07:36 PM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default BUG: All http access blocked after running Perl script

Hi,

Thank you for the info! I am running 32-bit Vista Business on a desktop
Intel Core 2 Quad. My perl -v reported the exact same version as yours.

My test.htm file is a simple 5-byte text file containing the string "abc".
And I just got an involuntary repro from my real script that does about 1.5
requests per second against a remote server...

If anyone else can confirm this bug, I'd appreciate the info. I think I'll
have to contact MS support on this one.

--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Scissor" wrote in message
...

I ran your above script for 57,000+ fetches against a remote web server
without running into any problems.

I changed the GET = "http://127.0.0.1/test.htm" section GET =
"http://172.16.96.14/"

What is in your test.htm file?

Note that on my laptop I am running 32-bit Vista Ultimate and Perl -v
shows v5.8.8 and "Binary build 820 [274739] provided by ActiveState
http://www.ActiveState.com"


--
Scissor



  #7 (permalink)  
Old May 9th 07, 10:42 PM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default All http access blocked after running Perl script

Hi,

I've found out some new information about the problem:

1. The Internet Connection Sharing (ICS) service seems to be the culprit.
The problem goes away when I stop this service. However, restarting brings
the problem back immediately.

2. While ICS is enabled, and my Vista computer is crippled, other computers
on my network can succesfully connect to the Internet through ICS.

3. I found several other posts on the net describing probably the same
problem. All of them pointed to ICS and described the same symptoms.
However, none of them offered any real solutions.

So this definately looks like some kind of badly broken "intrusion
detection" logic in the Internet Connection Sharing service. I hope someone
from MS is reading this and takes appropriate actions. Contrary to other
reports on the net, I believe I have a solid repro case (the Perl script in
the original post).

--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Mikko Noromaa" wrote in message
...
BUG: All http access blocked after running Perl script

SUMMARY: Windows Vista blocks all http access from all users after running
the attached script (at the end of this post).

DESCRIPTION:

Create a file accessible at http://127.0.0.1/test.htm and run the attached
script. After about 12000-13000 fetches, the script starts reporting an
unknown error. After that, all http access on the computer is blocked on
all user accounts (after logging off and back on). When starting IE, it
reports an error immediately. I found no other way of fixing this than
rebooting my computer.

The problem can be reproduced by using any URL in the script, including a
real remote URL. The problem first occurred when I was running a real
script that fetched lots of real Web pages in a loop like the test script.

My guess is that either Perl is leaking some socket resources (and Vista
can't release them on process exit), or that Vista is somehow considering
the flood of http requests as an attack, and disabling http because of
that. It probably shouldn't disable http indefinitely, though. I have
uninstalled all anti-virus software and disabled the Windows Firewall, but
the problem persists.

Notice that the script was running without Administrative access, but it
still caused a systemwide problem.

TEST SCRIPT:

use strict;
use LWP::UserAgent;
my $n=1;
while (1) {
print "Fetching page $n...";
my $ua = LWP::UserAgent-new;
my $req = HTTP::Request-new(GET = "http://127.0.0.1/test.htm");
$req-header('Accept' = 'text/html');
my $res = $ua-request($req);
if ($res-is_success) {
print " OK!\n";
$n++;
}
else {
print " ERROR: " . $res-status_line . ".\n";
sleep 1;
}
}


--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -




  #8 (permalink)  
Old May 9th 07, 10:43 PM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default BUG: All http access blocked after running Perl script

Thanks, I'll check if my real app has the same inefficiency.

--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -

"Scissor" wrote in message
...

Not that this matters, but I noticed that your test script is a little
inefficient because it recreates the LWP::UserAgent and HTTP::Request
objects for each iteration of the while loop.

You should be able to create the objects just once ahead of time and
then reuse the objects inside the while loop. Below is an updated
script explaining my suggestion.

Note that the suggested changes should not have any effect on the
possible bug you originally reported.



Code:
--------------------

#!perl

use strict;
use warnings;
use LWP::UserAgent;

my $n = 1;
my $ua = LWP::UserAgent-new;
my $req = HTTP::Request-new(GET = "http://127.0.0.1/test.htm");
$req-header('Accept' = 'text/html');

while (1) {
print "Fetching page $n...";
my $res = $ua-request($req);

if ($res-is_success) {
print " OK!\n";
$n++;
}
else {
print " ERROR: " . $res-status_line . ".\n";
sleep 1;
}
}

--------------------


--
Scissor



  #9 (permalink)  
Old May 10th 07, 12:11 AM posted to microsoft.public.windows.vista.networking_sharing
Chuck
external usenet poster
 
Posts: 300
Default BUG: All http access blocked after running Perl script

On Wed, 9 May 2007 03:10:10 +0300, "Mikko Noromaa"
wrote:

BUG: All http access blocked after running Perl script

SUMMARY: Windows Vista blocks all http access from all users after running
the attached script (at the end of this post).


OK, I'll bite.

What purpose does the script serve?

"If it hurts every time you poke yourself in the eye with a sharp stick
(AOHELL), the obvious solution is to quit poking yourself in the eye with a
sharp stick (AOHELL).

If you absolutely MUST poke yourself in the eye with a sharp stick (AOHELL),
then feel free to seek assistance from the maker of the sharp stick (AOHELL)."

--
Cheers,
Chuck, MS-MVP [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.
  #10 (permalink)  
Old May 10th 07, 07:59 AM posted to microsoft.public.windows.vista.networking_sharing
Mikko Noromaa
external usenet poster
 
Posts: 6
Default BUG: All http access blocked after running Perl script

What purpose does the script serve?

From my original post:

"The problem can be reproduced by using any URL in the script, including a
real remote URL. The problem first occurred when I was running a real script
that fetched lots of real Web pages in a loop like the test script."

Ever heard of Web spidering?

--

Mikko Noromaa )
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -

"Chuck" wrote in message
...
On Wed, 9 May 2007 03:10:10 +0300, "Mikko Noromaa"

wrote:

BUG: All http access blocked after running Perl script

SUMMARY: Windows Vista blocks all http access from all users after running
the attached script (at the end of this post).


OK, I'll bite.

What purpose does the script serve?

"If it hurts every time you poke yourself in the eye with a sharp stick
(AOHELL), the obvious solution is to quit poking yourself in the eye with
a
sharp stick (AOHELL).

If you absolutely MUST poke yourself in the eye with a sharp stick
(AOHELL),
then feel free to seek assistance from the maker of the sharp stick
(AOHELL)."

--
Cheers,
Chuck, MS-MVP [Windows - Networking]
http://nitecruzr.blogspot.com/
Paranoia is not a problem, when it's a normal response from experience.
My email is AT DOT
actual address pchuck mvps org.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2012 Vista Banter.
The comments are property of their posters.