unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Brooksby <rb@ravenbrook.com>
To: Ken Brown <kbrown@cornell.edu>, Eli Zaretskii <eliz@gnu.org>
Cc: "Gerd Möllmann" <gerd.moellmann@gmail.com>,
	74805@debbugs.gnu.org, "Pip Cet" <pipcet@protonmail.com>
Subject: bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin
Date: Sun, 22 Dec 2024 08:24:03 +0000	[thread overview]
Message-ID: <805cdbf6-e8e3-475c-a94e-4d25d3f0f608@ravenbrook.com> (raw)
In-Reply-To: <f23f27ad-febe-49cb-a277-ed5e4836a6ea@cornell.edu>

On 2024-12-21 16:56, Ken Brown wrote:
> On 12/21/2024 2:24 AM, Eli Zaretskii wrote:
>>> Date: Fri, 20 Dec 2024 18:48:37 -0500
>>> Cc: 74805@debbugs.gnu.org, Richard Brooksby <rb@ravenbrook.com>
>>> From: Ken Brown <kbrown@cornell.edu>
>>> 3. The "mmap" branch is a straightforward port, mostly imitating the
>>> FreeBSD port.  It currently (with Cygwin 3.5.5) fails because of a
>>> limitation of Cygwin's mmap.  But I have a simple patch to Cygwin in the
>>> works that removes that limitation.  With that patch, 37 of the 38 MPS
>>> tests pass.  I still need to debug the failing test.  I'm cautiously
>>> optimistic that I can get this approach to work.  Either way, I expect
>>> the Cygwin patch to soon be available in a test release of Cygwin 3.6.0
>>> so that other Cygwin users can try it.
>>
>> Thanks for the update, I think this is very good news.
> 
> I could use some help from the MPS experts in debugging the failing 
> test, which is arenacv.  I ran the test under strace and didn't see any 
> mmap or munmap failures.  I'm attaching the test log, which doesn't mean 
> a thing to me.  I also built an unoptimized arenacv and can run it under 
> gdb if someone tells me what to look for.

Hello.  I can't offer much direct help just now, but here's where I'd start.

The test is exiting because the MPS is returning code ResRESOURCE from 
these lines 
https://github.com/Ravenbrook/mps/blob/9fd0577cf1231e61c9801c81499e5d16d0743806/code/arenacv.c#L356-L357 
while calling an allocator.

ResRESOURCE only occurs in a few places, and is almost certainly to do 
with a lack of available address space.  Given that you've had to patch 
mmap, that's a smoking gun, but it should be fairly easy to breakpoint 
all the lines that raise ResRESOURCE to figure out what's happening.

Sometimes it's difficult to breakpoint the MPS because it runs in weird 
signal contexts.  We've been known to crash debuggers.  I don't know if 
it's tricksy in Cygwin.  In that case, you can hack around with 
_mps_RES_ENUM in mps.h to make ResRESOURCE call a function.

$ grep --color=auto -nH --null -e ResRESOURCE *.c
arena.c:767:    return ResRESOURCE;
arena.c:1048:    return ResRESOURCE;
arena.c:1227:  return ResRESOURCE;
arenacv.c:461:      die((res == ResRESOURCE) ? ResOK : res, "right error 
code");
arenavm.c:722:    res = ResRESOURCE;
fotest.c:55:    return ResRESOURCE;
mpm.c:254:  return (res == ResMEMORY || res == ResRESOURCE || res == 
ResCOMMIT_LIMIT);
thw3.c:101:    return ResRESOURCE;
vman.c:52:    return ResRESOURCE;
vman.c:59:    return ResRESOURCE;
vmix.c:107:    return ResRESOURCE;
vmix.c:110:    return ResRESOURCE;
vmix.c:122:    return ResRESOURCE;
vmw3.c:117:    return ResRESOURCE;
vmw3.c:120:    return ResRESOURCE;
vmw3.c:130:    return ResRESOURCE;

It's very unlikely that you're actually running out of address space on 
a 64-bit system.






  parent reply	other threads:[~2024-12-22  8:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 22:50 bug#74805: 30.0.92; Trying to build scratch/igc on Cygwin Ken Brown
2024-12-11 23:47 ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-12 18:14   ` Ken Brown
2024-12-11 23:57 ` Andrea Corallo
2024-12-12  6:09 ` Eli Zaretskii
2024-12-12 18:12   ` Ken Brown
2024-12-12 19:25     ` Eli Zaretskii
2024-12-12 23:17       ` Stefan Kangas
2024-12-13  7:51         ` Eli Zaretskii
2024-12-20 23:48   ` Ken Brown
2024-12-21  7:24     ` Eli Zaretskii
2024-12-21 16:56       ` Ken Brown
2024-12-21 17:21         ` Gerd Möllmann
2024-12-21 17:34           ` Pip Cet via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-21 20:25             ` Ken Brown
2024-12-22  8:24         ` Richard Brooksby [this message]
2024-12-22  8:32           ` Richard Brooksby
2024-12-12 11:05 ` Stefan Kangas
2024-12-12 11:30   ` Eli Zaretskii
2024-12-12 12:06     ` Gerd Möllmann
2024-12-12 14:38       ` Eli Zaretskii
2024-12-12 15:01         ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=805cdbf6-e8e3-475c-a94e-4d25d3f0f608@ravenbrook.com \
    --to=rb@ravenbrook.com \
    --cc=74805@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=kbrown@cornell.edu \
    --cc=pipcet@protonmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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