makecab.exe hangs on cygwin 3.1

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

makecab.exe hangs on cygwin 3.1

Mike Kaganski
Hello,

Using cygwin 3.1.2-1, I get a hang running a makecab.exe job started
from a perl script.

The version of perl is 5.26.3-2; Windows 10.0.18363 x64.

I was able to create a minimal reproducer in perl:

############

select STDERR; # non-buffering output - just to see printed messages
print "Preparing 80 MiB of random data... ";
open my $randfile, '<:raw', "/dev/random" or die;
open my $testbin, '>:raw', "test.bin" or die;
for ( my $i = 0; $i < 20480; $i++ )
{
     my $buf = '';
     read $randfile, $buf, 4*1024;
     print $testbin $buf;
}
close $randfile;
close $testbin;
print "done!\n";

my $syscall = "C:/Windows/System32/makecab.exe /V3 test.bin 2\>\&1 |";
my @makecaboutput = ();
print "Now the actual test: this hangs with cygwin 3.1 ... ";
open (CAB, $syscall);
while (<CAB>) { push(@makecaboutput, $_); }
close (CAB);
print "makecab finished!\n"; # <<< this never prints

for ( my $i = 0; $i <= $#makecaboutput; $i++ )
{
     print $makecaboutput[$i];
}

############

I put this code to c:/makecab/test.pm, and run from mintty as

$ perl c:/makecab/test.pm

The text "makecab finished!" never appears with cygwin 3.1; it appears
as expected (several seconds, most of which is creation of random test
data) with cygwin 3.0.7-1.

Note that the test creates two files in current directory: test.bin, and
(if succeeds) test.bi_


--
Best regards,
Mike Kaganski


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

cygcheck.sysinfo (58K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: makecab.exe hangs on cygwin 3.1

Jose Isaias Cabrera-2

Mike Kaganski, on Thursday, January 9, 2020 12:21 PM, wrote...

>
> Hello,
>
> Using cygwin 3.1.2-1, I get a hang running a makecab.exe job started
> from a perl script.
>
> The version of perl is 5.26.3-2; Windows 10.0.18363 x64.
>
> I was able to create a minimal reproducer in perl:
>
> ############
>
> select STDERR; # non-buffering output - just to see printed messages
> print "Preparing 80 MiB of random data... ";
> open my $randfile, '<:raw', "/dev/random" or die;
> open my $testbin, '>:raw', "test.bin" or die;
> for ( my $i = 0; $i < 20480; $i++ )
> {
>      my $buf = '';
>      read $randfile, $buf, 4*1024;
>      print $testbin $buf;
> }
> close $randfile;
> close $testbin;
> print "done!\n";
>
> my $syscall = "C:/Windows/System32/makecab.exe /V3 test.bin 2\>\&1 |";
> my @makecaboutput = ();
> print "Now the actual test: this hangs with cygwin 3.1 ... ";
> open (CAB, $syscall);
> while (<CAB>) { push(@makecaboutput, $_); }
> close (CAB);
> print "makecab finished!\n"; # <<< this never prints
>
> for ( my $i = 0; $i <= $#makecaboutput; $i++ )
> {
>      print $makecaboutput[$i];
> }
>
> ############
>
> I put this code to c:/makecab/test.pm, and run from mintty as
>
> $ perl c:/makecab/test.pm
>
> The text "makecab finished!" never appears with cygwin 3.1; it appears
> as expected (several seconds, most of which is creation of random test
> data) with cygwin 3.0.7-1.
>
> Note that the test creates two files in current directory: test.bin, and
> (if succeeds) test.bi_

Works fine with cytwin 3.0.7...
$ uname -a
CYGWIN_NT-10.0-WOW HOR711318E 3.0.7(0.338/5/3) 2019-04-30 18:04 i686 Cygwin

$ perl test.pm
Preparing 80 MiB of random data... done!
Now the actual test: this hangs with cygwin 3.1 ... makecab finished!
Cabinet Maker - Lossless Data Compression Tool

  0.00% - raw=0  compressed=0
  0.04% - raw=32,768  compressed=32,775
[clip]
 99.88% - raw=83,787,776  compressed=83,805,675
 99.92% - raw=83,820,544  compressed=83,838,450
 99.96% - raw=83,853,312  compressed=83,871,225
100.00% - raw=83,886,080  compressed=83,904,000
** test.bin placed in cabinet test.bi_(47251456) on disk
100.00% [flushing current folder]
eureka@HORSE ~

thanks.

josé


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

Reply | Threaded
Open this post in threaded view
|

Re: makecab.exe hangs on cygwin 3.1

Takashi Yano
In reply to this post by Mike Kaganski
On Thu, 9 Jan 2020 20:21:46 +0300
Mike Kaganski wrote:

> Using cygwin 3.1.2-1, I get a hang running a makecab.exe job started
> from a perl script.
>
> The version of perl is 5.26.3-2; Windows 10.0.18363 x64.
>
> I was able to create a minimal reproducer in perl:
>
> ############
>
> select STDERR; # non-buffering output - just to see printed messages
> print "Preparing 80 MiB of random data... ";
> open my $randfile, '<:raw', "/dev/random" or die;
> open my $testbin, '>:raw', "test.bin" or die;
> for ( my $i = 0; $i < 20480; $i++ )
> {
>      my $buf = '';
>      read $randfile, $buf, 4*1024;
>      print $testbin $buf;
> }
> close $randfile;
> close $testbin;
> print "done!\n";
>
> my $syscall = "C:/Windows/System32/makecab.exe /V3 test.bin 2\>\&1 |";
> my @makecaboutput = ();
> print "Now the actual test: this hangs with cygwin 3.1 ... ";
> open (CAB, $syscall);
> while (<CAB>) { push(@makecaboutput, $_); }
> close (CAB);
> print "makecab finished!\n"; # <<< this never prints
>
> for ( my $i = 0; $i <= $#makecaboutput; $i++ )
> {
>      print $makecaboutput[$i];
> }
>
> ############
>
> I put this code to c:/makecab/test.pm, and run from mintty as
>
> $ perl c:/makecab/test.pm
>
> The text "makecab finished!" never appears with cygwin 3.1; it appears
> as expected (several seconds, most of which is creation of random test
> data) with cygwin 3.0.7-1.

Thanks for the report. I looked into this problem and found
this occurs after commit:

commit e1a0775dc0545b5f9c81b09a327fc110c538b7b4
Author: Takashi Yano <[hidden email]>
Date:   Thu Sep 26 19:52:46 2019 +0900

    Cygwin: pty: Fix PTY so that cygwin setup shows help with -h option.

    - After commit 169d65a5774acc76ce3f3feeedcbae7405aa9b57, cygwin
      setup fails to show help message when -h option is specified, as
      reported in https://cygwin.com/ml/cygwin/2019-09/msg00248.html.
      This patch fixes the problem.

I have submitted a patch for this issue just now.


--
Takashi Yano <[hidden email]>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple