Re: Re: Re: SIGTRAP after writing to socket
Re: Re: Re: SIGTRAP after writing to socket
- Subject: Re: Re: Re: SIGTRAP after writing to socket
- From: "Martin Redington" <email@hidden>
- Date: Fri, 17 Nov 2006 14:12:02 +0000
My crasher turned out to be an issue with mach_port leakage (details
and a fix at http://www.cocoadev.com/index.pl?DistributedObjectsForInterThreadCommsCrash)
Enabling the ports column in Activity Monitor showed the ever growing
number of mach_ports quite clearly, and this line in CFRunLoop.c
if (CFPORT_NULL == rlm->_portSet) HALT;
appears to be the point of failure.
Although your socket issue is quite probably unrelated, one thing that
was very handy in locating this was to turn on the debug frameworks
(you may need to construct quite an isolated test case, as these don't
seem to play nicely with lots of code - I could only get them to work
successfully with my issue in a command line tool).
cheers,
m.
On 11/16/06, Martin Redington <email@hidden> wrote:
Funny that this should crop up here - I'm looking at a crash that
manifests itself as a SIGTRAP, and debugger traces indicate that this
is indeed hitting an int3 instruction on intel, and a trap instruction
on PPC.
The crash appears to be in CFRunLoop, specifically in __CFRunLoopFindMode
I don't think its the same as yours - mine seems to be related to the
use of Distributed Objects, and is on 10.4 (although it may well be
present on 10.3).
However, it only seems to manifest itself after a large number of
threads have been created, and is very hard to reproduce normally
(although we have test cases that will reliably get it) - if yours is
like this, its possible that you just haven't hit it on 10.4 yet.
Interestingly I can get the crash with (a variant of) the
SimpleThreads example, whose original author was ... Quinn "The
Eskimo!" (http://www.mildmanneredindustries.com/downloads/SimpleThreadsCrashes.dmg)
cheers,
Martin
Further details available at:
http://www.cocoabuilder.com/archive/message/cocoa/2006/11/14/174438
http://www.cocoadev.com/index.pl?DistributedObjectsForInterThreadCommsCrash
On 11/16/06, Quinn <email@hidden> wrote:
> At 8:33 -0800 15/11/06, Stefan Werner wrote:
> >It does, that is exactly what's puzzling me. The crash log mentions
> >EXC_BREAKPOINT.
>
> That's because of the way that CrashReporter works. It catches the
> Mach exception (EXC_BREAKPOINT), generates the crash log, and then
> forwards the exception to the next handler in the chain. In this
> case, the next handler is the BSD subsystem within the kernel, hich
> reflects the exception back into the process as the appropriate BSD
> signal (SIGTRAP).
>
> Given that there's no debugger involved, the other place I've seen
> these sort of exceptions is when certain pieces of system software
> 'panic'. For example, CF's HALT macro (used when it detects that
> things are completely messed up) expands to a breakpoint instruction
> ("trap" on PPC, "int3" on Intel). dyld does the same thing. Usually
> when this happens you get a message on the console that explains what
> happened. Do you see anything like this?
>
> Failing that, please post the crash log.
>
> S+E
> --
> Quinn "The Eskimo!" <http://www.apple.com/developer/>
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Macnetworkprog mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden