public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* launching sh/bash from windows console (cmd) results in application Segmentation Faults
@ 2014-03-26 18:39 Scott Mitchell
  2014-03-26 19:50 ` Larry Hall (Cygwin)
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Mitchell @ 2014-03-26 18:39 UTC (permalink / raw)
  To: cygwin

==Problem==
When launching cygwin bash shell from windows command prompt (cmd)
then applications run by bash very frequently crash with Segmentation
Faults.  When this occurs applications that are launched by the shell
are not cleaned up after the shell session terminates (for example
ssh-agents and ssh processes remain and must be killed in task
manager).  This is also a problem when using cygwin from other shell
environments such as console2 and conemu.

==Environment==
Windows 7 SP1 x64.

Cygwin Version:
CYGWIN_NT-6.1 1.7.25(0.270/5/3) 2013-08-31 20:37 x86_64 Cygwin
-ssh-agent is present and run at startup

Bash version:
GNU bash, version 4.1.11(2)-release (x86_64-unknown-cygwin)

==Procedure==
1) Launch windows cmd
2) cd to cygwin bin dirctory
3) Execute "sh.exe --login -i" or "sh.exe --login" or "sh.exe -i"
4) Run "ps", "ls", "cat" processes 3 times each.
5) If segmentation faults are not observed run "ssh-add <key>" and
repeat step 4.

==Stack Dumps==
1)
Exception: STATUS_ACCESS_VIOLATION at rip=001800A6DDC
rax=0000000000030000 rbx=00000001802DF958 rcx=00000001802DF958
rdx=0000000001E20000 rsi=0000000000000001 rdi=0000000000000000
r8 =0000000000000008 r9 =0000000000000001 r10=0000000000230000
r11=0000000100411C89 r12=000000000022AA68 r13=0000000000000000
r14=000000000022AA70 r15=0000000000000000
rbp=000000000022AB20 rsp=000000000022A940
program=C:\cygwin64\bin\ls.exe, pid 5900, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
0000022AB20  001800A6DDC (00000000000, 0000022AB20, 0000022AA68, 00000000000)
0000022AB20  00180134677 (003FEFC8180, 0000022AA70, 00000000001, 0000022AA68)
0000022AB20  001801130AB (0000022AA70, 00000000001, 0000022AA68, 0010040E770)
0000022AB20  00100000003 (00000000001, 0000022AA68, 0010040E770, 001802BD480)
0000022AB20  003FEFC8180 (0000022AA68, 0010040E770, 001802BD480, 0000022AA68)
0000022AB20  0000022AA70 (0010040E770, 001802BD480, 0000022AA68, 001802A6740)
0000022AB20  00000000001 (001802BD480, 0000022AA68, 001802A6740, 001802A6740)
0000022AB20  0000022AA68 (0000022AA68, 001802A6740, 001802A6740, 001802A6740)
0000022AB20  0010040E770 (001802A6740, 001802A6740, 001802A6740, 001801736C0)
0000022AB20  001802BD480 (001802A6740, 001802A6740, 001801736C0, 00000000001)
0000022AB20  0000022AA68 (001802A6740, 001801736C0, 00000000001, 00000000000)
0000022AB20  001802A6740 (001801736C0, 00000000001, 00000000000, 04900720019)
0000022AB20  001802A6740 (00000000001, 00000000000, 04900720019, 00180163CAA)
0000022AB20  001802A6740 (00000000000, 04900720019, 00180163CAA, 001802DD820)
0000022AB20  001801736C0 (04900720019, 00180163CAA, 001802DD820, 001802DEE08)
0000022AB20  00000000001 (04900720019, 00180163CAA, 001802DD820, 001802DEE08)
End of stack trace (more stack frames may be present)

2)
Exception: STATUS_ACCESS_VIOLATION at rip=0018007A5AB
rax=00000000003F0000 rbx=0000000000228F30 rcx=0000779666DA0000
rdx=0000001400000000 rsi=00000001802E3BD8 rdi=0000000000000004
r8 =0000000000228AC8 r9 =0000000000228D20 r10=0000000000000000
r11=0000000000000246 r12=0000000000000020 r13=0000000000000001
r14=0000000000000001 r15=0000000000000001
rbp=0000000000228D20 rsp=0000000000228C10
program=C:\cygwin64\bin\ssh-add.exe, pid 3900, thread main
cs=0033 ds=002B es=002B fs=0053 gs=002B ss=002B
Stack trace:
Frame        Function    Args
00000228D20  0018007A5AB (0010041F160, 000002294E0, 00000000000, 000002294B0)
00000228D20  001801341DA (00000000000, 00000000400, 00000000000, 00000228DEF)
0010041F160  001801130AB (00000000400, 00000000000, 00000228DEF, 0000022942F)
0010041F160  00000471900 (00000000400, 00000000000, 00000228DEF, 0000022942F)
End of stack trace

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: launching sh/bash from windows console (cmd) results in application Segmentation Faults
  2014-03-26 18:39 launching sh/bash from windows console (cmd) results in application Segmentation Faults Scott Mitchell
@ 2014-03-26 19:50 ` Larry Hall (Cygwin)
  0 siblings, 0 replies; 5+ messages in thread
