public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Regression on XP with "Fix OPOST for non-Cygwin pty slaves"
@ 2015-05-01 14:25 Johannes Schindelin
  2015-05-01 14:50 ` Johannes Schindelin
  2015-05-27 12:51 ` Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Johannes Schindelin @ 2015-05-01 14:25 UTC (permalink / raw)
  To: Takashi Yano, Corinna Vinschen; +Cc: cygwin

Hi Yano & Corinna,

I would like to ask you for help with fixing a regression I am 
experiencing on XP (and XP only, the problem does not occur with Windows 
7 or 8). It may be a 32-bit issue, but I cannot currently test on 64-bit 
XP.

Background: I am the maintainer of Git for Windows and we are hoping to 
release a new major release Real Soon Now, based on MSys2 (which in turn 
is based on Cygwin). To make the user experience a bit better, we want 
to allow users to double-click a "Git Bash" icon that simply launches a 
small, non-console MinGW executable which in turn basically sets up the 
PATH and MSYSTEM environment variables (as required for the MSys2 
runtime) and then launches a mintty with a bash inside. Please note that 
this small executable is *not* a console program but a GUI one 
(-mwindows instead of -mconsole) so that no console window flashes 
before the mintty window is shown.

Now, this strategy worked well so far, except that I recently found that 
Git Bash does not start in XP anymore, instead the mintty process just 
sits and waits for a while and after five to ten minutes, the mintty 
window appears with the message:

     Failed to fork child process: Resource temporarily unavailable.
     DLL rebasing may be required. See 'rebaseall --help'.

(Needless to say, a 'rebaseall' does not fix it.)

This problem does *not* occur if I call mintty from a `.bat` file or 
from `cmd` -- but as I said, I want to avoid flashing console windows -- 
and it also does not happen if I run a mintty from a freshly installed 
Cygwin (with cygwin package version 2.0.1-1) where the shortcut points 
directly to `mintty` which is a console application.

This symptom makes me believe that the culprit might be that 
msys-2.0.dll somehow expected an attached Win32 Console, and spins in 
circles when there is none.

Now, please note that I do *not* run a regular cygwin1.dll but rather an 
msys-2.0.dll that I had to patch even more to support users of the 
previous Git for Windows version (which was based on MSys1 and did 
things like allowing users to override their home directory using the 
HOME environment variable).

Starting with the diff on top of cygwin1.dll's sources, I bisected the 
problem down to the commit "Fix OPOST for non-Cygwin pty slaves":

https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=063e7da36fda3f42619d7df606d9f3d4920605aa

With this commit reverted, on top of the MSys2 and the Git for Windows 
patches, the mintty window appears correctly again when launched on 
32-bit XP via said GUI executable. You can see my current state here:

https://github.com/git-for-windows/msys2-runtime/tree/aae52e6d23e92cf71e6f7777ff9bb49588be8fdc

I would like to ask you for advice how to debug this regression further 
because I really would like to revert the revert and have a proper fix. 
Or maybe you have an idea how I can fix it directly?

Thanks,
Johannes

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

* Regression on XP with "Fix OPOST for non-Cygwin pty slaves"
  2015-05-01 14:25 Regression on XP with "Fix OPOST for non-Cygwin pty slaves" Johannes Schindelin
@ 2015-05-01 14:50 ` Johannes Schindelin
  2015-05-27 12:51 ` Corinna Vinschen
  1 sibling, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2015-05-01 14:50 UTC (permalink / raw)
  To: Takashi Yano, Corinna Vinschen; +Cc: cygwin

Hi Yano & Corinna,

I would like to ask you for help with fixing a regression I am 
experiencing on XP (and XP only, the problem does not occur with Windows 
7 or 8). It may be a 32-bit issue, but I cannot currently test on 64-bit 
XP.

Background: I am the maintainer of Git for Windows and we are hoping to 
release a new major release Real Soon Now, based on MSys2 (which in turn 
is based on Cygwin). To make the user experience a bit better, we want 
to allow users to double-click a "Git Bash" icon that simply launches a 
small, non-console MinGW executable which in turn basically sets up the 
PATH and MSYSTEM environment variables (as required for the MSys2 
runtime) and then launches a mintty with a bash inside. Please note that 
this small executable is *not* a console program but a GUI one 
(-mwindows instead of -mconsole) so that no console window flashes 
before the mintty window is shown.

Now, this strategy worked well so far, except that I recently found that 
Git Bash does not start in XP anymore, instead the mintty process just 
sits and waits for a while and after five to ten minutes, the mintty 
window appears with the message:

     Failed to fork child process: Resource temporarily unavailable.
     DLL rebasing may be required. See 'rebaseall --help'.

