Freeze in perl script after cygwin upgrade 1.5.17 -> 1.5.18

Volker Quetschke quetschke@scytek.de
Mon Jul 4 16:41:00 GMT 2005


After upgrading cygwin yesterday I get the following reproducible
hang in a perl script starting an external program.

This is the perl script that works with the 1.5.17 cygwin dll and
hangs with  1.5.18:

-- snip perltest.pl --
#!/bin/perl

$extracmd='';
#$extracmd='sleep 1 && ';
$systemcall=$extracmd.'makecab.exe /V3 /F d:/w1/SRC680_m113/instsetoo_native/wntmsci10.pro/OpenOffice/ddf/en-US/openofficeorg1.ddf 2>&1 |';

open (DDF, "$systemcall") || die "can't run $!";
print("Started\n");
while (<DDF>) { print("Output:".$_.":\n"); }
close (DDF);
-- snap perltest.pl --

This is obviously not a self-contained testcase, as this script is ripped out
of the final parts of the openoffice build script. I can try to produce a self
contained example later.

I suspect the hang originates from a race condition somewhere, if you
uncomment the fourth line of the script it runs as expected.

I'll attach my cygcheck output. At the end of the mail I'll also show the
end of of the strace in case of the hang. If desired I can send the complete
strace.

Your help is appreciated.

       Volker


* Attention! Stop reading if you're offended by unsolicited strace outputs. *




The following lines are the end of of the strace in case of the hang:

    18   46556 [main] perl 3996 path_conv::check: this->path(c:\WINDOWS\system32\makecab.exe), has_acls(1)
    17   46573 [main] perl 3996 perhaps_suffix: buf c:\WINDOWS\system32\makecab.exe, suffix found '.exe'
    18   46591 [main] perl 3996 find_exec: /cygdrive/c/WINDOWS/system32/makecab.exe = find_exec (makecab.exe)
    21   46612 [main] perl 3996 spawnve: spawnve (/cygdrive/c/WINDOWS/system32/makecab.exe, makecab.exe, 10142D40)
    21   46633 [main] perl 3996 spawn_guts: spawn_guts (3, /cygdrive/c/WINDOWS/system32/makecab.exe)
    24   46657 [main] perl 3996 perhaps_suffix: prog '/cygdrive/c/WINDOWS/system32/makecab.exe'
    18   46675 [main] perl 3996 normalize_posix_path: src /cygdrive/c/WINDOWS/system32/makecab.exe
    17   46692 [main] perl 3996 normalize_posix_path: /cygdrive/c/WINDOWS/system32/makecab.exe = normalize_posix_path (/cygdrive/c/WINDOWS/system32/makecab.exe)
    19   46711 [main] perl 3996 mount_info::conv_to_win32_path: conv_to_win32_path (/cygdrive/c/WINDOWS/system32/makecab.exe)
    18   46729 [main] perl 3996 mount_info::cygdrive_win32_path: src '/cygdrive/c/WINDOWS/system32/makecab.exe', dst 'c:\WINDOWS\system32\makecab.exe'
    18   46747 [main] perl 3996 set_flags: flags: binary (0x2)
    16   46763 [main] perl 3996 mount_info::conv_to_win32_path: src_path /cygdrive/c/WINDOWS/system32/makecab.exe, dst c:\WINDOWS\system32\makecab.exe, flags 0x2A, rc 0
    33   46796 [main] perl 3996 symlink_info::check: not a symlink
    19   46815 [main] perl 3996 symlink_info::check: 0 = symlink.check (c:\WINDOWS\system32\makecab.exe, 0x22D6D0) (0x2A)
    19   46834 [main] perl 3996 path_conv::check: this->path(c:\WINDOWS\system32\makecab.exe), has_acls(1)
    17   46851 [main] perl 3996 perhaps_suffix: buf c:\WINDOWS\system32\makecab.exe, suffix found '.exe'
    82   46933 [main] perl 3996 spawn_guts: null_app_name 0 (c:\WINDOWS\system32\makecab.exe, c:\WINDOWS\system32\makecab.exe /V3 /F 
d:/w1/SRC680_m113/instsetoo_native/wntmsci10.pro/OpenOffice/ddf/en-US/openofficeorg1.ddf)
    24   46957 [main] perl 3996 build_env: envp 0x10142D40
    59   47016 [main] perl 3996 spenv::retrieve: no_envblock 0
    19   47035 [main] perl 3996 spenv::retrieve: duping existing value for 'HOMEDRIVE='
    21   47056 [main] perl 3996 spenv::retrieve: no_envblock 0
    16   47072 [main] perl 3996 spenv::retrieve: duping existing value for 'HOMEPATH='
    25   47097 [main] perl 3996 spenv::retrieve: no_envblock 0
    17   47114 [main] perl 3996 spenv::retrieve: duping existing value for 'LOGONSERVER='
    31   47145 [main] perl 3996 spenv::retrieve: no_envblock 0
    44   47189 [main] perl 3996 spenv::retrieve: no_envblock 0
    19   47208 [main] perl 3996 spenv::retrieve: no_envblock 0
    16   47224 [main] perl 3996 spenv::retrieve: duping existing value for 'SYSTEMROOT='
    29   47253 [main] perl 3996 spenv::retrieve: no_envblock 0
    23   47276 [main] perl 3996 spenv::retrieve: duping existing value for 'USERDOMAIN='
    17   47293 [main] perl 3996 spenv::retrieve: no_envblock 0
    16   47309 [main] perl 3996 spenv::retrieve: duping existing value for 'USERNAME='
    17   47326 [main] perl 3996 spenv::retrieve: no_envblock 0
    16   47342 [main] perl 3996 spenv::retrieve: duping existing value for 'USERPROFILE='
    27   47369 [main] perl 3996 build_env: env count 284, bytes 8732
    95   47464 [main] perl 3996 mmap64: addr 0, len 12288, prot 3, flags 22, fd -1, off 0
    85   47549 [main] perl 3996 fhandler_disk_file::mmap: 3F0000 = MapViewOfFileEx (h:6F0, access:1, 0, off:0, len:12288, addr:0)
    32   47581 [main] perl 3996 mmap64: 3F0000 = mmap() succeeded
    96   47677 [main] perl 3996 build_env: envp 0x611567C0, envc 284
    24   47701 [main] perl 3996 child_info::child_info: subproc_ready 0x6FC
  3267   50968 [main] perl 3996 spawn_guts: 3996 = spawn_guts (/cygdrive/c/WINDOWS/system32/makecab.exe, c:\WINDOWS\system32\makecab.exe /V3 /F 
d:/w1/SRC680_m113/instsetoo_native/wntmsci10.pro/OpenOffice/ddf/en-US/openofficeorg1.ddf)
    31   50999 [main] perl 3996! spawn_guts: new process name c:\WINDOWS\system32\makecab.exe
    60   51059 [main] perl 3996! _pinfo::dup_proc_pipe: closed wr_proc_pipe 0x7FC for pid 3996(3780)
   888   51947 [main] perl 3996! spawn_guts: spawned windows pid 3780
    26   51973 [main] perl 3996! child_info::sync: waiting for subproc_ready(0x6FC) and child process(0x71C)
   436   52409 [sig] perl 3996! wait_sig: signalled 0x6D4


-- 
PGP/GPG key  (ID: 0x9F8A785D)  available  from  wwwkeys.de.pgp.net
key-fingerprint 550D F17E B082 A3E9 F913  9E53 3D35 C9BA 9F8A 785D
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.log
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050704/d59c17d1/attachment.log>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20050704/d59c17d1/attachment.sig>


More information about the Cygwin mailing list