public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
@ 2021-11-04 15:02 Brian
  2021-11-05  3:39 ` Takashi Yano
  0 siblings, 1 reply; 12+ messages in thread
From: Brian @ 2021-11-04 15:02 UTC (permalink / raw)
  To: cygwin

GCM (Git Credential Manager) - Core fails to properly authenticate with
previously stored credentials under the latest 3.3.0 release version of the
Cygwin DLL (the bug itself and steps to recreate was originally submitted
to the GCM-Core team here:
https://github.com/microsoft/Git-Credential-Manager-Core/issues/509).  By
replacing the Cygwin DLL with the 0913 snapshot, the problem no longer
occurs. One of the GCM-Core devs suggested it might be a regression issue
in the DLL.  Unfortunately, I don't have the C chops to explore this
further.

  --Brian

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-04 15:02 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot Brian
@ 2021-11-05  3:39 ` Takashi Yano
       [not found]   ` <CAEv6GOA-y58YrftXgEgFrjqtOTHmfdu2Vrq76Lwn0suZpZ=U9w@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: Takashi Yano @ 2021-11-05  3:39 UTC (permalink / raw)
  To: cygwin

On Thu, 4 Nov 2021 10:02:55 -0500
Brian wrote:
> GCM (Git Credential Manager) - Core fails to properly authenticate with
> previously stored credentials under the latest 3.3.0 release version of the
> Cygwin DLL (the bug itself and steps to recreate was originally submitted
> to the GCM-Core team here:
> https://github.com/microsoft/Git-Credential-Manager-Core/issues/509).  By
> replacing the Cygwin DLL with the 0913 snapshot, the problem no longer
> occurs. One of the GCM-Core devs suggested it might be a regression issue
> in the DLL.  Unfortunately, I don't have the C chops to explore this
> further.

Could you please provide the detailed steps to reproduce your problem?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
       [not found]   ` <CAEv6GOA-y58YrftXgEgFrjqtOTHmfdu2Vrq76Lwn0suZpZ=U9w@mail.gmail.com>
@ 2021-11-05  8:05     ` Takashi Yano
  2021-11-05 13:42       ` Brian
  0 siblings, 1 reply; 12+ messages in thread
From: Takashi Yano @ 2021-11-05  8:05 UTC (permalink / raw)
  To: cygwin

On Thu, 4 Nov 2021 23:29:39 -0500
Brian wrote:
> I posted the steps needed to reproduce the problem in the following link:
> https://github.com/microsoft/Git-Credential-Manager-Core/issues/509. This
> includes the version of GCM-Core that was installed as well as how to
> reproduce the issue.
> 
> I also included detailed logs.
> 
> Was there something additional that you needed?

Yes.

I am not familiar with GCM core at all, so need more detailed steps.

Should I download gcmcore-win-x86-2.0.567.18224.exe and install it?
Or other than that?

How do you run it in cygwin?

Do you assume to associate cygwin git with GCM core?
Or do you use git in "Git for Windows" inside cygwin?

How should I setup git repository to use GCM core?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05  8:05     ` Takashi Yano
@ 2021-11-05 13:42       ` Brian
  2021-11-05 19:41         ` Takashi Yano
  2021-11-06  6:24         ` ASSI
  0 siblings, 2 replies; 12+ messages in thread
From: Brian @ 2021-11-05 13:42 UTC (permalink / raw)
  To: Takashi Yano; +Cc: cygwin

Starting  point: Cygwin 3.3.0s(0.341/5/3), Windows Version 10.0.17763 Build
17763, no git managers/clients initially installed.

