public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* mintty fails to start
       [not found] <2145564667.803491.1484839522957.ref@mail.yahoo.com>
@ 2017-01-19 15:28 ` Emember MemberUS via cygwin
  2017-01-19 21:03   ` Thomas Wolff
  2017-01-20 21:19   ` Emember MemberUS via cygwin
  0 siblings, 2 replies; 4+ messages in thread
From: Emember MemberUS via cygwin @ 2017-01-19 15:28 UTC (permalink / raw)
  To: cygwin

This is a minor issue and probably not typical, but could be of interest to cygwin developers/maintainers.

Problem: 
After building a 3-party cross-toolchain (unrelated to cygwin), mintty is no longer able to start.
While a few mintty windows that were still open worked ok, any NEW mintty window just flashed and immediately closed itself. 

Solution: 
Re-installation of cygwin from scratch is undesirable because current installation already has multiple customizations. 
Initial research yielded nothing - no error message, or hint of any kind, and discussion forums offered no clue either. 
The cause of the issue happened to be an empty file /bin/bash. It is currently unclear where it came from (could be a side 
effect of a build), but it is not part of standard cygwin installation. Once this empty file is deleted, mintty is able to start again. 


Suggestion: produce an error message that would help identifying this problem when mintty starts. 
NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash.
If no bash is present, mintty issues a correct error message.

--
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] 4+ messages in thread

* Re: mintty fails to start
  2017-01-19 15:28 ` mintty fails to start Emember MemberUS via cygwin
@ 2017-01-19 21:03   ` Thomas Wolff
  2017-01-20 21:19   ` Emember MemberUS via cygwin
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Wolff @ 2017-01-19 21:03 UTC (permalink / raw)
  To: cygwin

Am 19.01.2017 um 16:25 schrieb Emember MemberUS via cygwin:
> ...
>
> Suggestion: produce an error message that would help identifying this problem when mintty starts.
> NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash.
> If no bash is present, mintty issues a correct error message.
One interesting test case may be to remove the x bit from the empty bash 
file, to see that mintty handles invocation errors properly.
The issue is that invocation of an empty file (provided that the x bit 
is set) is not considered an error in a Linux environment, and thus on 
cygwin, so the exec system call does not report an error in the first place.
There is nothing that can be done about it, the behaviour is correct.
------
Thomas

--
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] 4+ messages in thread

* Re: mintty fails to start
  2017-01-19 15:28 ` mintty fails to start Emember MemberUS via cygwin
  2017-01-19 21:03   ` Thomas Wolff
@ 2017-01-20 21:19   ` Emember MemberUS via cygwin
  2017-01-20 21:35     ` Thomas Wolff
  1 sibling, 1 reply; 4+ messages in thread
From: Emember MemberUS via cygwin @ 2017-01-20 21:19 UTC (permalink / raw)
  To: cygwin





----- Original Message -----
From: Emember MemberUS <ememberus@yahoo.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Sent: Thursday, January 19, 2017 10:25 AM
Subject: mintty fails to start

This is a minor issue and probably not typical, but could be of interest to cygwin developers/maintainers.

Problem: 
After building a 3-party cross-toolchain (unrelated to cygwin), mintty is no longer able to start.
While a few mintty windows that were still open worked ok, any NEW mintty window just flashed and immediately closed itself. 

Solution: 
Re-installation of cygwin from scratch is undesirable because current installation already has multiple customizations. 
Initial research yielded nothing - no error message, or hint of any kind, and discussion forums offered no clue either. 
The cause of the issue happened to be an empty file /bin/bash. It is currently unclear where it came from (could be a side 
effect of a build), but it is not part of standard cygwin installation. Once this empty file is deleted, mintty is able to start again. 


Suggestion: produce an error message that would help identifying this problem when mintty starts. 
NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash.
If no bash is present, mintty issues a correct error message.


    ... 

    Suggestion: produce an error message that would help identifying this problem when mintty starts. 
    NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash. 
    If no bash is present, mintty issues a correct error message. 


    One interesting test case may be to remove the x bit from the empty bash file, to see that mintty handles invocation errors properly. The issue is that     invocation of an empty file (provided that the x bit is set) is not considered an error in a Linux environment, and thus on cygwin, so the exec system     call does not report an error in the first place. 
    There is nothing that can be done about it, the behaviour is correct. 
    ------ 
    Thomas 



---------------------------------------------------------


Correction:
replace <produce an error message> above with
<allow logging of exec call(s)>

Current behavior may be correct, but it makes cygwin vulnerable to such hard-to-detect configuration problems.

--
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] 4+ messages in thread

* Re: mintty fails to start
  2017-01-20 21:19   ` Emember MemberUS via cygwin
@ 2017-01-20 21:35     ` Thomas Wolff
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Wolff @ 2017-01-20 21:35 UTC (permalink / raw)
  To: cygwin

Am 20.01.2017 um 22:19 schrieb Emember MemberUS via cygwin:
>      ...
>
>      Suggestion: produce an error message that would help identifying this problem when mintty starts.
>      NOTE: this issue happens only in cygwin, and only when both files are present: /bin/bash.exe and empty /bin/bash.
>      If no bash is present, mintty issues a correct error message.
>
>
>      One interesting test case may be to remove the x bit from the empty bash file, to see that mintty handles invocation errors properly. The issue is that     invocation of an empty file (provided that the x bit is set) is not considered an error in a Linux environment, and thus on cygwin, so the exec system     call does not report an error in the first place.
>      There is nothing that can be done about it, the behaviour is correct.
>      ------
>      Thomas
>
>
> ---------------------------------------------------------
>
> Correction:
> replace <produce an error message> above with <allow logging of exec call(s)>
>
> Current behavior may be correct, but it makes cygwin vulnerable to such hard-to-detect configuration problems.
Please describe precisely what you have in mind. A log output before 
invoking the client program would normally not be desired. You can keep 
mintty from closing with option `-h alw` but you wouldn't see anything now.
Also this issue does not make cygwin vulnerable because on invocation of 
an empty program nothing happens.
------
Thomas

--
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] 4+ messages in thread

end of thread, other threads:[~2017-01-20 21:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <2145564667.803491.1484839522957.ref@mail.yahoo.com>
2017-01-19 15:28 ` mintty fails to start Emember MemberUS via cygwin
2017-01-19 21:03   ` Thomas Wolff
2017-01-20 21:19   ` Emember MemberUS via cygwin
2017-01-20 21:35     ` Thomas Wolff

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