From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21079 invoked by alias); 5 Nov 2019 19:32:51 -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 21070 invoked by uid 89); 5 Nov 2019 19:32:50 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*Ad:D*info, H*F:D*info, H*M:info X-HELO: rila.superhosting.bg Received: from rila.superhosting.bg (HELO rila.superhosting.bg) (91.196.125.212) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 05 Nov 2019 19:32:46 +0000 Received: from [78.128.48.21] (port=57790 helo=[192.168.0.10]) by rila.superhosting.bg with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1iS4ZF-0007eo-Dl for cygwin@cygwin.com; Tue, 05 Nov 2019 21:32:43 +0200 Subject: Re: program exit code, "at exit" handler and explicit close of shared objects To: cygwin@cygwin.com References: <20754eea-2b5e-dbbb-6027-2643be062e41@cornell.edu> <1805e95e-6733-7a73-56fe-8493389ae367@cornell.edu> From: Roumen Petrov Message-ID: <10986264-df7a-8dcc-4a3a-e8a7cc32b693@roumenpetrov.info> Date: Tue, 05 Nov 2019 19:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.5 MIME-Version: 1.0 In-Reply-To: <1805e95e-6733-7a73-56fe-8493389ae367@cornell.edu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-0.2 X-IsSubscribed: yes X-SW-Source: 2019-11/txt/msg00022.txt.bz2 Hello, As non-regular user I did tests when I have access to environment. Ken Brown wrote: > On 10/29/2019 10:53 AM, Ken Brown wrote: >> On 10/26/2019 11:07 AM, Roumen Petrov wrote: >>> First test is as is: >>> [SNIP] >>> I ran this second version of test-dlclose (with DLCLOSE_ATEXIT defined) under >>> strace and got the following: >>> >>> $ strace -o trace.out ./test-dlclose.exe >>> exit with code 33 >>> Segmentation fault >>> >>> The strace output ends with >>> >>> 30 30143 [main] test-dlclose 847 write: 18 = write(1, 0x600061E20, 18) >>> --- Process 33456 (pid: 847) unloaded DLL at 00000003e7930000 >>> --- Process 33456 (pid: 847), exception c0000005 at 00000003e7931080 >>> --- Process 33456 (pid: 847) thread 26088 exited with status 0xc0000005 >>> --- Process 33456 (pid: 847) thread 33544 exited with status 0xc0000005 >>> --- Process 33456 (pid: 847) thread 36020 exited with status 0xc0000005 >>> --- Process 33456 exited with status 0xc0000005 >>> >>> The address 00000003e7930000 seems to be in /usr/bin/cygz.dll, which is the DLL > Sorry, I meant to say 00000003e7931080; 00000003e7930000 is the start of cygz.dll. > >> that got unloaded. After installing zlib-debuginfo, I ran addr2line to see >> where the crash occurred, and this too crashed: >> >> $ addr2line -C -f -i -p -e /usr/bin/cygz.dll 0x3e7931080 >> Segmentation fault (core dumped) The test was with compression library because this is default OpenSSL configuration - dynamic loading of compression library. It seems to me issue could be reproduced with other libraries as well. For instance I get the same with ssh ("libssh-4.so") or bz2 ("libbz2-1.so"). >> That's as far as I've gotten. >> >> Ken Regards, Roumen Petrov -- 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