delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/10/18/15:10:20

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CBB843858D32
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=dronecode.org.uk
Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk
Authentication-Results: btinternet.com;
auth=pass (PLAIN) smtp.auth=jonturney AT btinternet DOT com;
bimi=skipped
X-SNCR-Rigid: 6139452E3F625DD3
X-Originating-IP: [81.129.146.151]
X-OWM-Source-IP: 81.129.146.151 (GB)
X-OWM-Env-Sender: jonturney AT btinternet DOT com
X-VadeSecure-score: verdict=clean score=0/300, class=clean
X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrfeelvddguddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheplfhonhcuvfhurhhnvgihuceojhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukheqnecuggftrfgrthhtvghrnhepheefkeekkeehffehveeivdevgeevteelheeileettdfghfeiheekgeejtdfhledunecuffhomhgrihhnpegthihgfihinhdrtghomhdpshhouhhrtggvfigrrhgvrdhorhhgnecukfhppeekuddruddvledrudegiedrudehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegludelvddrudeikedruddruddtiegnpdhinhgvthepkedurdduvdelrddugeeirdduhedupdhmrghilhhfrhhomhepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukhdpnhgspghrtghpthhtohepvddprhgtphhtthhopeffrghvihgurdetlhhlshhophhpsegtlhdrtggrmhdrrggtrdhukhdprhgtphhtthhopegthihgfihinhestgihghifihhnrdgtohhm
X-RazorGate-Vade-Verdict: clean 0
X-RazorGate-Vade-Classification: clean
Message-ID: <f4e9c183-a4b5-7c59-c608-9922beb76961@dronecode.org.uk>
Date: Tue, 18 Oct 2022 20:08:48 +0100
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.3.3
Subject: Re: Debugging malloc crash in gdb
To: David Allsopp <David DOT Allsopp AT cl DOT cam DOT ac DOT uk>,
The Cygwin Mailing List <cygwin AT cygwin DOT com>
References: <000001d8e2dd$51be37a0$f53aa6e0$@cl.cam.ac.uk>
From: Jon Turney <jon DOT turney AT dronecode DOT org DOT uk>
In-Reply-To: <000001d8e2dd$51be37a0$f53aa6e0$@cl.cam.ac.uk>
X-Spam-Status: No, score=-3570.3 required=5.0 tests=BAYES_00, FORGED_SPF_HELO,
KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_DNSWL_NONE,
SPF_HELO_PASS, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On 18/10/2022 11:35, David Allsopp wrote:
> I'm wondering if I may be able to have some pointers for debugging what
> seems to be an unexpected interaction between mmap/mprotect/munmap and
> malloc with the OCaml runtime.
> 
> At the moment, I know that we crash in malloc, so my main question is how to
> go further in gdb. I installed the cygwin-debuginfo package, but all I'm
> getting is:

Firstly, if the crash is inside the cygwin DLL, you must follow the 
advice in [1], and use 'set cygwin-exceptions on' to tell gdb to stop on 
an exception inside cygwin itself.

[1] https://cygwin.com/faq.html#faq.programming.debugging-cygwin


> /cygdrive/d/a/scallywag/gdb/gdb-11.2-1.x86_64/src/gdb-11.2/gdb/infrun.c:2550
> : internal-error: void resume_1(gdb_signal): Assertion
> `pc_in_thread_step_range (pc, tp)' failed.

This looks similar to the gdb crash reported [2], which I just don't 
have any time to look into.

[2] https://cygwin.com/pipermail/cygwin/2022-June/251714.html

I'd suggest reporting this as directed in 
https://www.sourceware.org/gdb/bugs/

(Note that self-service account creation is disabled on the sourceware 
bugzilla, due to spam problems, so you need to mail overseers as 
directed there, to request a Sourceware Bugzilla account.)

> The reproduction case is below (it's the OCaml runtime, so it's not exactly
> minimal, but it seems to be very repeatable to get gdb to the position of
> the crash).
> 
[...]
> 
> Any assistance to debug this further hugely appreciated!

It might be worth exploring if this gdb crash is seen in older versions 
of gcc, or with older gcc...


-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019