ratpoison-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RP] Memory issues in 1.1.1


From: Gergely Nagy
Subject: Re: [RP] Memory issues in 1.1.1
Date: Wed Oct 16 05:11:07 2002
User-agent: Wanderlust/2.9.14 (Unchained Melody) Emacs/21.2 Mule/5.0 (SAKAKI)

Hi Brian!

> I spent a few hours tonight trying to track down the memory
> issue.  When I attached gdb to the ratpoison process (there
> were three, actually), I did a backtrace and discovered the
> following, repeated many hundreds of times:
> 
> #0  chunk_alloc (ar_ptr=0x4015c1a0, nb=24) at malloc.c:2801
> #1  0x40101b95 in __libc_malloc (bytes=13) at malloc.c:2561
> #2  0x804e62c in setenv (name=0xbbe80a84 "DISPLAY", value=0x917cff0
> ":0.0",
>     overwrite=1) at actions.c:2091
> #3  0x400debce in putenv (string=0x917cfe8 "DISPLAY=:0.0")
>     at ../sysdeps/generic/putenv.c:63
> #4  0x804e67a in setenv (name=0xbbe80ae0 "DISPLAY", value=0x917cfd8
> ":0.0",
>     overwrite=1) at actions.c:2096
> #5  0x400debce in putenv (string=0x917cfd0 "DISPLAY=:0.0")
>     at ../sysdeps/generic/putenv.c:63
> #6  0x804e67a in setenv (name=0xbbe80b3c "DISPLAY", value=0x917cfc0
> ":0.0",
>     overwrite=1) at actions.c:2096
> #7  0x400debce in putenv (string=0x917cfb8 "DISPLAY=:0.0")
>     at ../sysdeps/generic/putenv.c:63
> 

Ick. That setenv stuff is my code (/me hides under a rock).

Can you also show the bottom of the backtrace? So I'd know which
function triggered the call to actions.c::setenv(). (Looking at the
code of setenv() it should be ok, but who knows..)

> (rest snipped)
> 
> So that led me to the actions.c file.  I was wondering why
> setenv was getting called, since I know my libc has it
> compiled in.  The 1.1.1 version of actions.c has this macro
> defined:

Out of curiosity, what system are you on?

> 2081: #if !defined(HAVE_SETENV) || !defined(setenv)

Hmmm... maybe it should be

#if (!defined(HAVE_SETENV) && !defined(setenv))

But I'm not sure. It was changed because some weirdness on DEC OSF1,
which I worked around this way. Unfortunately, I do not have a working
OSF1 at hand to test it again :(

> 2075: #ifndef HAVE_SETENV
> 
> Obviously, something on my system is botched up.  At any
> rate, I replaced the former with the latter, problem solved.

Can you show me your config.log and src/config.h files?

> Any idea why this method was called over and over?  It
> almost looks like a runaway recursion...

Yeah. But I have no idea why it might behave that way :/

Attachment: pgpwp1cXxYxe5.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]