• 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: XCode built project crash related to .o files and p_threads?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode built project crash related to .o files and p_threads?


  • Subject: Re: XCode built project crash related to .o files and p_threads?
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 3 Feb 2009 00:30:01 -0600

On Feb 3, 2009, at 12:01 AM, Stephen Northcott wrote:

If I modify the project and just do a normal build, i.e relying on object files that have already been built, 50% of the time the project will hang with some thread mutex related lock. This is always after editing a file, or files, and adding or deleting some code.
An edit that does not involve updating the source code, and simply changes comments or such will not exhibit this.


If however I clean the project and do a complete build immediately without any other modifications it will then not crash.

So it looks like some address that needs to be updated is not and consequently borking the build.

This is 100% reproducible: i.e. A clean build will NEVER crash, but a delta build will do it repeatedly until I clean and build again.

You're tricking yourself and getting your head turned around.

If a program hangs due to deadlock, just sample it or get backtraces from all of its threads in the debugger ("thread apply all bt"). See which threads are blocked waiting on mutexes.

See if they "should" be attempting that mutex lock -- that is, is your program actually executing the code you wrote (you seem to think it's executing stale code or something).

If the program is executing what you wrote and yet you have a circumstance where two threads can each be blocked waiting for the other, then the problem is yours. It should be relatively straightforward to figure out why that deadlock is happening. Fixing it may be harder.

The issue with fresh builds vs. incremental builds is almost certainly a red herring. Perhaps it's due to warm vs. cold disk caches changing the timing of how the code runs. Who knows? My point is, you don't have to rely on guessing. Deadlocks are very easy to see from program state.

Good luck,
Ken

_______________________________________________
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: XCode built project crash related to .o files and p_threads?
      • From: Stephen Northcott <email@hidden>
References: 
 >XCode built project crash related to .o files and p_threads? (From: Stephen Northcott <email@hidden>)

  • Prev by Date: XCode built project crash related to .o files and p_threads?
  • Next by Date: 2009: macosx, autotools, build on leopard for tiger
  • Previous by thread: XCode built project crash related to .o files and p_threads?
  • Next by thread: Re: XCode built project crash related to .o files and p_threads?
  • Index(es):
    • Date
    • Thread