public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Updated cygwin this morning, mintty window flashes briefly and quits
@ 2022-01-20 16:15 Keith Christian
  2022-01-20 16:41 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  0 siblings, 1 reply; 11+ messages in thread
From: Keith Christian @ 2022-01-20 16:15 UTC (permalink / raw)
  To: cygwin

Downloaded the latest setup-x64.exe from the Cygwin website, ran a
normal Cygwin update this morning on my Windows 10 system, rebooted
after updates.
Click the Cygwin64 Terminal icon on the desktop, opens briefly then closes.
Suggested troubleshooting steps?

Thanks, everyone.

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

* RE: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-20 16:15 Updated cygwin this morning, mintty window flashes briefly and quits Keith Christian
@ 2022-01-20 16:41 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  2022-01-20 18:33   ` Keith Christian
  0 siblings, 1 reply; 11+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2022-01-20 16:41 UTC (permalink / raw)
  To: Keith Christian; +Cc: 'cygwin@cygwin.com'

> Click the Cygwin64 Terminal icon on the desktop, opens briefly then closes.
> Suggested troubleshooting steps?

Try to completely stop and then re-start Cygserver (found in "windows services").

HTH,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


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

* Re: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-20 16:41 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2022-01-20 18:33   ` Keith Christian
  2022-01-20 20:24     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  0 siblings, 1 reply; 11+ messages in thread
From: Keith Christian @ 2022-01-20 18:33 UTC (permalink / raw)
  To: cygwin

Anton,

There were two cygserver instances listed, one had a PID and the other
one had N/A for the PID.
I terminated both of them and now I can launch Cygwin64 term.

Are there any configs I should check for cygserver to make sure there
aren't two of them running?
I've never seen this problem before.

Thanks for the assist!

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

* RE: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-20 18:33   ` Keith Christian
@ 2022-01-20 20:24     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  2022-01-20 23:02       ` Keith Christian
  2022-01-21  7:45       ` Brian Inglis
  0 siblings, 2 replies; 11+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2022-01-20 20:24 UTC (permalink / raw)
  To: Keith Christian, cygwin

Keith,

There should be only one of them running, unless you have multiple Cygwin installations,
then there can be per-installation instances.  Restart of all Cygwin processes was always
required (because the main DLL may not be properly replaced while it's in use by
any process) -- but a reboot usually took care of that quite well...

Honestly, this was new for me, too.  Formerly, install with a following reboot was all I needed
to do (since I'm not a power user on my work PC, that was the only way for me to "restart"
the service, anyways).  But now the reboot alone does not seem to help anymore: looks like
Win10 loads up services in a different (fast) fashion, like a wake-up from hibernate.
So an explicit restart of cygserver is now required (and now I have to ask sysadmin
to do that for me at work -- sigh).

And the problem, as I understand it, is that cygserver caches the user IDs these days.
When mintty starts up, it looks up your account, and [with new DLL in place but no restart]
it can't!  The message that shows up momentarily in that disappearing window says exactly so,
"This account is currently not available", only if we can read this fast.

No problems at home, though :-)

HTH,

Anton Lavrentiev
Contractor NIH/NLM/NCBI


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

* Re: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-20 20:24     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2022-01-20 23:02       ` Keith Christian
  2022-01-21  7:45       ` Brian Inglis
  1 sibling, 0 replies; 11+ messages in thread
From: Keith Christian @ 2022-01-20 23:02 UTC (permalink / raw)
  To: cygwin

Anton,

Interesting problems these days.

Thank you again!

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

* Re: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-20 20:24     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  2022-01-20 23:02       ` Keith Christian
@ 2022-01-21  7:45       ` Brian Inglis
  2022-01-26 14:50         ` Andrey Repin
  1 sibling, 1 reply; 11+ messages in thread
From: Brian Inglis @ 2022-01-21  7:45 UTC (permalink / raw)
  To: cygwin