1.  Install git version 2.33.0 via the Cygwin installer (only the CLI).
2.  Download the GCM-Core 2.0.567 release zip file (
https://github.com/microsoft/Git-Credential-Manager-Core/releases/) and
extract somewhere.
3.  Copy all *.exe and *.dll files to your Cygwin /usr/libexec/git-core/
directory.
4.  Set up the credential helper: 'git config --global credential.helper
manager-core'
5.  Clone a repo.
6.  Attempt a 'git push' using the git repo's https URL.  GCM will pop up a
browser-based UI for initial authentication.  After entering username and
PAT credentials, and receiving the 'Everything is up-to-date' message,
confirm that your git credentials appear in the Windows Credential Manager.
7.  Attempt another 'git push'.
EXPECTED BEHAVIOR:
'Everything is up-to-date' (there should be no CLI or UI authentication
prompts).
OBSERVED BEHAVIOR:
The user is again presented with an authentication prompts from git.
8.  Replace cygwin1.dll with the 0913 snapshot.
9.  Attempt a 'git push'.  If your credentials were cached in WCM per step
6, you should immediately see the 'Everything is up-to-date' reply.  If
your credentials weren't stored for some reason, you will be prompted for
authentication.  A subsequent 'git push' should then use your cached
credentials.

Please let me know if there are any other steps you think might be missing.

  --Brian

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05 13:42       ` Brian
@ 2021-11-05 19:41         ` Takashi Yano
  2021-11-05 20:08           ` Ken Brown
  2021-11-05 21:32           ` Brian
  2021-11-06  6:24         ` ASSI
  1 sibling, 2 replies; 12+ messages in thread
From: Takashi Yano @ 2021-11-05 19:41 UTC (permalink / raw)
  To: cygwin

On Fri, 5 Nov 2021 08:42:03 -0500
Brian wrote:
> Starting  point: Cygwin 3.3.0s(0.341/5/3), Windows Version 10.0.17763 Build
> 17763, no git managers/clients initially installed.
> 
> 1.  Install git version 2.33.0 via the Cygwin installer (only the CLI).
> 2.  Download the GCM-Core 2.0.567 release zip file (
> https://github.com/microsoft/Git-Credential-Manager-Core/releases/) and
> extract somewhere.
> 3.  Copy all *.exe and *.dll files to your Cygwin /usr/libexec/git-core/
> directory.
> 4.  Set up the credential helper: 'git config --global credential.helper
> manager-core'
> 5.  Clone a repo.
> 6.  Attempt a 'git push' using the git repo's https URL.  GCM will pop up a
> browser-based UI for initial authentication.  After entering username and
> PAT credentials, and receiving the 'Everything is up-to-date' message,
> confirm that your git credentials appear in the Windows Credential Manager.
> 7.  Attempt another 'git push'.
> EXPECTED BEHAVIOR:
> 'Everything is up-to-date' (there should be no CLI or UI authentication
> prompts).
> OBSERVED BEHAVIOR:
> The user is again presented with an authentication prompts from git.
> 8.  Replace cygwin1.dll with the 0913 snapshot.
> 9.  Attempt a 'git push'.  If your credentials were cached in WCM per step
> 6, you should immediately see the 'Everything is up-to-date' reply.  If
> your credentials weren't stored for some reason, you will be prompted for
> authentication.  A subsequent 'git push' should then use your cached
> credentials.

Thanks much for the detailed steps. I could reproduce the problem.

It seems that the cause is the overhaul for the pipe implementation.
I also found the workaround for this issue. Please try:
export CYGWIN=pipe_byte

Corinna, Ken,
What about setting pipe mode to byte by default?

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05 19:41         ` Takashi Yano
@ 2021-11-05 20:08           ` Ken Brown
  2021-11-06 16:22             ` Ken Brown
  2021-11-05 21:32           ` Brian
  1 sibling, 1 reply; 12+ messages in thread
From: Ken Brown @ 2021-11-05 20:08 UTC (permalink / raw)
  To: cygwin

Hi Takashi,

On 11/5/2021 3:41 PM, Takashi Yano via Cygwin wrote:
> Thanks much for the detailed steps. I could reproduce the problem.
> 
> It seems that the cause is the overhaul for the pipe implementation.
> I also found the workaround for this issue. Please try:
> export CYGWIN=pipe_byte
> 
> Corinna, Ken,
> What about setting pipe mode to byte by default?

I have a vague recollection that this caused some other problem, but I'll have 
to review the email discussions from a few months ago.  I'm traveling at the 
moment and won't get to this for a few days.

In the meantime, could you explain (probably on cygwin-developers) why message 
mode causes the reported issue?  Also, does the problem occur only when there 
are non-Cygwin apps involved?

Thanks.

Ken

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05 19:41         ` Takashi Yano
  2021-11-05 20:08           ` Ken Brown
@ 2021-11-05 21:32           ` Brian
  1 sibling, 0 replies; 12+ messages in thread
From: Brian @ 2021-11-05 21:32 UTC (permalink / raw)
  To: Takashi Yano; +Cc: cygwin

On Fri, Nov 5, 2021 at 2:41 PM Takashi Yano <takashi.yano@nifty.ne.jp>
wrote:

>
> It seems that the cause is the overhaul for the pipe implementation.
> I also found the workaround for this issue. Please try:
> export CYGWIN=pipe_byte
>
> Indeed, that does solve the problem.  Thanks for looking into this!

  --Brian

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05 13:42       ` Brian
  2021-11-05 19:41         ` Takashi Yano
@ 2021-11-06  6:24         ` ASSI
  2021-11-08 16:30           ` Andrey Repin
  1 sibling, 1 reply; 12+ messages in thread
From: ASSI @ 2021-11-06  6:24 UTC (permalink / raw)
  To: cygwin

Brian via Cygwin writes:
> 1.  Install git version 2.33.0 via the Cygwin installer (only the CLI).
> 2.  Download the GCM-Core 2.0.567 release zip file (
> https://github.com/microsoft/Git-Credential-Manager-Core/releases/) and
> extract somewhere.
> 3.  Copy all *.exe and *.dll files to your Cygwin /usr/libexec/git-core/
> directory.

This is wrong on so many levels that I don't even know where to start.

> Please let me know if there are any other steps you think might be missing.

You either need to have a proper Cygwin package and/or wrappers to put
into Cygwin that use the Windows executables.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-05 20:08           ` Ken Brown
@ 2021-11-06 16:22             ` Ken Brown
  0 siblings, 0 replies; 12+ messages in thread
From: Ken Brown @ 2021-11-06 16:22 UTC (permalink / raw)
  To: cygwin

On 11/5/2021 4:08 PM, Ken Brown via Cygwin wrote:
> On 11/5/2021 3:41 PM, Takashi Yano via Cygwin wrote:
>> What about setting pipe mode to byte by default?
> 
> I have a vague recollection that this caused some other problem, but I'll have 
> to review the email discussions from a few months ago.  I'm traveling at the 
> moment and won't get to this for a few days.

I found it:

   https://cygwin.com/pipermail/cygwin-developers/2021-August/012219.html

Ken

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-06  6:24         ` ASSI
@ 2021-11-08 16:30           ` Andrey Repin
  2021-11-08 20:49             ` Adam Dinwoodie
  0 siblings, 1 reply; 12+ messages in thread
From: Andrey Repin @ 2021-11-08 16:30 UTC (permalink / raw)
  To: ASSI, cygwin

Greetings, ASSI!

> Brian via Cygwin writes:
>> 1.  Install git version 2.33.0 via the Cygwin installer (only the CLI).
>> 2.  Download the GCM-Core 2.0.567 release zip file (
>> https://github.com/microsoft/Git-Credential-Manager-Core/releases/) and
>> extract somewhere.
>> 3.  Copy all *.exe and *.dll files to your Cygwin /usr/libexec/git-core/
>> directory.

> This is wrong on so many levels that I don't even know where to start.

Well, then start somewhere?

>> Please let me know if there are any other steps you think might be missing.

> You either need to have a proper Cygwin package and/or wrappers to put
> into Cygwin that use the Windows executables.

The git itself is a wrapper in this case.


-- 
With best regards,
Andrey Repin
Monday, November 8, 2021 19:30:22

Sorry for my terrible english...


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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-08 16:30           ` Andrey Repin
@ 2021-11-08 20:49             ` Adam Dinwoodie
  2021-11-08 23:18               ` Brian Koontz
  0 siblings, 1 reply; 12+ messages in thread
From: Adam Dinwoodie @ 2021-11-08 20:49 UTC (permalink / raw)
  To: cygwin; +Cc: ASSI, Andrey Repin

On Mon, 8 Nov 2021 at 16:36, Andrey Repin via Cygwin <cygwin@cygwin.com> wrote:
>
> Greetings, ASSI!
>
> > Brian via Cygwin writes:
> >> 1.  Install git version 2.33.0 via the Cygwin installer (only the CLI).
> >> 2.  Download the GCM-Core 2.0.567 release zip file (
> >> https://github.com/microsoft/Git-Credential-Manager-Core/releases/) and
> >> extract somewhere.
> >> 3.  Copy all *.exe and *.dll files to your Cygwin /usr/libexec/git-core/
> >> directory.
>
> > This is wrong on so many levels that I don't even know where to start.
>
> Well, then start somewhere?

This is mixing Cygwin and non-Cygwin binaries in a way that will make
debugging problems difficult. Applications compiled for Cygwin have
different styles of interfaces to those compiled for native Windows,
as they're using Cygwin's approximations to Linux APIs, so it's not
safe to rely on them working together seamlessly.

> >> Please let me know if there are any other steps you think might be missing.
>
> > You either need to have a proper Cygwin package and/or wrappers to put
> > into Cygwin that use the Windows executables.
>
> The git itself is a wrapper in this case.

Cygwin Git is not inherently an appropriate wrapper to allow Cygwin
applications to seamlessly communicate with non-Cygwin Windows
applications. Naively mixing the two will work sometimes, but it's
reasonable to expect problems due to, for example, the fact that a
native Windows application and a Cygwin application will have very
different ideas about the absolute path to a given file.

In this case, it looks like the change of behaviour was an unintended
side-effect of changes made to the Cygwin DLL, and the folk working on
the DLL have found a way to get things working as expected for Brian.
Nonetheless I agree with Achim, and in general I wouldn't expect the
steps Brian was taking to work reliably anyway. I would expect that,
to get things working within Cygwin's design paradigms, one would need
to either (a) compile GCM as a Cygwin application, (b) not use Cygwin
at all and instead swap to Git for Windows, or (c) write a shim
application that uses native Windows APIs to talk to GCM and
*nix-style Cygwin APIs to talk to Cygwin Git.

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

* Re: 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot
  2021-11-08 20:49             ` Adam Dinwoodie
@ 2021-11-08 23:18               ` Brian Koontz
  0 siblings, 0 replies; 12+ messages in thread
From: Brian Koontz @ 2021-11-08 23:18 UTC (permalink / raw)
  To: Adam Dinwoodie; +Cc: cygwin, ASSI

Unfortunately, users don’t always have the time or chops to write wrappers for missing Cygwin packages or functionality. By its very nature, a Cygwin environment will always involve non-Cygwin components . In this case, the GCM-Core devs are actively working on a Cygwin solution and were able to pinpoint the cause.

I’m a developer too, just not a Cygwin dev. I know what it’s like being forced to work in a mixed environment. Whenever possible, I prefer Cygwin packages if they are available. Even then, the environment will always remain mixed. I wouldn’t report a bug I suspected was caused by the mixed environment. This wasn’t one of those situations.

Thanks for all the work you all do with Cygwin. My work would be exponentially more inefficient without Cygwin.

Brian

> On Nov 8, 2021, at 2:50 PM, Adam Dinwoodie <adam@dinwoodie.org> wrote:
> 
> 
> 
> Cygwin Git is not inherently an appropriate wrapper to allow Cygwin
> applications to seamlessly communicate with non-Cygwin Windows
> applications. Naively mixing the two will work sometimes, but it's
> reasonable to expect problems due to, for example, the fact that a
> native Windows application and a Cygwin application will have very
> different ideas about the absolute path to a given file.
> 
> In this case, it looks like the change of behaviour was an unintended
> side-effect of changes made to the Cygwin DLL, and the folk working on
> the DLL have found a way to get things working as expected for Brian.
> Nonetheless I agree with Achim, and in general I wouldn't expect the
> steps Brian was taking to work reliably anyway. I would expect that,
> to get things working within Cygwin's design paradigms, one would need
> to either (a) compile GCM as a Cygwin application, (b) not use Cygwin
> at all and instead swap to Git for Windows, or (c) write a shim
> application that uses native Windows APIs to talk to GCM and
> *nix-style Cygwin APIs to talk to Cygwin Git.
> 
> -- 
> Problem reports:      https://cygwin.com/problems.html
> FAQ:                  https://cygwin.com/faq/
> Documentation:        https://cygwin.com/docs.html
> Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2021-11-08 23:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-04 15:02 3.3.0: Possible regression in cygwin DLL (Win10); fixed in snapshot Brian
2021-11-05  3:39 ` Takashi Yano
     [not found]   ` <CAEv6GOA-y58YrftXgEgFrjqtOTHmfdu2Vrq76Lwn0suZpZ=U9w@mail.gmail.com>
2021-11-05  8:05     ` Takashi Yano
2021-11-05 13:42       ` Brian
2021-11-05 19:41         ` Takashi Yano
2021-11-05 20:08           ` Ken Brown
2021-11-06 16:22             ` Ken Brown
2021-11-05 21:32           ` Brian
2021-11-06  6:24         ` ASSI
2021-11-08 16:30           ` Andrey Repin
2021-11-08 20:49             ` Adam Dinwoodie
2021-11-08 23:18               ` Brian Koontz

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