Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

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

Driver Scanner

BUG: All http access blocked after running Perl script

microsoft.public.windows.vista.networking sharing






Speedup My PC
Reply
  #1 (permalink)  
Old 05-09-2007
Mikko Noromaa
 

Posts: n/a
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 (mikkon@excelsql.com)
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-09-2007
Scissor
 

Posts: n/a
Re: 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
here: '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 here: 'ActiveState Bug Database - Simple Query Page'
(http://bugs.activestate.com/query.cg...uct=ActivePerl)


--
Scissor
Reply With Quote
  #3 (permalink)  
Old 05-09-2007
Mikko Noromaa
 

Posts: n/a
Re: 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 (mikkon@excelsql.com)
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Scissor" <Scissor.2qarh8@no-mx.forums.net> wrote in message
news:Scissor.2qarh8@no-mx.forums.net...
>
> 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
> here: '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 here: 'ActiveState Bug Database - Simple Query Page'
> (http://bugs.activestate.com/query.cg...uct=ActivePerl)
>
>
> --
> Scissor



Reply With Quote
  #4 (permalink)  
Old 05-09-2007
Scissor
 

Posts: n/a
Re: 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
Reply With Quote
  #5 (permalink)  
Old 05-09-2007
Scissor
 

Posts: n/a
Re: 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
Reply With Quote
  #6 (permalink)  
Old 05-09-2007
Mikko Noromaa
 

Posts: n/a
Re: 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 (mikkon@excelsql.com)
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Scissor" <Scissor.2qbxu0@no-mx.forums.net> wrote in message
news:Scissor.2qbxu0@no-mx.forums.net...
>
> 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



Reply With Quote
  #7 (permalink)  
Old 05-09-2007
Mikko Noromaa
 

Posts: n/a
Re: 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 (mikkon@excelsql.com)
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -


"Mikko Noromaa" <excelsql@newsgroup.nospam> wrote in message
news:OW%23wh5ckHHA.3452@TK2MSFTNGP04.phx.gbl...
> 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 (mikkon@excelsql.com)
> - SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -
>
>



Reply With Quote
  #8 (permalink)  
Old 05-09-2007
Mikko Noromaa
 

Posts: n/a
Re: BUG: All http access blocked after running Perl script
Thanks, I'll check if my real app has the same inefficiency.

--

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

"Scissor" <Scissor.2qbzx7@no-mx.forums.net> wrote in message
news:Scissor.2qbzx7@no-mx.forums.net...
>
> 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



Reply With Quote
  #9 (permalink)  
Old 05-10-2007
Chuck
 

Posts: n/a
Re: BUG: All http access blocked after running Perl script
On Wed, 9 May 2007 03:10:10 +0300, "Mikko Noromaa" <excelsql@newsgroup.nospam>
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.
Reply With Quote
  #10 (permalink)  
Old 05-10-2007
Mikko Noromaa
 

Posts: n/a
Re: 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 (mikkon@excelsql.com)
- SQL in Excel, check out ExcelSQL! - see http://www.excelsql.com -

"Chuck" <none@example.net> wrote in message
news:rlo4439dm17ho8ei25uthq6ch62p0qtlri@4ax.com...
> On Wed, 9 May 2007 03:10:10 +0300, "Mikko Noromaa"
> <excelsql@newsgroup.nospam>
> 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.



Reply With Quote
Reply


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 Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Router access (running Vista) =?Utf-8?B?UkdB?= microsoft.public.windows.vista.networking sharing 15 05-08-2007 04:37
Custom Charts w/ Perl and GD Steve General Technology News 0 04-29-2007 20:54
DzSoft Perl Editor 5.8.0.7 VistaDev Vista Software Development Feed 0 04-10-2007 15:05
Running an HTA or WSH script as administrator microsoft.public.windows.vista.security 3 01-10-2007 17:49
Unable to access http://source-folder/SUBFOLDER =?Utf-8?B?VG9t?= microsoft.public.windows.vista.networking sharing 0 01-04-2007 04:10




All times are GMT +1. The time now is 20:28.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120