• 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
Re: Instruments hangs and fills up /var/log/system.log when saving trace document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Instruments hangs and fills up /var/log/system.log when saving trace document


  • Subject: Re: Instruments hangs and fills up /var/log/system.log when saving trace document
  • From: Wade Tregaskis <email@hidden>
  • Date: Fri, 21 Mar 2008 20:24:41 -0400

So I launched my app under Xcode with the Instruments Object Allocations template. My app finished, and I poked around in Instruments for a while, and everything seemed OK. Then I tried to save the trace document. Many minutes later, as Instruments remained unresponsive and my fans were getting noisy, I found that Instruments was in what seemed to be in an infinite loop logging:

Mar 21 10:15:10 Macintosh [0x0-0x148148].com.apple.Instruments[10418]: *** error: can't allocate region
Mar 21 10:15:10 Macintosh [0x0-0x148148].com.apple.Instruments[10418]: *** set a breakpoint in malloc_error_break to debug
Mar 21 10:15:10 Macintosh [0x0-0x148148].com.apple.Instruments[10418]: Instruments(10418,0xa0321fa0) malloc: *** mmap(size=432840704) failed (error code=12)

repeatedly (logged it about 1.25 million times before I force quit).

Anyone else run into this? Known problem? I'm using a MB Pro with 4G RAM.

It's something of an intractable problem.  Memory logging tools like Instruments (and Shark, and Object Alloc before them, etc) do require a very large amounts of memory themselves, and it's not difficult for the target application to generate enough malloc activity to quickly overload them.  They typically don't handle this gracefully, as you've noticed. :)

It's also not that uncommon to see situations like this, where recording the allocations succeeds, but the app blows up some time later while you're perusing the data or trying to save it.

Your best bet is to reduce the memory activity of your target app, e.g. by running it through a smaller dataset (if applicable), or recording for a shorter period.  It's also useful to file bug reports (http://bugreport.apple.com/) describing what you're trying to do, to give the developers of these tools an idea of why you're generating such large sets of data, which might help determine how the tools are improved in future.

If all else fails, keep "top -o vsize" open in a Terminal window, and when Instruments goes past some threshold - try 3 GiB to start with, working down if that's too much - stop recording.  That should give you enough headroom to save the session.

Wade
 _______________________________________________
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

References: 
 >Instruments hangs and fills up /var/log/system.log when saving trace document (From: Larry Campbell <email@hidden>)

  • Prev by Date: Interface Builder 3.x Plugin
  • Next by Date: Re: Instruments hangs and fills up /var/log/system.log when saving trace document
  • Previous by thread: Instruments hangs and fills up /var/log/system.log when saving trace document
  • Next by thread: Re: Instruments hangs and fills up /var/log/system.log when saving trace document
  • Index(es):
    • Date
    • Thread