Apex is not freed in the zone_contents_free function
May I ask why apex is not freed in the zone_contents_free function? I use "knotc zone-reload -f $zonename" to reload the zone which has been updated just now while there are many queries. But the segmentation fault may occur sometimes. And this could happed in knot 3.1.1 with both geoip module and other module which I have added. And the bt like this:
#0 0x00007f7f5d57402e in knot_dname_labels (name=0x1 <error: Cannot access memory at address 0x1>, pkt=0x0)
at libknot/dname.c:725
#1 0x00007f7f5d5741b9 in knot_dname_in_bailiwick (name=0x55fc20dde900 "3",
bailiwick=0x1 <error: Cannot access memory at address 0x1>) at libknot/dname.c:772
#2 0x000055fc19fad33f in zone_contents_find_dname (zone=0x7f79a400caf0, name=0x55fc20dde900 "3",
match=0x7f7ed003c140, closest=0x7f7ed003c148, previous=0x7f7ed003c150) at knot/zone/contents.c:275
#3 0x000055fc19fbd3de in solve_name (pkt=pkt@entry=0x7f7ed003c338, qdata=qdata@entry=0x7f7ed003c038,
state=<optimized out>) at knot/nameserver/internet.c:415
#4 0x000055fc19fbd7df in solve_answer (ctx=0x0, qdata=0x7f7ed003c038, pkt=0x7f7ed003c338, state=<optimized out>)
at knot/nameserver/internet.c:442
#5 answer_query (qdata=0x7f7ed003c038, pkt=0x7f7ed003c338) at knot/nameserver/internet.c:615
#6 internet_process_query (pkt=pkt@entry=0x7f7ed003c338, qdata=qdata@entry=0x7f7ed003c038)
at knot/nameserver/internet.c:681
#7 0x000055fc19f9dfa0 in query_internet (ctx=0x7f7ecbdfca70, pkt=0x7f7ed003c338)
at knot/nameserver/process_query.c:151
#8 process_query_out (ctx=0x7f7ecbdfca70, pkt=0x7f7ed003c338) at knot/nameserver/process_query.c:594
#9 0x000055fc19f71e12 in knot_layer_produce (pkt=0x7f7ed003c338, ctx=0x7f7ecbdfca70) at ./knot/query/layer.h:134
#10 udp_handle (xdp_msg=0x0, tx=0x7f7f5de1ea40, rx=<optimized out>, ss=0x7f7f5de1e040, fd=<optimized out>,
udp=0x7f7ecbdfca70) at knot/server/udp-handler.c:93
#11 udp_recvmmsg_handle (ctx=0x7f7ecbdfca70, d=0x7f7f5de1e038) at knot/server/udp-handler.c:314
#12 0x000055fc19f721a2 in udp_master (thread=thread@entry=0x55fc1b3d8b10) at knot/server/udp-handler.c:540
#13 0x000055fc19f6dbed in thread_ep (data=0x55fc1b3d8b10) at knot/server/dthreads.c:146
#14 0x00007f7f5cf074a4 in start_thread (arg=0x7f7ecbdfd700) at pthread_create.c:456
#15 0x00007f7f5c28dd0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
I just want to know if apex should be freed if zone contents is freed?