• 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: Distributed Objects invocation dispatch not thread safe??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Distributed Objects invocation dispatch not thread safe??


  • Subject: Re: Distributed Objects invocation dispatch not thread safe??
  • From: Dave Cox <email@hidden>
  • Date: Fri, 14 Nov 2008 13:18:48 -0800

I have since written and tested a 'peer' program in addition to the client/server pair I previously described.  I run serveral instances of this peer program.  Each peer is a server in the sense that it vends an object as the root of an NSConnection and runs several threads to accept remote calls on the connection.  Each peer is also a client of all the other peers: it runs a loop in which it tries to connect to any peer it is not yet connected to, and to invoke methods on the proxies of those it is connected to.  Thus, the peers end up connected many-to-many.  All peers invoke all the others, in random order, and each can receive invocations from several others concurrently.  Also, when one peer calls another, the latter calls back to the first before it returns from the method invocation originating from the first.  (It calls a different method of the peer protocol so this doesn't end up recursing.)

Testing these peers has uncovered new console log warnings and crash patterns that don't seem related to over-releasing memory or using memory after it's released.  Instead, these seem related to managing "conversation" objects in a collection (CFDictionary).  These problems seem to occur specifically when some peers have been running for some time and another starts up and tries to join the group; that is, the crash occurs around the time the processes are establishing NSConnections to each other, and before the new peer receives (m)any invocations from the other peers.

I've only tested these on OSX 10.5.5.

Here's code, and following that some representative output and crash dumps.

--------------------------------------------------------------------------------

// peer.mm

#import <Foundation/NSObject.h>
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSPort.h>
#import <Foundation/NSConnection.h>
#import <Foundation/NSPortNameServer.h>
#import <Foundation/NSRunLoop.h>
#import <Foundation/NSException.h>
#import <Foundation/NSString.h>
#import <Foundation/NSThread.h>
#import <Foundation/NSArray.h>

#import <unistd.h>
#import <stdlib.h>
#import <libkern/OSAtomic.h>

#import <vector>

#import "log.h"


using namespace std;


#define PEER_NAME_BASE "TestPeer"


// peer interface @protocol IPeer <NSObject> - (unsigned) call: (id<IPeer>) cb; - (void) callBack; @end

typedef id<IPeer> TPeer;


// peer class @interface CPeer : NSObject <IPeer> {} @end


static int32_t nCalls = 0; static int32_t nCallsBack = 0;


@implementation CPeer

- (unsigned) call: (id<IPeer>) cb {
   //log("call:\n");
   OSAtomicIncrement32(&nCalls);
   [cb callBack];
   return 1;
}

- (void) callBack {
   //log("callBack\n");
   OSAtomicIncrement32(&nCallsBack);
}

@end


bool quit = false;

void onSignal(int s) {
   log("onSignal\n");
   quit = true;
}


int main (int argc, char * const argv[]) {

   bool extraRelease = false;

   if (argc < 3) {
       log("not enough args\n");
       return 1;
   }

   char* sPeerId = argv[1];
   int peerId = atoi(sPeerId);
   if (peerId < 1) {
       log("invalid arg %s\n", argv[1]);
       return 1;
   }

   char* sNumPeers = argv[2];
   int numPeers = atoi(sNumPeers);
   if (numPeers < 2) {
       log("invalid arg %s\n", argv[2]);
       return 1;
   }

   log("peer %d of %d...\n", peerId, numPeers);

   if (argc > 3 && argv[3][0] == 'x') {
       extraRelease = true;
   }

   signal(SIGTERM, onSignal);
   signal(SIGINT, onSignal);

   NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

   CPeer* me = nil;

   do {
       // vend peer object...

       NSPort* port = [[NSMachPort alloc] init];
       if (port == nil) {
           log("error: port is nil\n");
           break;
       }
       [port autorelease];

       NSConnection* connection
               = [NSConnection connectionWithReceivePort:port sendPort:nil];
       if (connection == nil) {
           log("error: connection is nil\n");
           break;
       }

       [connection enableMultipleThreads];

       // create peer object to vend
       me = [[CPeer alloc] init];
       if (me == nil) {
           log("error: peer to vend is nil\n");
       }
       [me autorelease];

       // vend object
       [connection setRootObject: me];

       // publish name (@PEER_NAME_BASE + peerId)
       NSString* localName = [NSString stringWithFormat: @"%@%d",
                                                         @PEER_NAME_BASE,
                                                         peerId ];
       NSMachBootstrapServer* namesrv = [NSMachBootstrapServer sharedInstance];
       if ([namesrv registerPort: port name: localName] == NO) {
           log("error: port not registered\n");
           break;
       }

       // detach new threads to run runloops for the connection
       for (unsigned n = 0; n < 4; n++) {
           [connection runInNewThread];
       }

       vector<TPeer> peers(numPeers);

       srandomdev();

       // loop: call another peer...

       NSAutoreleasePool* innerPool = nil;

       while (!quit) {
           // choose a peer at random
           int nPeer = (int)(random() % numPeers) + 1;
           if (nPeer == peerId) {
               // that's me; try again
               continue;
           }

           if (innerPool != nil) {
               log("previous autorelease pool not released!\n");
           }

           innerPool = [[NSAutoreleasePool alloc] init];

           @try {
               TPeer peer = peers[nPeer - 1];
               if (peer == nil) {
                   // not connected to that peer; try to connect now.

NSString* remoteName
= [NSString stringWithFormat: @"%@%d",
@PEER_NAME_BASE,
nPeer ];


                   peer = (TPeer)[ NSConnection
                           rootProxyForConnectionWithRegisteredName: remoteName
                                                               host: nil ];
                   if (peer == nil) {
                       continue;
                   }

                   peers[nPeer - 1] = peer;

                   log(    "got peer %p with retainCount %u\n",
                           peer,
                           [peer retainCount] ); // retainCount returns 3

                   [peer retain];

                   log("%d connected %s\n", peerId, [remoteName UTF8String]);
               }

               // call remote peer and let it call this one back
               unsigned result = [peer call: me];
               if (result == 0) {
                   [ NSException raise: @"UnexpectedResultException"
                                format: @"call to %d returned zero\n", nPeer ];
               }

           } @catch (NSException* x) {
               log(    "caught exception calling %d: %s\n",
                       nPeer,
                       [[x reason] UTF8String] );
               // clean out failed peer proxy so we don't keep calling it,
               // but in subsequent loops we'll resume trying to (re)connect
               // to that peer.
               TPeer peer = peers[nPeer - 1];
               peers[nPeer - 1] = nil;
               log(    "on exception, releasing peer %p with retainCount %u\n",
                       peer,
                       [peer retainCount] ); // retainCount returns 1
               if (extraRelease && [peer retainCount] > 1) {
                   [peer release];
               }
               [peer release];

           } @finally {
               [innerPool release];
               innerPool = nil;
           }

       } // while (!quit)

       log("%d quitting\n", peerId);

       // release all the peers
       vector<TPeer>::iterator iter, end = peers.end();
       for (iter = peers.begin(); iter != end; iter++) {
           TPeer peer = *iter;
           if (peer == nil) {
               continue;
           }

           log(    "releasing peer %p with retainCount %u\n",
                   peer,
                   [peer retainCount] ); // retainCount returns 2

           [peer release];
           if (extraRelease) {
               // if out-param proxies are considered owned by the caller,
               // then this would be appropriate:
               [peer release];
           }
       }

   } while (false);

   [pool release];

   return 0;
}

--------------------------------------------------------------------------------


20081114 12:08:39 [14746] <0xa065dfa0> peer 4 of 4... 20081114 12:08:39 [14746] <0xa065dfa0> got peer 0x10b8f0 with retainCount 3 20081114 12:08:39 [14746] <0xa065dfa0> 4 connected TestPeer3 2008-11-14 12:08:39.216 peer[14746:807] Warning: attempting to remove bad conversation from <NSThread: 0x1038a0>{name = (null), num = 1}, conversation 0x0, conversationCount 0 20081114 12:08:39 [14746] <0xa065dfa0> got peer 0x1122d0 with retainCount 3 20081114 12:08:39 [14746] <0xa065dfa0> 4 connected TestPeer2 2008-11-14 12:08:39.221 peer[14746:807] Warning: attempting to remove bad conversation from <NSThread: 0x1038a0>{name = (null), num = 1}, conversation 0x0, conversationCount 0 20081114 12:08:39 [14746] <0xa065dfa0> got peer 0x10e070 with retainCount 3 20081114 12:08:39 [14746] <0xa065dfa0> 4 connected TestPeer1

--------------------------------------------------------------------------------

Process:         peer [9765]
Path:            ./peer
Identifier:      peer
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  tcsh [394]

Date/Time:       2008-11-13 19:59:58.596 -0800
OS Version:      Mac OS X 10.5.5 (9F33)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000fffffffc
Crashed Thread:  2

Thread 2 Crashed:
0   com.apple.CoreFoundation      	0x92658b41 CFDictionarySetValue + 1249
1   com.apple.Foundation          	0x95335b19 addConversation + 249
2   com.apple.Foundation          	0x952fbde7 -[NSConnection _shouldDispatch:invocation:sequence:coder:] + 599
3   com.apple.Foundation          	0x952f9f8e -[NSConnection handleRequest:sequence:] + 942
4   com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
5   com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
6   com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
7   com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
8   com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
9   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
10  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
11  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
12  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
13  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
14  libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 2 crashed with X86 Thread State (32-bit):
 eax: 0x0010a910  ebx: 0x9265866b  ecx: 0xa02851a0  edx: 0xfffffffc
 edi: 0x001058d0  esi: 0x0010fc10  ebp: 0xb0102428  esp: 0xb01023d0
  ss: 0x0000001f  efl: 0x00010246  eip: 0x92658b41   cs: 0x00000017
  ds: 0x0000001f   es: 0x0000001f   fs: 0x0000001f   gs: 0x00000037
 cr2: 0xfffffffc

Thread 0:
0   libSystem.B.dylib             	0x9566a4ee semaphore_wait_signal_trap + 10
1   libSystem.B.dylib             	0x95671fc5 pthread_mutex_lock + 569
2   libobjc.A.dylib               	0x9410a1ac _class_getMethodNoSuper + 32
3   libobjc.A.dylib               	0x9410029e _class_lookupMethodAndLoadCache + 182
4   libobjc.A.dylib               	0x941106d6 objc_msgSend + 102
5   com.apple.CoreFoundation      	0x92706801 ___forwarding___ + 561
6   com.apple.CoreFoundation      	0x92706a12 _CF_forwarding_prep_0 + 50
7   peer                          	0x00002c35 main + 1823 (peer.mm:182)
8   peer                          	0x00001cf7 _start + 209
9   peer                          	0x00001c25 start + 41

Thread 1:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
5   com.apple.Foundation          	0x952bebad -[NSThread main] + 45
6   com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
7   libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
8   libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 3:
0   libSystem.B.dylib             	0x9566a4be semaphore_signal_trap + 10
1   libSystem.B.dylib             	0x9567226d pthread_mutex_unlock + 472
2   libobjc.A.dylib               	0x9410a271 _class_getMethodNoSuper + 229
3   libobjc.A.dylib               	0x9410029e _class_lookupMethodAndLoadCache + 182
4   libobjc.A.dylib               	0x941106d6 objc_msgSend + 102
5   com.apple.CoreFoundation      	0x92706468 -[NSInvocation invoke] + 136
6   com.apple.Foundation          	0x952fc154 -[NSConnection dispatchInvocation:] + 132
7   com.apple.Foundation          	0x952fa107 -[NSConnection handleRequest:sequence:] + 1319
8   com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
9   com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
10  com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
11  com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
12  com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
13  com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
14  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
15  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
16  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
17  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
18  libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 4:
0   libSystem.B.dylib             	0x9566a4ee semaphore_wait_signal_trap + 10
1   libSystem.B.dylib             	0x95671fc5 pthread_mutex_lock + 569
2   libobjc.A.dylib               	0x9410a1ac _class_getMethodNoSuper + 32
3   libobjc.A.dylib               	0x9410029e _class_lookupMethodAndLoadCache + 182
4   libobjc.A.dylib               	0x941106d6 objc_msgSend + 102
5   com.apple.CoreFoundation      	0x92705c28 -[NSInvocation selector] + 56
6   com.apple.Foundation          	0x952fc0f6 -[NSConnection dispatchInvocation:] + 38
7   com.apple.Foundation          	0x952fa107 -[NSConnection handleRequest:sequence:] + 1319
8   com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
9   com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
10  com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
11  com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
12  com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
13  com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
14  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
15  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
16  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
17  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
18  libSystem.B.dylib             	0x9569b5b2 thread_start + 34


--------------------------------------------------------------------------------

Process:         peer [7043]
Path:            ./peer
Identifier:      peer
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  tcsh [247]

Date/Time:       2008-11-13 15:50:45.268 -0800
OS Version:      Mac OS X 10.5.5 (9F33)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000005
Crashed Thread:  3

Thread 3 Crashed:
0   com.apple.CoreFoundation      	0x9268a036 CFEqual + 38
1   com.apple.CoreFoundation      	0x926599d5 __CFDictionaryFindBuckets1b + 293
2   com.apple.CoreFoundation      	0x9265a1fd CFDictionaryGetValue + 141
3   com.apple.Foundation          	0x952e33cf lastConversationInfo + 47
4   com.apple.Foundation          	0x95335a57 addConversation + 55
5   com.apple.Foundation          	0x952fbde7 -[NSConnection _shouldDispatch:invocation:sequence:coder:] + 599
6   com.apple.Foundation          	0x952f9f8e -[NSConnection handleRequest:sequence:] + 942
7   com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
8   com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
9   com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
10  com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
11  com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
12  com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
13  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
14  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
15  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
16  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
17  libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 3 crashed with X86 Thread State (32-bit):
 eax: 0x00000001  ebx: 0x9268a029  ecx: 0x9268a010  edx: 0x00000000
 edi: 0x00000000  esi: 0x00000003  ebp: 0xb0184388  esp: 0xb0184360
  ss: 0x0000001f  efl: 0x00010283  eip: 0x9268a036   cs: 0x00000017
  ds: 0x0000001f   es: 0x0000001f   fs: 0x0000001f   gs: 0x00000037
 cr2: 0x00000005

Thread 0:
0   libSystem.B.dylib             	0x9566a4be semaphore_signal_trap + 10
1   libSystem.B.dylib             	0x9567226d pthread_mutex_unlock + 472
2   libobjc.A.dylib               	0x941015a7 _cache_fill + 544
3   libobjc.A.dylib               	0x940ff8e0 log_and_fill_cache + 141
4   libobjc.A.dylib               	0x941002b6 _class_lookupMethodAndLoadCache + 206
5   libobjc.A.dylib               	0x941106d6 objc_msgSend + 102
6   peer                          	0x00001c43 _start + 209
7   peer                          	0x00001b71 start + 41

Thread 1:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
5   com.apple.Foundation          	0x952bebad -[NSThread main] + 45
6   com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
7   libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
8   libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 2:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
5   com.apple.Foundation          	0x952bebad -[NSThread main] + 45
6   com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
7   libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
8   libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 4:
0   libSystem.B.dylib             	0x9566a4ee semaphore_wait_signal_trap + 10
1   libSystem.B.dylib             	0x95671fc5 pthread_mutex_lock + 569
2   libobjc.A.dylib               	0x941013c8 _cache_fill + 65
3   libobjc.A.dylib               	0x940ff8e0 log_and_fill_cache + 141
4   libobjc.A.dylib               	0x941002b6 _class_lookupMethodAndLoadCache + 206
5   libobjc.A.dylib               	0x941106d6 objc_msgSend + 102
6   com.apple.Foundation          	0x952fa107 -[NSConnection handleRequest:sequence:] + 1319
7   com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
8   com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
9   com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
10  com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
11  com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
12  com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
13  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
14  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
15  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
16  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
17  libSystem.B.dylib             	0x9569b5b2 thread_start + 34

--------------------------------------------------------------------------------

Process:         peer [6078]
Path:            ./peer
Identifier:      peer
Version:         ??? (???)
Code Type:       X86 (Native)
Parent Process:  tcsh [247]

Date/Time:       2008-11-13 12:05:28.364 -0800
OS Version:      Mac OS X 10.5.5 (9F33)
Report Version:  6

Exception Type:  EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000005
Crashed Thread:  4


Thread 4 Crashed: 0 com.apple.CoreFoundation 0x9268a036 CFEqual + 38 1 com.apple.CoreFoundation 0x926599d5 __CFDictionaryFindBuckets1b + 293 2 com.apple.CoreFoundation 0x9265a1fd CFDictionaryGetValue + 141 3 com.apple.Foundation 0x952e33cf lastConversationInfo + 47 4 com.apple.Foundation 0x952fbbfe -[NSConnection _shouldDispatch:invocation:sequence:coder:] + 110 5 com.apple.Foundation 0x952f9f8e -[NSConnection handleRequest:sequence:] + 942 6 com.apple.Foundation 0x952f994d -[NSConnection handlePortCoder:] + 1149 7 com.apple.Foundation 0x952f947e -[NSConcretePortCoder dispatch] + 142 8 com.apple.Foundation 0x952f8be3 __NSFireMachPort + 339 9 com.apple.CoreFoundation 0x92663635 __CFMachPortPerform + 117 10 com.apple.CoreFoundation 0x92687908 CFRunLoopRunSpecific + 3896 11 com.apple.CoreFoundation 0x92687cf8 CFRunLoopRunInMode + 88 12 com.apple.Foundation 0x953beae8 -[NSConnection run] + 280 13 com.apple.Foundation 0x952bebad -[NSThread main] + 45 14 com.apple.Foundation 0x952be754 __NSThread__main__ + 308 15 libSystem.B.dylib 0x9569b6f5 _pthread_start + 321 16 libSystem.B.dylib 0x9569b5b2 thread_start + 34

Thread 4 crashed with X86 Thread State (32-bit):
 eax: 0x00000001  ebx: 0x9268a029  ecx: 0x9268a010  edx: 0x00000000
 edi: 0x00000000  esi: 0x00000007  ebp: 0xb02063c8  esp: 0xb02063a0
  ss: 0x0000001f  efl: 0x00010287  eip: 0x9268a036   cs: 0x00000017
  ds: 0x0000001f   es: 0x0000001f   fs: 0x0000001f   gs: 0x00000037
 cr2: 0x00000005

Thread 0:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x952f5a0d -[NSConnection sendInvocation:internal:] + 3005
5   com.apple.Foundation          	0x952f4b89 -[NSDistantObject forwardInvocation:] + 329
6   com.apple.CoreFoundation      	0x927069aa ___forwarding___ + 986
7   com.apple.CoreFoundation      	0x92706a12 _CF_forwarding_prep_0 + 50
8   peer                          	0x00002b73 main + 1813 (peer.mm:198)
9   peer                          	0x00001c43 _start + 209
10  peer                          	0x00001b71 start + 41

Thread 1:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
5   com.apple.Foundation          	0x952bebad -[NSThread main] + 45
6   com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
7   libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
8   libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 2:
0   com.apple.CoreFoundation      	0x9270790c +[NSObject instanceMethodSignatureForSelector:] + 44
1   com.apple.Foundation          	0x952f4413 -[NSDistantObject methodSignatureForSelector:] + 563
2   com.apple.CoreFoundation      	0x927066bd ___forwarding___ + 237
3   com.apple.CoreFoundation      	0x92706a12 _CF_forwarding_prep_0 + 50
4   peer                          	0x00002423 -[CPeer call:] + 69 (peer.mm:60)
5   com.apple.CoreFoundation      	0x92706a7d __invoking___ + 29
6   com.apple.CoreFoundation      	0x92706468 -[NSInvocation invoke] + 136
7   com.apple.CoreFoundation      	0x92706538 -[NSInvocation invokeWithTarget:] + 72
8   com.apple.CoreFoundation      	0x927069aa ___forwarding___ + 986
9   com.apple.CoreFoundation      	0x92706a12 _CF_forwarding_prep_0 + 50
10  com.apple.CoreFoundation      	0x92706a7d __invoking___ + 29
11  com.apple.CoreFoundation      	0x92706468 -[NSInvocation invoke] + 136
12  com.apple.Foundation          	0x952fc154 -[NSConnection dispatchInvocation:] + 132
13  com.apple.Foundation          	0x952fa107 -[NSConnection handleRequest:sequence:] + 1319
14  com.apple.Foundation          	0x952f994d -[NSConnection handlePortCoder:] + 1149
15  com.apple.Foundation          	0x952f947e -[NSConcretePortCoder dispatch] + 142
16  com.apple.Foundation          	0x952f8be3 __NSFireMachPort + 339
17  com.apple.CoreFoundation      	0x92663635 __CFMachPortPerform + 117
18  com.apple.CoreFoundation      	0x92687908 CFRunLoopRunSpecific + 3896
19  com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
20  com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
21  com.apple.Foundation          	0x952bebad -[NSThread main] + 45
22  com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
23  libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
24  libSystem.B.dylib             	0x9569b5b2 thread_start + 34

Thread 3:
0   libSystem.B.dylib             	0x9566a4a6 mach_msg_trap + 10
1   libSystem.B.dylib             	0x95671c9c mach_msg + 72
2   com.apple.CoreFoundation      	0x926870ce CFRunLoopRunSpecific + 1790
3   com.apple.CoreFoundation      	0x92687cf8 CFRunLoopRunInMode + 88
4   com.apple.Foundation          	0x953beae8 -[NSConnection run] + 280
5   com.apple.Foundation          	0x952bebad -[NSThread main] + 45
6   com.apple.Foundation          	0x952be754 __NSThread__main__ + 308
7   libSystem.B.dylib             	0x9569b6f5 _pthread_start + 321
8   libSystem.B.dylib             	0x9569b5b2 thread_start + 34




_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Distributed Objects invocation dispatch not thread safe?? (From: Dave Cox <email@hidden>)

  • Prev by Date: Re: Detecting in/activity
  • Next by Date: Remove '\n' char from NSString
  • Previous by thread: Distributed Objects invocation dispatch not thread safe??
  • Next by thread: Apple's NSPersistentDocument Tutorial and MOCs
  • Index(es):
    • Date
    • Thread