Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dns-collector
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • labs
  • dns-collector
  • Issues
  • #3

Closed
Open
Created Feb 09, 2018 by Petr Špaček@pspacek

crash while reading PCAP: libknot/dname.c:692: knot_dname_is_equal: Assertion `d1' failed

~/dnscol/dns-collector -C dns-collector.conf lo128-p5353.pcap
I 2018-02-09 12:17:26.896188 Selected CSV fields: 0x7fffff
I 2018-02-09 12:17:26.896250 Processing offline input pcapfile:lo128-p5353.pcap
dns-collector: libknot/dname.c:692: knot_dname_is_equal: Assertion `d1' failed.
Aborted (core dumped)

GDB

(gdb) bt                                                 
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff73a9f5d in __GI_abort () at abort.c:90
#2  0x00007ffff739ff17 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x7ffff7bc24a3 "d1", file=file@entry=0x7ffff7bc2486 "libknot/dname.c", line=line@entry=692,
    function=function@entry=0x7ffff7bc22d0 <__PRETTY_FUNCTION__.4655> "knot_dname_is_equal") at assert.c:92
#3  0x00007ffff739ffc2 in __GI___assert_fail (assertion=assertion@entry=0x7ffff7bc24a3 "d1", file=file@entry=0x7ffff7bc2486 "libknot/dname.c", line=line@entry=692,
    function=function@entry=0x7ffff7bc22d0 <__PRETTY_FUNCTION__.4655> "knot_dname_is_equal") at assert.c:101
#4  0x00007ffff7b997ca in knot_dname_is_equal (d1=<optimized out>, d2=<optimized out>) at libknot/dname.c:692
#5  0x000055555556a012 in dns_packet_qname_match (request=0x55555b5ab870, response=0x55555b5a4610) at src/packet.c:223
#6  0x000055555556af10 in dns_packet_hash_get_match (h=0x5555557a7ae0, p=0x55555b5a4610) at src/packet_hash.c:158
#7  0x000055555556bd08 in dns_worker_packet_matcher_main (matcher=0x5555557a8300) at src/worker_packet_matcher.c:178
#8  0x00007ffff77587fc in start_thread (arg=0x7ffff4d72700) at pthread_create.c:465
#9  0x00007ffff7485b5f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

   │214     int
   │215     dns_packet_qname_match(struct dns_packet *request, struct dns_packet *response)
   │216     {
   │217         assert(request && response);
   │218         assert(DNS_PACKET_IS_REQUEST(request) &&
   │219                DNS_PACKET_IS_RESPONSE(response));
   │220         // Equal, or response empty (1 byte) (matches any request)
   │221         return ((response->knot_packet->qname_size == 1) ||
   │222                 (request->knot_packet->qname_size == response->knot_packet->qname_size &&
  >│223                 knot_dname_is_equal(knot_pkt_qname(request->knot_packet), knot_pkt_qname(response->knot_packet))));
   │224     }

(gdb) p *request->knot_packet                            
$4 = {wire = 0x55555b686ff0 <incomplete sequence \351>, size = 12, max_size = 12, parsed = 12, reserved = 0, qname_size = 0, rrset_count = 0, flags = 0, opt_rr = 0x0, tsig_rr = 0x0, tsig_wire = {pos = 0x0, len = 0},
    current = KNOT_ADDITIONAL, sections = {{pkt = 0x55555b5a4540, pos = 0, count = 0}, {pkt = 0x55555b5a4540, pos = 0, count = 0}, {pkt = 0x55555b5a4540, pos = 0, count = 0}}, rrset_allocd = 0, rr_info = 0x0, rr = 0x0, mm = {
    ctx = 0x0, alloc = 0x7ffff7bae8d0 <mm_malloc>, free = 0x7ffff74003e0 <__GI___libc_free>}, compr = {wire = 0x55555b686ff0 <incomplete sequence \351>, rrinfo = 0x0, suffix = {pos = 0, labels = 0 '\000'}}}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking