• 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
Help DTrace gurus: suggestions for capturing a mis-allocated NSData object on a customer's system
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help DTrace gurus: suggestions for capturing a mis-allocated NSData object on a customer's system


  • Subject: Help DTrace gurus: suggestions for capturing a mis-allocated NSData object on a customer's system
  • From: James Bucanek <email@hidden>
  • Date: Wed, 3 Nov 2010 08:34:22 -0700

Greetings,

I'm looking for suggestions to try to debug a problem that a couple of my customers have encountered. Fortunately, one of those customers is a programmer and is willing to help diagnose the issue. The "problem" now is how to set up a test that they can run on their computer, capture the results, and get my hands on it.

Here's the problem:
- A SUID helper process, running as root, processes files in a user's directory.
- At some point *something* allocates an NSConcreteData object (I'm assuming that this is an internal subclass of NSData).
- Later, the autorelease pool is drained, the -[NSConcreteData dealloc] executes, and the process crashes when it call free().


I have spent over a week now trying to reproduce the problem here. Whatever the problem is, it's caused by their files on their system. (I've had them send me copies of the files, three different ways, and I still can't reproduce it here.)

If this were happening on my system, this would be an easy debugging task. But on a system in the wild, I'm at a loss. What I'd like is some debugging tool, that the user can run, that will record the call stack of each object and memory allocation and write that to a log. Then, I should be able to compare the crash report with the log and determine who allocated the bad NSData object and/or malloc block, and figure out what's happening.

It's complicated by the fact that the process is a SUID helper tool that's can't be started manually. I could address that by creating a special version of the program that runs the code in a user-startable way (or maybe even launch the debugging tools to).

My customer has Xcode 3.2.4 installed and is running 10.6.

My initial guess is that this is good job for DTrace, but I'm not sure where to begin.


James Bucanek ____________________________________________________________________ Author of Professional Xcode 3 ISBN: 9780470525227 <http://www.proxcode3.com/> and Learn Objective-C for Java Developers ISBN: 9781430223696 <http://objectivec4java.com/>

_______________________________________________
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: Help DTrace gurus: suggestions for capturing a mis-allocated NSData object on a customer's system
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: FastEnumeration for TWO kinds of objects in class.
  • Next by Date: Re: FastEnumeration for TWO kinds of objects in class.
  • Previous by thread: Re: FastEnumeration for TWO kinds of objects in class.
  • Next by thread: Re: Help DTrace gurus: suggestions for capturing a mis-allocated NSData object on a customer's system
  • Index(es):
    • Date
    • Thread