[GC] "map remapping failed" in long-running server
Thu, 6 Nov 2003 09:49:56 -0800
I understand your reluctance :-) .
You should also just be able to call GC_print_address_map() instead of forking a separate process.
Forking a process in the middle of collector code from a multithreaded app always seems risky to me.
The child ends up running briefly holding the collector lock, with other threads holding some random
collection of other locks, but all the other threads gone. That should all be OK, but ...
In either case, it would be good to superficially test this off-line ahead of time by
temporarily replacing the "result != start_addr" test with "1".
> -----Original Message-----
> From: email@example.com [mailto:firstname.lastname@example.org]
> Sent: Wednesday, November 05, 2003 8:12 PM
> To: Boehm, Hans
> Cc: email@example.com
> Subject: Re: [GC] "map remapping failed" in long-running server
> On Wed, Nov 05, 2003 at 11:42:42AM -0800, Boehm, Hans wrote:
> > Can you
> > 1) Apply the attached patch to os_dep.c to print the
> offending errno, etc.,
> > 2) Run the server with the GC_LOOP_ON_ABORT environment
> variable set, and
> > 3) Either check that address in /proc/<server_pid>/maps or
> send me a copy
> > of that file when the server hangs after the failure ?
> Given that it's a server that several hundred people depend on, and
> that we have it set up with a monitor that restarts it if it
> terminates, I'm a little reluctant to use that method. (It could even
> be a little while before I or someone else notices that it's
> I'm going to try an alternate patch (attached) which should include
> /proc/<server_pid>/maps in the output of the server when it
> > I assume you didn't see a message in the system log?
> I didn't notice anything, but it was a while ago and I may have missed
> it. We've been running the version without USE_MUNMAP for a while,
> and our log rotation seems to have purged those from the last time we
> were running the one with USE_MUNMAP. I'll be sure to double check
> after switching USE_MUNMAP back on.
> We'll start using the patched server sometime tomorrow, so hopefully
> by the end of the week I'll have some more information.
> P.S. Thanks for you prompt reply!