Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash when removing



We've just a couple of crash reports from a user, who is seeing an
issue when a search is terminated.

We haven't see this before, in fact haven't really seen any Bonjour
issues, or even looked at this code, for ages.

IIRC, the code, which I've pasted below is based pretty closely on
some sample code, probably including what appear to be some commented
out workarounds.

Any ideas what might be happening here.


Thread 0 Crashed: 0 com.apple.CoreFoundation 0x907d0300 CFHash + 24 1 com.apple.CoreFoundation 0x907e2244 __CFSetFindBuckets1b + 140 2 com.apple.CoreFoundation 0x907dc060 CFSetContainsValue + 204 3 com.apple.CoreFoundation 0x907f24ec CFRunLoopRemoveSource + 92 4 com.markspace.synctogether 0x0000a40c freeDNSService + 44

Thread 0 crashed with PPC Thread State 64:
 srr0: 0x00000000907d0300 srr1: 0x100000000200f930
   vrsave: 0x0000000000000000
   cr: 0x24004478          xer: 0x0000000000000000   lr:
0x00000000907d02f8  ctr: 0x00000000907d02e8
   r0: 0x00000000907e2244   r1: 0x00000000bfffe430   r2:
0x0000000000000004   r3: 0x0000000000000000
   r4: 0x0000000000000000   r5: 0x0000000000000000   r6:
0xffffffffffffffff   r7: 0x0000000000000020
   r8: 0x7372762e5f746370   r9: 0x0000000000000000  r10:
0x0000000090a44628  r11: 0x00000000a07c22d8
  r12: 0x00000000907d02e8  r13: 0x00000000000a0000  r14:
0x00000000000a0000  r15: 0x00000000000a0000
  r16: 0x00000000000a0000  r17: 0x00000000000a0000  r18:
0x00000000000a0000  r19: 0x0000000000097318
  r20: 0x0000000004c278c0  r21: 0x0000000000389fa0  r22:
0x00000000000d9108  r23: 0x0000000000000001
  r24: 0x0000000090abddb0  r25: 0x00000000a2975e48  r26:
0x0000000000000000  r27: 0x0000000000000000
  r28: 0x000000000030f3b0  r29: 0x00000000a07c3514  r30:
0x00000000a07c7a88  r31: 0x00000000907d02f8


======


typedef struct MSDNSServiceState { DNSServiceRef service; CFRunLoopSourceRef source; CFSocketRef socket; CFRunLoopTimerRef timer; void *info; } MSDNSServiceState;


static void freeDNSService(MSDNSServiceState *serviceState) {

   /* Remove the CFRunLoopSource from the current run loop. */
   CFRunLoopRemoveSource(CFRunLoopGetCurrent(), serviceState->source,
kCFRunLoopCommonModes);
   CFRelease(serviceState->source);

   /* Invalidate the CFSocket. */
   CFSocketInvalidate(serviceState->socket);
   CFRelease(serviceState->socket);

   /* Workaround that gives time to CFSocket's select thread so it
can remove the socket from its FD set
       before we close the socket by calling DNSServiceRefDeallocate.
<rdar://problem/3585273> */
   // usleep(1000);

   /* Terminate the connection with the mDNSResponder daemon, which
cancels the operation. */
   DNSServiceRefDeallocate(serviceState->service);

   //    if (ref->timer) {
   //
   //        /* Cancel the CFTimer and remove the CFTimer from the runloop. */
   //        CFRunLoopTimerInvalidate(ref->timer);
   //        CFRunLoopRemoveTimer(CFRunLoopGetCurrent(), ref->timer,
kCFRunLoopCommonModes);
   //    }
   //
   free(serviceState);
   serviceState = NULL;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/bonjour-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.