On 2022-01-20 13:24, Lavrentiev, Anton wrote:
> There should be only one of them running, unless you have multiple Cygwin installations,
> then there can be per-installation instances.  Restart of all Cygwin processes was always
> required (because the main DLL may not be properly replaced while it's in use by
> any process) -- but a reboot usually took care of that quite well...
> 
> Honestly, this was new for me, too.  Formerly, install with a following reboot was all I needed
> to do (since I'm not a power user on my work PC, that was the only way for me to "restart"
> the service, anyways).  But now the reboot alone does not seem to help anymore: looks like
> Win10 loads up services in a different (fast) fashion, like a wake-up from hibernate.
> So an explicit restart of cygserver is now required (and now I have to ask sysadmin
> to do that for me at work -- sigh).

I have modified my Cygwin services definitions to do Delayed Autostart 
and Preshutdown, with appropriate Windows service and 
inter-dependencies, shut them down and restart them in local scheduled 
tasks run under SYSTEM account on appropriate events and on demand, and 
restart them in a late local permanent postinstall script 
/etc/postinstall/zp_z0_l_start_services.dash after setup.

Some combination of these techniques may allow your sysadmin to set 
things up for you to control these services without their intervention.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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

* Re: [EXTERNAL] Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-21  7:45       ` Brian Inglis
@ 2022-01-26 14:50         ` Andrey Repin
  2022-01-26 20:23           ` services startup postinstall scripts Brian Inglis
  0 siblings, 1 reply; 11+ messages in thread
From: Andrey Repin @ 2022-01-26 14:50 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Greetings, Brian Inglis!

> restart them in a late local permanent postinstall script
> /etc/postinstall/zp_z0_l_start_services.dash after setup.

It never occured to me that I can use postinstall tasks to restart services :D

Just add a line

for svc in cygserver $( cygrunsrv --list | grep -v cygserver ); do net start "$svc"; done

and you're golden!


-- 
With best regards,
Andrey Repin
Wednesday, January 26, 2022 17:48:31

Sorry for my terrible english...


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

* Re: services startup postinstall scripts
  2022-01-26 14:50         ` Andrey Repin
@ 2022-01-26 20:23           ` Brian Inglis
  2022-01-28  8:18             ` Andrey Repin
  0 siblings, 1 reply; 11+ messages in thread
From: Brian Inglis @ 2022-01-26 20:23 UTC (permalink / raw)
  To: cygwin

On 2022-01-26 07:50, Andrey Repin wrote:
> Greetings, Brian Inglis!
> 
>> restart them in a late local permanent postinstall script
>> /etc/postinstall/zp_z0_l_start_services.dash after setup.
> 
> It never occured to me that I can use postinstall tasks to restart services :D
> 
> Just add a line
> 
> for svc in cygserver $( cygrunsrv --list | grep -v cygserver ); do net start "$svc"; done
> 
> and you're golden!

To avoid conflicts you may first want to stop some Windows services 
using first sc, then net as backup:

for srv in	ssh ssh-agent sshbroker sshproxy	\
		sshd sshdbroker sshdproxy		\
		vmictimesysnc w32time # for GPS ref Windows NTP server
do
	sc stop		$srv
	sleep 1
	net stop	$srv
done

then start all Cygwin services using cygrunsrv, then sc, then net to be 
more sure:

for srv in $(cygrunsrv -L)
do
	cygrunsrv -S	$srv
	sleep 1
	sc start	$srv
	sleep 1
	net start	$srv
done

with suitable checks, messages, and logging added.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]

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

* Re: services startup postinstall scripts
  2022-01-26 20:23           ` services startup postinstall scripts Brian Inglis
@ 2022-01-28  8:18             ` Andrey Repin
  0 siblings, 0 replies; 11+ messages in thread
From: Andrey Repin @ 2022-01-28  8:18 UTC (permalink / raw)
  To: Brian Inglis, cygwin

Greetings, Brian Inglis!

> On 2022-01-26 07:50, Andrey Repin wrote:
>> Greetings, Brian Inglis!
>> 
>>> restart them in a late local permanent postinstall script
>>> /etc/postinstall/zp_z0_l_start_services.dash after setup.
>> 
>> It never occured to me that I can use postinstall tasks to restart services :D
>> 
>> Just add a line
>> 
>> for svc in cygserver $( cygrunsrv --list | grep -v cygserver ); do net start "$svc"; done
>> 
>> and you're golden!

> To avoid conflicts you may first want to stop some Windows services 
> using first sc, then net as backup:

net waits for command to be completed, so it's reasonable sure to assume if it
completed without an error, things are going smooth.
sc is good to make sure service exists.

> for srv in      ssh ssh-agent sshbroker sshproxy        \
>                 sshd sshdbroker sshdproxy               \
>                 vmictimesysnc w32time # for GPS ref Windows NTP server
Why would I need to stop w32time, for example?

> do
>         sc stop         $srv
>         sleep 1
>         net stop        $srv
> done

> then start all Cygwin services using cygrunsrv, then sc, then net to be 
> more sure:

> for srv in $(cygrunsrv -L)
> do
>         cygrunsrv -S    $srv
>         sleep 1
>         sc start        $srv
>         sleep 1
>         net start       $srv
> done

That's overcomplicated, IMO.

> with suitable checks, messages, and logging added.

And checks to check that checks are checking out? ;)


-- 
With best regards,
Andrey Repin
Friday, January 28, 2022 11:13:24

Sorry for my terrible english...


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

* Re: Updated cygwin this morning, mintty window flashes briefly and quits
  2022-01-26 16:37 Updated cygwin this morning, mintty window flashes briefly and quits Lavrentiev, Anton (NIH/NLM/NCBI) [C]
@ 2022-01-26 17:12 ` Andrey Repin
  0 siblings, 0 replies; 11+ messages in thread
From: Andrey Repin @ 2022-01-26 17:12 UTC (permalink / raw)
  To: Lavrentiev, Anton (NIH/NLM/NCBI) [C], cygwin

Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]!

>> for svc in cygserver $( cygrunsrv --list | grep -v cygserver ); do net start "$svc"; done

>> and you're golden!

> Not so fast, you must have admin rights to start any Windows services,
> including cygserver.

> So maybe just bronze, and not so golden

This is assuming you do have them, of course. Else how would you stop them in
the first place?


-- 
With best regards,
Andrey Repin
Wednesday, January 26, 2022 20:08:15

Sorry for my terrible english...


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

* RE: Updated cygwin this morning, mintty window flashes briefly and quits
@ 2022-01-26 16:37 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
  2022-01-26 17:12 ` Andrey Repin
  0 siblings, 1 reply; 11+ messages in thread
From: Lavrentiev, Anton (NIH/NLM/NCBI) [C] @ 2022-01-26 16:37 UTC (permalink / raw)
  To: cygwin

> for svc in cygserver $( cygrunsrv --list | grep -v cygserver ); do net start "$svc"; done

> and you're golden!

Not so fast, you must have admin rights to start any Windows services, including cygserver.

So maybe just bronze, and not so golden

Anton Lavrentiev
Contractor NIH/NLM/NCBI

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

end of thread, other threads:[~2022-01-28  8:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 16:15 Updated cygwin this morning, mintty window flashes briefly and quits Keith Christian
2022-01-20 16:41 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-01-20 18:33   ` Keith Christian
2022-01-20 20:24     ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-01-20 23:02       ` Keith Christian
2022-01-21  7:45       ` Brian Inglis
2022-01-26 14:50         ` Andrey Repin
2022-01-26 20:23           ` services startup postinstall scripts Brian Inglis
2022-01-28  8:18             ` Andrey Repin
2022-01-26 16:37 Updated cygwin this morning, mintty window flashes briefly and quits Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-01-26 17:12 ` Andrey Repin

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