(Needless to say, a 'rebaseall' does not fix it.)

This problem does *not* occur if I call mintty from a `.bat` file or 
from `cmd` -- but as I said, I want to avoid flashing console windows -- 
and it also does not happen if I run a mintty from a freshly installed 
Cygwin (with cygwin package version 2.0.1-1) where the shortcut points 
directly to `mintty` which is a console application.

This symptom makes me believe that the culprit might be that 
msys-2.0.dll somehow expected an attached Win32 Console, and spins in 
circles when there is none.

Now, please note that I do *not* run a regular cygwin1.dll but rather an 
msys-2.0.dll that I had to patch even more to support users of the 
previous Git for Windows version (which was based on MSys1 and did 
things like allowing users to override their home directory using the 
HOME environment variable).

Starting with the diff on top of cygwin1.dll's sources, I bisected the 
problem down to the commit "Fix OPOST for non-Cygwin pty slaves":

https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=063e7da36fda3f42619d7df606d9f3d4920605aa

With this commit reverted, on top of the MSys2 and the Git for Windows 
patches, the mintty window appears correctly again when launched on 
32-bit XP via said GUI executable. You can see my current state here:

https://github.com/git-for-windows/msys2-runtime/tree/aae52e6d23e92cf71e6f7777ff9bb49588be8fdc

I would like to ask you for advice how to debug this regression further 
because I really would like to revert the revert and have a proper fix. 
Or maybe you have an idea how I can fix it directly?

Thanks,
Johannes

--
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: Regression on XP with "Fix OPOST for non-Cygwin pty slaves"
  2015-05-01 14:25 Regression on XP with "Fix OPOST for non-Cygwin pty slaves" Johannes Schindelin
  2015-05-01 14:50 ` Johannes Schindelin
@ 2015-05-27 12:51 ` Corinna Vinschen
  2015-05-28 20:13   ` Johannes Schindelin
  1 sibling, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2015-05-27 12:51 UTC (permalink / raw)
  To: cygwin; +Cc: Johannes Schindelin, Takashi Yano

[-- Attachment #1: Type: text/plain, Size: 3486 bytes --]

On May  1 16:25, Johannes Schindelin wrote:
> Hi Yano & Corinna,
> 
> I would like to ask you for help with fixing a regression I am experiencing
> on XP (and XP only, the problem does not occur with Windows 7 or 8). It may
> be a 32-bit issue, but I cannot currently test on 64-bit XP.
> 
> Background: I am the maintainer of Git for Windows and we are hoping to
> release a new major release Real Soon Now, based on MSys2 (which in turn is
> based on Cygwin). To make the user experience a bit better, we want to allow
> users to double-click a "Git Bash" icon that simply launches a small,
> non-console MinGW executable which in turn basically sets up the PATH and
> MSYSTEM environment variables (as required for the MSys2 runtime) and then
> launches a mintty with a bash inside. Please note that this small executable
> is *not* a console program but a GUI one (-mwindows instead of -mconsole) so
> that no console window flashes before the mintty window is shown.
> 
> Now, this strategy worked well so far, except that I recently found that Git
> Bash does not start in XP anymore, instead the mintty process just sits and
> waits for a while and after five to ten minutes, the mintty window appears
> with the message:
> 
>     Failed to fork child process: Resource temporarily unavailable.
>     DLL rebasing may be required. See 'rebaseall --help'.
> 
> (Needless to say, a 'rebaseall' does not fix it.)
> 
> This problem does *not* occur if I call mintty from a `.bat` file or from
> `cmd` -- but as I said, I want to avoid flashing console windows -- and it
> also does not happen if I run a mintty from a freshly installed Cygwin (with
> cygwin package version 2.0.1-1) where the shortcut points directly to
> `mintty` which is a console application.
> 
> This symptom makes me believe that the culprit might be that msys-2.0.dll
> somehow expected an attached Win32 Console, and spins in circles when there
> is none.
> 
> Now, please note that I do *not* run a regular cygwin1.dll but rather an
> msys-2.0.dll that I had to patch even more to support users of the previous
> Git for Windows version (which was based on MSys1 and did things like
> allowing users to override their home directory using the HOME environment
> variable).
> 
> Starting with the diff on top of cygwin1.dll's sources, I bisected the
> problem down to the commit "Fix OPOST for non-Cygwin pty slaves":
> 
> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=063e7da36fda3f42619d7df606d9f3d4920605aa
> 
> With this commit reverted, on top of the MSys2 and the Git for Windows
> patches, the mintty window appears correctly again when launched on 32-bit
> XP via said GUI executable. You can see my current state here:
> 
> https://github.com/git-for-windows/msys2-runtime/tree/aae52e6d23e92cf71e6f7777ff9bb49588be8fdc
> 
> I would like to ask you for advice how to debug this regression further
> because I really would like to revert the revert and have a proper fix. Or
> maybe you have an idea how I can fix it directly?

Hmm, this seems to be another fallout from introducing different OPOST
processing (via spearate pipes) for native and Cygwin processes.
Does the patch from https://cygwin.com/ml/cygwin/2015-05/msg00282.html
help, by any chance?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: Regression on XP with "Fix OPOST for non-Cygwin pty slaves"
  2015-05-27 12:51 ` Corinna Vinschen
