Maintained by: NLnet Labs

Strange Crash on iOS

W.C.A. Wijngaards
Mon Aug 1 14:04:58 CEST 2016


Hi Blair,

Perhaps upgrade the libunbound to a newer version, this sounds like a
bug in the locking mechanism of the log functions that was fixed a while
ago?

Otherwise, the fopen(logfile) fails, or the thread_key_create function
fails, and it tries to print an error for that?  It does not release
that logkey until app exit, but it has a global variable key_create to
keep track of whether the log thread key has already been created?

Best regards, Wouter

On 29/07/16 20:21, Blair Mitchelmore via Unbound-users wrote:
> I’ve integrated libunbound in an iOS application, and we’ve been
> experiencing a strange crash ever since. Basically, when we try to
> create an unbound context (ub_ctx_create) it sometimes fails, but it
> fails inside log_init before any actual unbound work has been done. From
> the stack trace, I can see that log_init calls log_err which calls
> log_vmsg, which calls log_err, and so on until things break down and the
> app crashes. Has anybody run into something like this before? I’m not
> exactly sure how to address this. I would disable logging, but it seems
> like you can only disable logging (ub_ctx_debugout) once you have a
> context object.
> 
> Thanks,
> Blair


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://unbound.nlnetlabs.nl/pipermail/unbound-users/attachments/20160801/a8393aed/attachment.sig>