Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Plack CPAN distribution.

Report information
The Basics
Id: 67051
Status: open
Priority: 0/
Queue: Plack

People
Owner: Nobody in particular
Requestors: bo.johansson [...] lsn.se
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.99_75
Fixed in: (no value)



Subject: Tests are blocking in Windows 7
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2328
Download (untitled) / with headers
text/plain 2.2k
I am using: * Strawberry-perl-5.12.2.0 * Perl 5, version 12, subversion 2 (v5.12.2) built for MSWin32-x86-multi-thread * Windows 7 Home Premium with Service Pack 1 * Plack-0.9974 I tried ”cpan> test Plack” and got the output: ... Running make test C:\strawberry\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t t/*/*.t t/00_compile.t ................................. ok t/HTTP-Message-PSGI/content_length.t ........... ok t/HTTP-Message-PSGI/path_info.t ................ ok t/HTTP-Message-PSGI/utf8_req.t ................. ok t/HTTP-Server-PSGI/post.t ...................... and after some time: cannot open port: 10608 at C:/strawberry/perl/site/lib/Test/TCP.pm line 83. Then the test is blocked and it is impossible to close the windows with CPAN. I do not understand why the port can not be opened, but the blocking of the test is typical using Windows 7. By the installation of Dancer and Padre I saw similar problems with test using Test-TCP and for all with the test of Test-TCP. The heavy use of fork and kill(9, $child) in Test-TCP seem to be a problem. See also: https://rt.cpan.org/Public/Bug/Display.html?id=66437 and https://rt.cpan.org/Public/Bug/Display.html?id=66016. My conclusion is that if you want to have portable Perl modules you have to consider all systems to use. In Windows the emulation of fork is a weak point. Kill must be avoided, in portable perl code, because kill(9, $child) is inherently unsafe for pseudo-processes used in Windows. See also https://rt.cpan.org/Public/Bug/Display.html?id=66437#txn-911256 . If you want to have an reliable and easy way to install things using Test-TCP like Planck, the tests of Test-TCP and the way Test-TCP is used must be changed. So, at least until the emulation of fork in Windows is more safe, this is important: To add an advice to explicitly shut down child processes by the implementation of modules intended to be portable. The purpose with this is to avoid the related problem in the emulation of fork in Windows. In the documentation of fork there could be a warning about the problem and an reference to perlfork http://perldoc.perl.org/perlfork.html. In perlfork there should be an advice to explicitly shut down child processes and how to avoid using kill(9, $child).
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2464-1301437066-18.67051-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 70
I know some people are working on upstream i.e. Test::TCP to fix this.
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-2464-1301437066-18.67051-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-2464-1301437066-18.67051-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-2469-1301465698-1795.67051-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
From: bo.johansson [...] lsn.se
X-RT-Original-Encoding: utf-8
Content-Length: 693
Download (untitled) / with headers
text/plain 693b
Vid Tue, 29 Mar 2011 kl. 18.17.46, skrev MIYAGAWA: Show quoted text
> I know some people are working on upstream i.e. Test::TCP to fix this.
What I understand this can only partly be solved in Test-TCP. If you want to have an reliable and easy way to install things using Test-TCP like Planck, the tests of Test-TCP and the way Test-TCP is used must be changed. The tests of Plack must be written to explicitly shut down forked process without using kill. In portable Perl code kill must be avoided, because kill(9, $child) is inherently unsafe for pseudo-processes used in Windows. See also https://rt.cpan.org/Public/Bug/Display.html?id=66437#txn-911256 . My suggestion is to open this bug again!!
From miyagawa [...] gmail.com Wed Mar 30 02: 36:33 2011
MIME-Version: 1.0
X-Spam-Status: No, score=-5.423 tagged_above=-99.9 required=10 tests=[AWL=0.787, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_HI=-5, SPF_NEUTRAL=0.779, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-2469-1301465698-851.67051-5-0 [...] rt.cpan.org>
X-Spam-Flag: NO
References: <RT-Ticket-67051 [...] rt.cpan.org> <rt-3.8.HEAD-2464-1301437066-18.67051-5-0 [...] rt.cpan.org> <rt-3.8.HEAD-2469-1301465698-851.67051-5-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <BANLkTi=WO18ggdMA9gTAw9XC7ki=B2XH1w [...] mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -5.423
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] gmail.com
Authentication-Results: hipster.bestpractical.com (amavisd-new); domainkeys=pass header.from=miyagawa [...] gmail.com
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id D76BE24180B for <cpan-bug+Plack [...] hipster.bestpractical.com>; Wed, 30 Mar 2011 02:36:33 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BsLAQgL4lUCs for <cpan-bug+Plack [...] hipster.bestpractical.com>; Wed, 30 Mar 2011 02:36:32 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 24C16241801 for <bug-Plack [...] rt.cpan.org>; Wed, 30 Mar 2011 02:36:32 -0400 (EDT)
Received: (qmail 21498 invoked by uid 103); 30 Mar 2011 06:36:31 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 30 Mar 2011 06:36:31 -0000
Received: from mail-qw0-f50.google.com (HELO mail-qw0-f50.google.com) (209.85.216.50) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Tue, 29 Mar 2011 23:36:29 -0700
Received: by qwe5 with SMTP id 5so617867qwe.9 for <bug-Plack [...] rt.cpan.org>; Tue, 29 Mar 2011 23:36:26 -0700 (PDT)
Received: by 10.229.67.221 with SMTP id s29mr623080qci.210.1301466986205; Tue, 29 Mar 2011 23:36:26 -0700 (PDT)
Received: by 10.229.43.98 with HTTP; Tue, 29 Mar 2011 23:36:06 -0700 (PDT)
Delivered-To: cpan-bug+Plack [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #67051] Tests are blocking in Windows 7
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=B+ymVGAfWCyyfb+9Jb21m2HAfCPeqSf1xbDmS6+oklJRh1RygGYJbYxNP80Z6QGiAK yHYtCL7oXt40A7lqXU5afJYTL6hMJ4qFqnmQKtTLEGpmogebx7cPbDi+xzrFXss7nspO M8iLv0gJta6txlv1iiHb16IfzP+qMFN4BokZg=
Return-Path: <miyagawa [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=+TgsDx7YEsDCnpn1HlxsBVVS2dPilmJs3THoTG9TDUY=; b=PFZUZwxdWa39f3hoTIT7uxjs62o1B8MSCWfKekp3o6oE1XR48f/8b+Za0ZuNTCQVZE 7QJzjpN/j4sRbLqVGl8/rFtewIwFJDKDkhBtWa5/Gu2pBtFjh1rkofNRQyg1DsoFFJkl y4E0brqKQ1TYGQtYj188Msiy4CbTrSDccIdyU=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+Plack [...] hipster.bestpractical.com
X-RT-Mail-Extension: plack
Date: Tue, 29 Mar 2011 23:36:06 -0700
X-Spam-Level:
To: bug-Plack [...] rt.cpan.org
Content-Transfer-Encoding: quoted-printable
From: Tatsuhiko Miyagawa <miyagawa [...] gmail.com>
RT-Message-ID: <rt-3.8.HEAD-2465-1301466994-1850.67051-0-0 [...] rt.cpan.org>
Content-Length: 682
Download (untitled) / with headers
text/plain 682b
On Tue, Mar 29, 2011 at 11:14 PM, Bo Johansson via RT <bug-Plack@rt.cpan.org> wrote: Show quoted text
> Vid Tue, 29 Mar 2011 kl. 18.17.46, skrev MIYAGAWA:
>> I know some people are working on upstream i.e. Test::TCP to fix this.
> > What I understand this can only partly be solved in Test-TCP. > > If you want to have an reliable and easy way to install things using > Test-TCP like Planck, the tests of Test-TCP and the way > Test-TCP is used must be changed. > > The tests of Plack must be written to explicitly shut down forked > process without using  kill.
There're absolutely no tests in Plack that use kill to shut down tests. Once the upstream Test-TCP is fixed then this is a non-issue.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.