@ 2015-05-28 20:13   ` Johannes Schindelin
  2015-05-28 23:25     ` Johannes Schindelin
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Schindelin @ 2015-05-28 20:13 UTC (permalink / raw)
  To: cygwin, Johannes Schindelin, Takashi Yano; +Cc: Corinna Vinschen

Hi Corrinna,

On 2015-05-27 14:50, Corinna Vinschen wrote:
> On May  1 16:25, Johannes Schindelin wrote:
>> Hi Yano & Corinna,
>> 
>> I would like to ask you for help with fixing a regression I am 
>> experiencing
>> on XP (and XP only, the problem does not occur with Windows 7 or 8). 
>> It may
>> be a 32-bit issue, but I cannot currently test on 64-bit XP.
>> 
>> Background: I am the maintainer of Git for Windows and we are hoping 
>> to
>> release a new major release Real Soon Now, based on MSys2 (which in 
>> turn is
>> based on Cygwin). To make the user experience a bit better, we want to 
>> allow
>> users to double-click a "Git Bash" icon that simply launches a small,
>> non-console MinGW executable which in turn basically sets up the PATH 
>> and
>> MSYSTEM environment variables (as required for the MSys2 runtime) and 
>> then
>> launches a mintty with a bash inside. Please note that this small 
>> executable
>> is *not* a console program but a GUI one (-mwindows instead of 
>> -mconsole) so
>> that no console window flashes before the mintty window is shown.
>> 
>> Now, this strategy worked well so far, except that I recently found 
>> that Git
>> Bash does not start in XP anymore, instead the mintty process just 
>> sits and
>> waits for a while and after five to ten minutes, the mintty window 
>> appears
>> with the message:
>> 
>>     Failed to fork child process: Resource temporarily unavailable.
>>     DLL rebasing may be required. See 'rebaseall --help'.
>> 
>> (Needless to say, a 'rebaseall' does not fix it.)
>> 
>> This problem does *not* occur if I call mintty from a `.bat` file or 
>> from
>> `cmd` -- but as I said, I want to avoid flashing console windows -- 
>> and it
>> also does not happen if I run a mintty from a freshly installed Cygwin 
>> (with
>> cygwin package version 2.0.1-1) where the shortcut points directly to
>> `mintty` which is a console application.
>> 
>> This symptom makes me believe that the culprit might be that 
>> msys-2.0.dll
>> somehow expected an attached Win32 Console, and spins in circles when 
>> there
>> is none.
>> 
>> Now, please note that I do *not* run a regular cygwin1.dll but rather 
>> an
>> msys-2.0.dll that I had to patch even more to support users of the 
>> previous
>> Git for Windows version (which was based on MSys1 and did things like
>> allowing users to override their home directory using the HOME 
>> environment
>> variable).
>> 
>> Starting with the diff on top of cygwin1.dll's sources, I bisected the
>> problem down to the commit "Fix OPOST for non-Cygwin pty slaves":
>> 
>> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=063e7da36fda3f42619d7df606d9f3d4920605aa
>> 
>> With this commit reverted, on top of the MSys2 and the Git for Windows
>> patches, the mintty window appears correctly again when launched on 
>> 32-bit
>> XP via said GUI executable. You can see my current state here:
>> 
>> https://github.com/git-for-windows/msys2-runtime/tree/aae52e6d23e92cf71e6f7777ff9bb49588be8fdc
>> 
>> I would like to ask you for advice how to debug this regression 
>> further
>> because I really would like to revert the revert and have a proper 
>> fix. Or
>> maybe you have an idea how I can fix it directly?
> 
> Hmm, this seems to be another fallout from introducing different OPOST
> processing (via spearate pipes) for native and Cygwin processes.
> Does the patch from https://cygwin.com/ml/cygwin/2015-05/msg00282.html
> help, by any chance?

Sadly, my test program still hangs when running with an msys2-runtime 
with that patch applied. I cannot say where exactly it hangs, just that 
the mintty I call from a GUI program spawns a thread that seems to wait 
until something times out.

I won't be able to investigate this during the next week, but I could 
put more effort into shedding more light into the problem in the second 
or third week of June.

