X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 	tests=AWL,BAYES_00,SPF_HELO_PASS
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Dick <dick@mrns.nl>
Subject: Re: bash exits when test or [ ] is used in Windows Server 2008
Date: Fri, 19 Mar 2010 16:55:16 +0000 (UTC)
Lines: 54
Message-ID: <loom.20100319T171156-91@post.gmane.org>
References: <1268395239.9484.8.camel@latitude>  <20100312125929.GM6505@calimero.vinschen.de>  <loom.20100312T171508-824@post.gmane.org> <20100312163108.GU6505@calimero.vinschen.de> <loom.20100312T210653-698@post.gmane.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

I can't reproduce this issue on a fresh install of Windows 2008 in a virtual 
machine using terminal server, I supppose it should just work but it doesn't.

When I start test or [ ] a stackdump is created with the following information:
Exception: STATUS_ACCESS_VIOLATION at eip=775D9832

Please note everything seems to work except [ ] and test in bash (the internal 
version! not /usr/bin/[ or /usr/bin/test)

I've also disable DEP for applications which doesn't help either.

cygcheck -srv doesn't find duplicate cygwin1.dll libraries, but it does find
HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin entries which aren't visible in regedit.exe.
I suppose this is caused by virtual registry.

strace bash -c '[ ]' gives the following output:
 6022  380278 [main] bash 4524 sig_send: sendsig 0x128, pid 4524, 
signal -34, its_me 1
  479  380757 [main] bash 4524 sig_send: wakeup 0x22C
  485  381242 [main] bash 4524 sig_send: Waiting for pack.wakeup 0x22C
    9  381251 [sig] bash 4524 wait_sig: signalling pack.wakeup 0x22C
  864  382115 [main] bash 4524 sig_send: returning 0x0 from sending 
signal -34
  406  382521 [main] bash 4524 sigaction_worker: signal 20, 
newact 0x27CB24 (handler 0x41E390), oa 0x0
 7408  389929 [main] bash 4524 sig_send: sendsig 0x128, pid 4524, 
signal -34, its_me 1
  737  390666 [main] bash 4524 sig_send: wakeup 0x230
  519  391185 [main] bash 4524 sig_send: Waiting for pack.wakeup 0x230
    9  391194 [sig] bash 4524 wait_sig: signalling pack.wakeup 0x230
 1048  392242 [main] bash 4524 sig_send: 
returning 0x0 from sending signal -34
  479  392721 [main] bash 4524 __set_errno: 
fhandler_socket* get(int):82 val 108
  469  393190 [main] bash 4524 cygwin_getpeername: -1 = getpeername (0) -1
 4975  398165 [main] bash 4524 set_signal_mask: oldmask 0x0, 
newmask 0x0, mask_bits 0x0
 2539  400704 [main] bash 4524 set_signal_mask: not calling 
sig_dispatch_pending
--- Process 4524, exception C0000005 at 753CA923
  835  401539 [main] bash 4524 _cygtls::handle_exceptions: 
In cygwin_except_handler exc 0xC0000005 at 0x775DAD42 sp 0x27
42D0
  853  402392 [main] bash 4524 _cygtls::handle_exceptions: 
In cygwin_except_handler sig 11 at 0x775DAD42
  886  403278 [main] bash 4524 _cygtls::handle_exceptions: 
In cygwin_except_handler calling 0x0
 403949 [main] bash 4524 _cygtls::handle_exceptions: 
Exception: STATUS_ACCESS_VIOLATION
  671  403949 [main] bash 4524 _cygtls::handle_exceptions: 
Exception: STATUS_ACCESS_VIOLATION
 1367  405316 [main] bash 4524 try_to_debug: debugger_command ''
 406131 [main] bash 4524 open_stackdumpfile: 
Dumping stack trace to bash.exe.stackdump


--
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

