• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
problem with LEAKS and the stack trace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

problem with LEAKS and the stack trace


  • Subject: problem with LEAKS and the stack trace
  • From: Nathan Smyth <email@hidden>
  • Date: Sat, 23 May 2009 18:52:45 +0000 (GMT)

Hi there,

I  have a program which leaks a LOT of memory, so I am trying to debug it.

On execution, it spawns a few processes, one of which causes the problem.

I run leaks on the pid and I see that mem is leaking:
i.e. I get output like

c088:Clients blah$ leaks 21182
Process 21182: 3526 nodes malloced for 2602 KB
Process 21182: 25 leaks for 448 total leaked bytes.
Leak: 0x701170  size=32    string '/tmp/.s.PGSQL.5432.lock'
Leak: 0x71d610  size=32    string 'investigation_ended'
Leak: 0x71d960  size=32    string 'under_investigation'
....

The issue is that I can't get to the stack trace to find out where these occur!

I have set the MallocStackLogging environment variable in the shell, which I know works as
every command gives me
ls(21194) malloc: stack logs deleted from /tmp/stack-logs.21194.ls.9p95Ur

If I use malloc_history I get nothing...
c088:Clients blah$ malloc_history 21182 0x701170088:
blah$

Though if I gdb connect to the process, I can catch the line of code for segfaults, for e.g.

Any ideas of how I can help find the erroneous allocations.

THanks Nafe

PS I TRIED using  Instruments.app. I chose the executable and set the relevant parameters which should spawn the processes. But once I click run it just sits there. Doesn't seem to be an option :(





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: problem with LEAKS and the stack trace
      • From: albert jordan Mobility <email@hidden>
  • Prev by Date: Re: Newbie question: Can't get Xcode "Build & Run" to run
  • Next by Date: Re: problem with LEAKS and the stack trace
  • Previous by thread: Re: Toolbar Items
  • Next by thread: Re: problem with LEAKS and the stack trace
  • Index(es):
    • Date
    • Thread