Ciao,
Dscho

--
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: Regression on XP with "Fix OPOST for non-Cygwin pty slaves"
  2015-05-28 20:13   ` Johannes Schindelin
@ 2015-05-28 23:25     ` Johannes Schindelin
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Schindelin @ 2015-05-28 23:25 UTC (permalink / raw)
  To: cygwin, Johannes Schindelin, Takashi Yano; +Cc: Corinna Vinschen

Hi Corrinna,

On 2015-05-27 14:50, Corinna Vinschen wrote:
> On May  1 16:25, Johannes Schindelin wrote:
>> Hi Yano & Corinna,
>> 
>> I would like to ask you for help with fixing a regression I am 
>> experiencing
>> on XP (and XP only, the problem does not occur with Windows 7 or 8). 
>> It may
>> be a 32-bit issue, but I cannot currently test on 64-bit XP.
>> 
>> Background: I am the maintainer of Git for Windows and we are hoping 
>> to
>> release a new major release Real Soon Now, based on MSys2 (which in 
>> turn is
>> based on Cygwin). To make the user experience a bit better, we want to 
>> allow
>> users to double-click a "Git Bash" icon that simply launches a small,
>> non-console MinGW executable which in turn basically sets up the PATH 
>> and
>> MSYSTEM environment variables (as required for the MSys2 runtime) and 
>> then
>> launches a mintty with a bash inside. Please note that this small 
>> executable
>> is *not* a console program but a GUI one (-mwindows instead of 
>> -mconsole) so
>> that no console window flashes before the mintty window is shown.
>> 
>> Now, this strategy worked well so far, except that I recently found 
>> that Git
>> Bash does not start in XP anymore, instead the mintty process just 
>> sits and
>> waits for a while and after five to ten minutes, the mintty window 
>> appears
>> with the message:
>> 
>>     Failed to fork child process: Resource temporarily unavailable.
>>     DLL rebasing may be required. See 'rebaseall --help'.
>> 
>> (Needless to say, a 'rebaseall' does not fix it.)
>> 
>> This problem does *not* occur if I call mintty from a `.bat` file or 
>> from
>> `cmd` -- but as I said, I want to avoid flashing console windows -- 
>> and it
>> also does not happen if I run a mintty from a freshly installed Cygwin 
>> (with
>> cygwin package version 2.0.1-1) where the shortcut points directly to
>> `mintty` which is a console application.
>> 
>> This symptom makes me believe that the culprit might be that 
>> msys-2.0.dll
>> somehow expected an attached Win32 Console, and spins in circles when 
>> there
>> is none.
>> 
>> Now, please note that I do *not* run a regular cygwin1.dll but rather 
>> an
>> msys-2.0.dll that I had to patch even more to support users of the 
>> previous
>> Git for Windows version (which was based on MSys1 and did things like
>> allowing users to override their home directory using the HOME 
>> environment
>> variable).
>> 
>> Starting with the diff on top of cygwin1.dll's sources, I bisected the
>> problem down to the commit "Fix OPOST for non-Cygwin pty slaves":
>> 
>> https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=063e7da36fda3f42619d7df606d9f3d4920605aa
>> 
>> With this commit reverted, on top of the MSys2 and the Git for Windows
>> patches, the mintty window appears correctly again when launched on 
>> 32-bit
>> XP via said GUI executable. You can see my current state here:
>> 
>> https://github.com/git-for-windows/msys2-runtime/tree/aae52e6d23e92cf71e6f7777ff9bb49588be8fdc
>> 
>> I would like to ask you for advice how to debug this regression 
>> further
>> because I really would like to revert the revert and have a proper 
>> fix. Or
>> maybe you have an idea how I can fix it directly?
> 
> Hmm, this seems to be another fallout from introducing different OPOST
> processing (via spearate pipes) for native and Cygwin processes.
> Does the patch from https://cygwin.com/ml/cygwin/2015-05/msg00282.html
> help, by any chance?

Sadly, my test program still hangs when running with an msys2-runtime 
with that patch applied. I cannot say where exactly it hangs, just that 
the mintty I call from a GUI program spawns a thread that seems to wait 
until something times out.

I won't be able to investigate this during the next week, but I could 
put more effort into shedding more light into the problem in the second 
or third week of June.

Ciao,
Dscho

--
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:[~2015-05-28 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-01 14:25 Regression on XP with "Fix OPOST for non-Cygwin pty slaves" Johannes Schindelin
2015-05-01 14:50 ` Johannes Schindelin
2015-05-27 12:51 ` Corinna Vinschen
2015-05-28 20:13   ` Johannes Schindelin
2015-05-28 23:25     ` Johannes Schindelin

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