|
From: Evan S. <ev...@dr...> - 2007-02-16 02:06:43
|
Sometimes, resolve() apparently crashes the child process made via
fork() in gaim_srv_resolve().
This not happening would clearly be optimal... but I don't see what's
wrong with the call to res_query(). (It appears as res_9_nquery() in
the below stack trace from sample because OS X sends the call there
directly). Somehow, res_query() crashes in res_9_nclose()... see below:
-----
261 -[SLGaimCocoaAdapter setStatusID:isActive:arguments:onAccount:]
261 jabber_login
261 gaim_srv_resolve
261 resolve
261 res_9_nquery
261 res_nquery_2
261 res_9_nsend_2
261 res_9_nclose
261 res_9_nclose
261 cerror
261 malloc_zone_calloc
261 0xfffffffc
261 _sigtramp
261 CrashHandler_Signal
261 -[NSPathStore2
stringByAppendingPathComponent:]
261 +[NSPathStore2
pathStoreWithCharacters:length:]
261 NSAllocateObject
261
_internal_class_createInstanceFromZone
261 malloc_zone_calloc
261 0xfffffffc
261 0xfffffffc
-----
It crashes, but in the case of Adium, a signal handler has been
installed previously to handle crashes. The signal handler, which
uses Cocoa code, ends up stuck in an infinite loop as a result (Cocoa
frameworks can't be used from a fork()'d process without other magic
because memory addresses are shared with the parent, I understand).
Would it be reasonable to clear signal handlers in the child process
before resolve() is called? If not, how should this be handled?
Thanks,
Evan |