From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18577 invoked by alias); 4 Mar 2019 15:28:48 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 18565 invoked by uid 89); 4 Mar 2019 15:28:47 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=BAYES_20,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=login, H*F:D*ne.jp, buf, erroneous X-HELO: conssluserg-04.nifty.com Received: from conssluserg-04.nifty.com (HELO conssluserg-04.nifty.com) (210.131.2.83) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Mar 2019 15:28:45 +0000 Received: from Express5800-S70 (ntsitm424054.sitm.nt.ngn.ppp.infoweb.ne.jp [219.97.74.54]) (authenticated) by conssluserg-04.nifty.com with ESMTP id x24FScZb024023 for ; Tue, 5 Mar 2019 00:28:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com x24FScZb024023 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1551713318; bh=j/iPUDyHvFqau0LDQ/DTZuOeOGPdzdoRuI4YdiQTcqI=; h=Date:From:To:Subject:From; b=VcQiDZ40VH2G+MqbmiOyb1PGOd16AJ0gW9irPsEYHsrsl/XPZPTeC5CaqATr5V7Eo nREg+qHswkWv8ZhvTIZKYPY0pWhxs8Ff/B/7/5nQ5gGJNwFQ5tNIzyMs1kJYVkRg+R S8XHfJjNgaud4mQhabzasRBtHpJUQ0/fSjJuxpML0xuLenbFLEkbTT0MU4vgk3tIzX C23AP9A1ao1tdgbpNROzrIFkCHeEvH5yV8P6N+8luapMuQPZ7ZSp6VG1I3LXSBoLLZ tB3VyAr+gg5sVwYroO41JykJevsre4j0mELz8NqTNM73PQW/DDpyzr2XwA1tu/edvA 8BAYOnEg5FGMg== Date: Mon, 04 Mar 2019 15:28:00 -0000 From: Takashi Yano To: cygwin@cygwin.com Subject: cygwin snapshots after 23, Feb. ocasionally destroys windows logon session Message-Id: <20190305002849.fdb1c8db14f8f83e5210553f@nifty.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00034.txt.bz2 Hi Corinna, I encountered a problem with cygwin snapshots after 23, Feb. If I login to cygwin via ssh and logout from ssh session, explorer sometimes gets into erroneous state. Most of operations cannot be done on explorer. This does not happen in all environments, however, at least two of my machines are affected. * Windows 7 64bit machine with 32bit cygwin installed. * Windows 10 64bit machine with 32bit cygwin installed. To reproduce this, logon windows with a user and start cygwin. Then, repeat login and logout via cygwin ssh/sshd a few ten times with the user who logon to windows. I looked into this problem, and found the culprit. The following modification seems to cause this problem. But I am not sure what is wrong with this code. Is this code really necessary? diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h index 5c5e3cd1e..4d9feb072 100644 --- a/winsup/cygwin/cygheap.h +++ b/winsup/cygwin/cygheap.h @@ -193,6 +193,11 @@ public: { return effec_cygsid.string (buf); } + void exit () + { + if (imp_profile_token && imp_profile) + unload_user_profile (imp_profile_token, imp_profile); + } const char __reg3 *test_uid (char *&, const char *, size_t); }; diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 064299e0c..e29c00746 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -224,6 +224,7 @@ pinfo::exit (DWORD n) exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff); sigproc_printf ("Calling dlls.cleanup_forkables n %y, exitcode %y", n, exitcode); dlls.cleanup_forkables (); + cygheap->user.exit (); sigproc_printf ("Calling ExitProcess n %y, exitcode %y", n, exitcode); if (!TerminateProcess (GetCurrentProcess (), exitcode)) system_printf ("TerminateProcess failed, %E"); -- Takashi Yano -- 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