cygin 3.6.2-1 under Win11 24H2: Cannot launch: no available terminals

Johannes Schindelin Johannes.Schindelin@gmx.de
Mon Jun 2 21:34:47 GMT 2025


Hi Robert,

On Wed, 28 May 2025, Robert Fensterman wrote:

> getent passwd %USERNAME%
> is blank

I _think_ that you are running this in a Bash, therefore you'd need to run
`getent passwd $USER`.

As it were, I did reproduce the issue on my end, and this command-line
reports a SID that starts with `S-1-12-1`. Together with this information:

> With cygwin 3.6.2-1, I can start bash directly from a CMD window (though it
> can't find programs, just built-ins).
> Interestingly: after that test, that and reverting back to .1, my
> .bash_history permissions seem to be wrong: instead of my AzureAD user as
> the owner, Windows sees some other SID as owning the file and bash (in
> cygwin) can't read it (eg., up-arrow doesn't go up past the start of the
> instance of the shell, where it normally goes quite a bit further back in
> time). As a workaround, I've given "everyone" rwx permissions, and it seems
> to be working fine.

and bisecting my problem to
https://github.com/cygwin/cygwin/commit/48e7d632689313106d16b0de035fb955c54492b2,
the following diff (which partially reverts that commit) fixes it for me:

```diff
diff --git a/winsup/cygwin/uinfo.cc b/winsup/cygwin/uinfo.cc
index 83883f9f65..795a00cc1a 100644
--- a/winsup/cygwin/uinfo.cc
+++ b/winsup/cygwin/uinfo.cc
@@ -1996,10 +1996,12 @@ pwdgrp::fetch_account_from_windows (fetch_user_arg_t &arg, cyg_ldap *pldap)
       if (sid_id_auth (sid) == 5 /* SECURITY_NT_AUTHORITY */
 	  && sid_sub_auth (sid, 0) == SECURITY_APPPOOL_ID_BASE_RID)
 	break;
+#if 0
       /* AzureAD SIDs */
       if (sid_id_auth (sid) == 12 /* AzureAD ID */
 	  && sid_sub_auth (sid, 0) == 1 /* Azure ID base RID */)
 	break;
+#endif
       /* Samba user/group SIDs */
       if (sid_id_auth (sid) == 22)
 	break;
```

Now, the commit message of that commit includes the name of the reporter,
which helped me find
https://inbox.sourceware.org/cygwin/pbli6jecn5go2h7heebwivkwz6xf5h2stvq5fxna4u6pql6uht@7xpentpxjiak/
as the original reason for that commit. That request only talked about
`S-1-15-3-*`, though, and not about `S-1-12-1-*`. And the commit message
makes it sound as if my SID would never resolve by `LookupAccountSid()`,
but it clearly does.

So I am not quite sure what to make of this finding... Should the
`S-1-12-1-*` part of 48e7d63268 (Cygwin: fetch_account_from_windows: skip
LookupAccountSid for SIDs known to fail, 2025-04-10) simply be dropped? Or
was there another clever idea to exploit a shortcut that would side-step
the need to call `LookupAccountSid()` for those SIDs and set `ret = TRUE`?

Puzzled,
Johannes

> 
> On Wed, May 28, 2025 at 5:50 AM Andrey Repin <anrdaemon@yandex.ru> wrote:
> 
> > Greetings, Robert Fensterman!
> >
> > > When I try to launch Cygwin 3.6.2-1 - be it from the taskbar shortcut,
> > > double-clicking on mintty.exe, or running mintty.exe from CMD - I get an
> > > error message:
> >
> > >> Error: Could not fork child process: There are no available terminals
> > (-1)
> >
> > > The resulting window is titled "-nologin".
> >
> > What's your /etc/shells and what is the output of `getent passwd
> > %USERNAME%` ?
> > Can you start bash.exe directly?
> >
> > > The taskbar shortcut is:
> > >> C:\cygwin64\bin\mintty.exe -i /Cygwin-Terminal.ico -
> >
> > > I ran setup this morning to update whatever had updates; this included
> > the
> > > base cygwin package. As last week, it warned me that there was a point
> > > update; I've since downloaded that and re-run setup (without reverting
> > > anything; just letting it do its normal cleanup) to no avail. I've
> > attached
> > > the portion of setup.log with those two runs.
> >
> > > I did also update several other Windows apps Windows first thing this
> > > morning, before I'd tried to open a Cygwin terminal; I don't recall that
> > > list including anything that should have affected terminals, but I
> > suppose
> > > it's possible.
> >
> > > Google searches suggest killing several programs (ssh, ssh-agent, bash,
> > sh,
> > > git, node etc.); none are running. I have tried rebooting a couple of
> > > times, launching Cygwin (from the taskbar shortcut) as soon as I can
> > after
> > > reboot, and I still get the error.
> >
> > > Other terminal-ey apps work: git-bash launches and appears to work
> > > normally; similarly, CMD and PowerShell both seem to be just fine.
> >
> > > Reverting to v 3.6.1-1 seems to work: Cygwin launches and is acting
> > > normally. Updating cygwin through the current version of setup results in
> > > the same error condition (and, reverting a second time is still working).
> >
> > > Running on Win11 24H2 (OS Build 26100.4061).
> >
> >
> >
> > --
> > With best regards,
> > Andrey Repin
> > Wednesday, May 28, 2025 13:20:56
> >
> > Sorry for my terrible english...
> >
> >
> 
> -- 
> Robert F.
> 


More information about the Cygwin mailing list