X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:cc:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=ELUZBulvqLwgyq3G 0zLYXQ6sxUD1of4NmEvkElmZNrRQJjkE1T/0NUEtNOIAaAGx9GeG9sAp7Kd6s40z d59k6wb3PzZ418xiQkd+hNiD+0L01NWrm/PpMWiKDkBwODxtcX4cq+blJPtb355l P+A4TmJbPGm47xH8RFpM+FlDu7o= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:cc:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=Ckrzj16+0WqExL6bKO3jQu t8FRI=; b=DPZNlJxTZ20DV+LPWGjXDFg+Vd7WHgLOGY1Llt/s3Pky/DIusQ14Po zDlNP0WNHZMHtml2PEW/4H0O4vBLhyA2UX9Fe35YADwFDcYyPc9z+SvnwV5sHUBe w4MdjRL3+3rjfvn+TeyccsLHjWngPkWKXfyFbejnxjnhelxspj0ow= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=opera, H*Ad:D*ca, Hx-spam-relays-external:ESMTPA, HContent-Transfer-Encoding:8bit X-HELO: out3-smtp.messagingengine.com X-ME-Sender: Subject: Re: fork fails after nmap with hint address in an unmapped memory region To: The Cygwin Mailing List References: <15510444518 DOT 20171209184819 AT yandex DOT ru> <42c71a45-e61b-6917-b634-e912fb51d2d5 AT yahoo DOT fr> <56047a39-4e1e-fa50-0e8b-c123c5b5ed3c AT SystematicSw DOT ab DOT ca> From: Jon Turney Cc: Brian DOT Inglis AT SystematicSw DOT ab DOT ca Message-ID: Date: Sat, 9 Dec 2017 22:51:47 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <56047a39-4e1e-fa50-0e8b-c123c5b5ed3c@SystematicSw.ab.ca> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 09/12/2017 18:29, Brian Inglis wrote: > On 2017-12-09 08:53, Stéphane Mbape via cygwin wrote: >> Le 09/12/2017 à 16:48, Andrey Repin a écrit : >>>> While embeding luajit in a c program, I found myself unable to fork >>>> processes. >>>> Investigations prove that it was related to nmap. >>>> To be accurate, calling nmap with hint address in a unmapped memory >>>> region will cause all forks to fail with >>>> "fixup_mmaps_after_fork: ReadProcessMemory failed for MAP_PRIVATE >>>> address 0x6FFFFFE0000, Win32 error 299" >>>> There is a sample code below. >>> You forgot to mention Cygwin version you're using, and please provide the >>> sample as an attach to save people the copy-pasting issues. >> Cygwin version: 2.9.0 >> OS: Windows 10 >> Arch: 64bit >> The sample was also attached. > > Confirmed reproducible; addr2line does not give anything useful from the > stackdump, but included raw stackdump below, in case it gives hints. If you're going to use addr2line to interpret a .stackdump file, I'm afraid you're just supposed to know that the cygwin1.dll has an ImageBase of 0x0000000180040000 on x86_64 > $ more mmap_fork_stc.exe.stackdump > Stack trace: > Frame Function Args > 000005FF3A0 0018005CD8E (0018021AE80, 0018021AC46, 00000008000, 000005FB010) > 000005FF3A0 001800465F9 (000005FDDE0, 000005FF3A0, 001800B2D10, 00000000000) > 000005FF3A0 00180046632 (00000000000, 000005FBE28, 00000008000, 00100402068) > 000005FF3A0 00180046B84 (0007FFE0385, 000005FDDE0, 001800B2D10, 00000000000) > 000005FF3A0 00180048040 (00000000000, 00000000000, 00000000000, 00000000000) > 000005FF3A0 001800B2EDB (00000000000, 00000000000, 00000000000, 00000000000) > 000005FF620 7FFF7777485F (00180040000, 00000000001, 00000240022, 000006D20C8) > 000005FF620 7FFF7779D762 (7FFF77797900, 000006D2701, 7FFF774A27BA, 000006D2F10) > 000005FF620 7FFF7779D5AB (000006D2720, 000005FF5D0, 00000000003, 0000032E000) > 000005FF620 7FFF7779D5D1 (00000000003, 000005FF629, 00000000003, 00000000000) > 00000000000 7FFF777E1D31 (00000000000, 00000000000, 00000000001, 00000000000) > 00000000000 7FFF7781A1FC (00000000000, 00000000000, 0000032E000, 00000000000) > 00000000000 7FFF777C9B1B (00000000000, 00000000000, 00000000000, 00000000000) > 00000000000 7FFF777C9ACE (00000000000, 00000000000, 00000000000, 00000000000) > End of stack trace Sator Arepo Tenet Opera Rotas! [1] 0x000000018005cd8e cygwin_stackdump exceptions.cc:456 0x00000001800465f9 vapi_fatal dcrt0.cc:1296 0x0000000180046632 api_fatal dcrt0.cc:1305 0x0000000180046b84 child_info_fork::handle_fork() dcrt0.cc:634 0x0000000180048040 dll_crt0_0() dcrt0.cc:777 0x00000001800b2edb dll_entry init.cc:102 [1] https://cygwin.com/ml/cygwin/2015-08/msg00311.html -- 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