Hi, Rogerio:

Based on the stack trace, it looks like the crash is occurring when a
TCP query times out, and we try to log it as if it were a normal TCP
response.  Could you try the attached patch and see if it avoids the
crash?

Thanks!

Rogerio Bastos wrote:
> #0  serviced_tcp_callback (c=0x0, arg=0x555556b853b0, error=-2, rep=0x0) at 
> services/outside_network.c:1596
>         r2 = {c = 0x3000000010, addr = {ss_family = 59744, __ss_align = 
> 140737488349344, 
>             __ss_padding = 
> "\000T\217\\\337`*\333\004\000\000\000}\000\000\000\000\000\000\000\377\177\000\000}",
>  '\000' <repeats 15 times>, 
> "\270\333vVUU\000\000\200pv\367\377\177\000\000\240\333vVUU", '\000' <repeats 
> 14 times>, 
> "\001\000\000\000\252\\T\367\377\177\000\000\000\000\000\000\004\000\000\002\000T\217\\\337`*\333\000\000\000\000\001\000\000"},
>  
>           addrlen = 4149479993, srctype = 32767, pktinfo = {v6info = 
> {ipi6_addr = {__in6_u = {
>                   __u6_addr8 = 
> "\000\000\000\000\000\000\000\000\060\300]VUU\000", __u6_addr16 = {0, 0, 0, 
> 0, 49200, 22109, 
>                     21845, 0}, __u6_addr32 = {0, 0, 1448984624, 21845}}}, 
> ipi6_ifindex = 1432264672}, v4info = {
>               ipi_ifindex = 0, ipi_spec_dst = {s_addr = 0}, ipi_addr = 
> {s_addr = 1448984624}}}}
> #1  0x00005555555e815a in outnet_tcptimer (arg=0x5555566d9630) at 
> services/outside_network.c:1120
>         w = 0x5555566d9630
>         outnet = 0x555555aa20e0
>         cb = 0x5555555e9fe0 <serviced_tcp_callback>
>         cb_arg = 0x555556b853b0
>         __func__ = "outnet_tcptimer"

-- 
Robert Edmonds
[email protected]
>From 91e1f0ab2b1ce0b8ce91a31c1463d24a7ac43a98 Mon Sep 17 00:00:00 2001
From: Robert Edmonds <[email protected]>
Date: Wed, 8 Apr 2015 14:15:25 -0400
Subject: [PATCH] dnstap: Only try to log TCP outside responses on
 NETEVENT_NOERROR

---
 services/outside_network.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/services/outside_network.c b/services/outside_network.c
index 5bb52ff..9a679eb 100644
--- a/services/outside_network.c
+++ b/services/outside_network.c
@@ -1590,7 +1590,7 @@ serviced_tcp_callback(struct comm_point* c, void* arg, int error,
 		infra_update_tcp_works(sq->outnet->infra, &sq->addr,
 			sq->addrlen, sq->zone, sq->zonelen);
 #ifdef USE_DNSTAP
-	if(sq->outnet->dtenv &&
+	if(error==NETEVENT_NOERROR && sq->outnet->dtenv &&
 	   (sq->outnet->dtenv->log_resolver_response_messages ||
 	    sq->outnet->dtenv->log_forwarder_response_messages))
 		dt_msg_send_outside_response(sq->outnet->dtenv, &sq->addr,
-- 
2.1.4

_______________________________________________
Unbound-users mailing list
[email protected]
http://unbound.nlnetlabs.nl/mailman/listinfo/unbound-users

Reply via email to