From: Larry Hall (Cygwin) @ 2014-03-26 19:50 UTC (permalink / raw)
  To: cygwin

On 3/26/2014 1:35 PM, Scott Mitchell wrote:
> ==Problem==
> When launching cygwin bash shell from windows command prompt (cmd)
> then applications run by bash very frequently crash with Segmentation
> Faults.  When this occurs applications that are launched by the shell
> are not cleaned up after the shell session terminates (for example
> ssh-agents and ssh processes remain and must be killed in task
> manager).  This is also a problem when using cygwin from other shell
> environments such as console2 and conemu.

Do you have the same problem with Cygwin 32 bits?  How about with
the current Cygwin package (1.7.28) with either 32 bits or 64?
I had no problem running this on 32-bits from W7 x64 with 1.7.28.


-- 
Larry

_____________________________________________________________________

A: Yes.
 > Q: Are you sure?
 >> A: Because it reverses the logical flow of conversation.
 >>> Q: Why is top posting annoying in 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: launching sh/bash from windows console (cmd) results in application Segmentation Faults
@ 2014-03-26 22:53 Scott Mitchell
  0 siblings, 0 replies; 5+ messages in thread
From: Scott Mitchell @ 2014-03-26 22:53 UTC (permalink / raw)
  To: cygwin

The settings on my machine prevent windows automated updates from
running.  The machine was pretty out of date and I manually ran
updates to bring it up snuff.  That being said I am no longer seeing
the segmentation fault issues with the cygwin64 bit executables.

However if I close the terminal, or the terminal closes in any other
way than my typing "exit" (or other exit type commands) then not all
applications are closed (ssh-agent is regularly left open in this
situation).

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: launching sh/bash from windows console (cmd) results in application Segmentation Faults
  2014-03-26 20:50 Scott Mitchell
@ 2014-03-26 22:04 ` Maximus5
  0 siblings, 0 replies; 5+ messages in thread
From: Maximus5 @ 2014-03-26 22:04 UTC (permalink / raw)
  To: cygwin

Scott Mitchell <scott.kevin.mitchell <at> gmail.com> writes:

> I am not sure if the is relevant but the "C:\Windows\System32\cmd.exe"
> I have been using is a 32 bit executable as reported by cygwin:
> $ file cmd.exe
> cmd.exe: PE32 executable (console) Intel 80386, for MS Windows
> 
> I am not sure if this is an alternative and I don't have any
> alternatives other than "C:\Windows\SysWOW64\cmd.exe" which is also
> reported as 32 bit.

That is because of redirection in Windows x64.
When you need to access (or run) any 64-bit windows app in system folder
from any 32-bit app, you need to use "sysnative" alias.

$ file /c/windows/sysnative/cmd.exe
/c/windows/sysnative/cmd.exe: PE32+ executable (console) x86-64, for MS 
Windows



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: launching sh/bash from windows console (cmd) results in application Segmentation Faults
@ 2014-03-26 20:50 Scott Mitchell
  2014-03-26 22:04 ` Maximus5
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Mitchell @ 2014-03-26 20:50 UTC (permalink / raw)
  To: cygwin

Do you have the same problem with Cygwin 32 bits?  How about with
the current Cygwin package (1.7.28) with either 32 bits or 64?
I had no problem running this on 32-bits from W7 x64 with 1.7.28.

___________________

I still have the same problem when updating to cygwin64 to 1.7.28:
CYGWIN_NT-6.1 1.7.28(0.271/5/3) 2014-02-09 21:06 x86_64 Cygwin

I just installed cygwin32 and it works as expected (I have not seen
any problems yet)
CYGWIN_NT-6.1-WOW64 1.7.28(0.271/5/3) 2014-02-09 21:06 i686 Cygwin

I am not sure if the is relevant but the "C:\Windows\System32\cmd.exe"
I have been using is a 32 bit executable as reported by cygwin:
$ file cmd.exe
cmd.exe: PE32 executable (console) Intel 80386, for MS Windows

I am not sure if this is an alternative and I don't have any
alternatives other than "C:\Windows\SysWOW64\cmd.exe" which is also
reported as 32 bit.

Any ideas or suggestions?

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-03-26 20:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-26 18:39 launching sh/bash from windows console (cmd) results in application Segmentation Faults Scott Mitchell
2014-03-26 19:50 ` Larry Hall (Cygwin)
2014-03-26 20:50 Scott Mitchell
2014-03-26 22:04 ` Maximus5
2014-03-26 22:53 Scott Mitchell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).