Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursor immediately crashes on OS X #2955

Closed
zeha opened this issue Nov 29, 2015 · 2 comments
Closed

Recursor immediately crashes on OS X #2955

zeha opened this issue Nov 29, 2015 · 2 comments

Comments

@zeha
Copy link
Collaborator

zeha commented Nov 29, 2015

OS X 10.11.1
clang: Apple LLVM version 7.0.0 (clang-700.1.76)
boost: stable 1.59.0 (bottled), HEAD
git head 1ed6e21

ldb -- ../pdns/pdns_recursor --daemon=no --socket-dir=. --config-dir=. --local-port=5555 
(lldb) target create "../pdns/pdns_recursor"
Current executable set to '../pdns/pdns_recursor' (x86_64).
(lldb) settings set -- target.run-args  "--daemon=no" "--socket-dir=." "--config-dir=." "--local-port=5555"
(lldb) run
Process 60644 launched: '../pdns/pdns_recursor' (x86_64)
Nov 29 02:18:22 PowerDNS Recursor 0.0.apidnsnamedot.g43111af.dirty (C) 2001-2015 PowerDNS.COM BV
Nov 29 02:18:22 Using 64-bits mode. Built using clang 7.0.0 (clang-700.1.76) on Nov 28 2015 17:27:47 by ch@sx.
Nov 29 02:18:22 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Nov 29 02:18:22 Reading random entropy from '/dev/urandom'
Nov 29 02:18:22 Only allowing queries from: 127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10
Nov 29 02:18:22 Will not send queries to: 127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32, 0.0.0.0, ::
Nov 29 02:18:22 PowerDNS Recursor itself will distribute queries over threads
Nov 29 02:18:22 NOT using IPv6 for outgoing queries - set 'query-local-address6=::' to enable
Nov 29 02:18:22 Inserting rfc 1918 private space zones
Nov 29 02:18:22 Listening for UDP queries on 127.0.0.1:5555
Nov 29 02:18:22 Not decreasing socket buffer size from 131072 to 65000
Nov 29 02:18:22 Listening for TCP queries on 127.0.0.1:5555
Nov 29 02:18:22 Raised soft limit on number of filedescriptors to 4121 to match max-mthreads and threads settings
Nov 29 02:18:22 Launching 3 threads
Nov 29 02:18:22 Done priming cache with root hints
Nov 29 02:18:22 Done priming cache with root hints
Nov 29 02:18:22 Done priming cache with root hints
Nov 29 02:18:22 Enabled 'select' multiplexer
Assertion failed: (this != &x), function operator=, file /usr/local/include/boost/container/string.hpp, line 757.
Assertion failed: (this != &x), function operator=, file /usr/local/include/boost/container/string.hpp, line 757.
Assertion failed: (this != &x), function operator=, file /usr/local/include/boost/container/string.hpp, line 757.
Process 60644 stopped
* thread #2: tid = 0x208062, 0x00007fff903dc0ae libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
    frame #0: 0x00007fff903dc0ae libsystem_kernel.dylib`__pthread_kill + 10
libsystem_kernel.dylib`__pthread_kill:
->  0x7fff903dc0ae <+10>: jae    0x7fff903dc0b8            ; <+20>
    0x7fff903dc0b0 <+12>: movq   %rax, %rdi
    0x7fff903dc0b3 <+15>: jmp    0x7fff903d73ef            ; cerror_nocancel
    0x7fff903dc0b8 <+20>: retq   
(lldb) bt
* thread #2: tid = 0x208062, 0x00007fff903dc0ae libsystem_kernel.dylib`__pthread_kill + 10, stop reason = signal SIGABRT
  * frame #0: 0x00007fff903dc0ae libsystem_kernel.dylib`__pthread_kill + 10
    frame #1: 0x00007fff947ff500 libsystem_pthread.dylib`pthread_kill + 90
    frame #2: 0x00007fff8abb037b libsystem_c.dylib`abort + 129
    frame #3: 0x00007fff8ab779c4 libsystem_c.dylib`__assert_rtn + 321
    frame #4: 0x0000000100012cdb pdns_recursor`boost::container::basic_string<char, std::__1::char_traits<char>, boost::container::new_allocator<char> >::operator=(this=<unavailable>, x=<unavailable>) + 123 at string.hpp:757
    frame #5: 0x00000001000fb10e pdns_recursor`SyncRes::shuffleInSpeedOrder(std::__1::set<DNSName, std::__1::less<DNSName>, std::__1::allocator<DNSName> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [inlined] DNSName::operator=(DNSName&&) + 510 at dnsname.hh:30
    frame #6: 0x00000001000fb0fb pdns_recursor`SyncRes::shuffleInSpeedOrder(std::__1::set<DNSName, std::__1::less<DNSName>, std::__1::allocator<DNSName> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [inlined] std::__1::enable_if<(is_move_constructible<DNSName>::value) && (is_move_assignable<DNSName>::value), void>::type std::__1::swap<DNSName>(DNSName&, DNSName&) + 17 at type_traits:3562
    frame #7: 0x00000001000fb0ea pdns_recursor`SyncRes::shuffleInSpeedOrder(std::__1::set<DNSName, std::__1::less<DNSName>, std::__1::allocator<DNSName> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [inlined] void std::__1::random_shuffle<std::__1::__wrap_iter<DNSName*>, unsigned int (&)(unsigned int)>(std::__1::__wrap_iter<DNSName*>, std::__1::__wrap_iter<DNSName*>, unsigned int (&&&)(unsigned int)) + 69 at algorithm:3123
    frame #8: 0x00000001000fb0a5 pdns_recursor`SyncRes::shuffleInSpeedOrder(this=0x00000001050fcb20, tnameservers=<unavailable>, prefix="") + 405 at syncres.cc:848
    frame #9: 0x00000001000e6f44 pdns_recursor`SyncRes::doResolveAt(this=0x00000001050fcb20, nameservers=size=9, auth=DNSName @ 0x00000001050fc7b8, flawedNSSet=true, qname=0x00000001050fcb08, qtype=0x00000001050fca98, ret=size=0, depth=<unavailable>, beenthere=<unavailable>) + 1220 at syncres.cc:920
    frame #10: 0x00000001000dcb60 pdns_recursor`SyncRes::doResolve(this=0x00000001050fcb20, qname=0x00000001050fcb08, qtype=<unavailable>, ret=size=0, depth=0, beenthere=size=1) + 4864 at syncres.cc:435
    frame #11: 0x00000001000daf2d pdns_recursor`SyncRes::beginResolve(this=0x00000001050fcb20, qname=0x00000001050fcb08, qtype=0x00000001050fca98, qclass=1, ret=size=0) + 765 at syncres.cc:177
    frame #12: 0x000000010007c6c1 pdns_recursor`houseKeeping((null)=<unavailable>) + 993 at pdns_recursor.cc:1513
    frame #13: 0x000000010008fec5 pdns_recursor`MTasker<PacketID, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >::threadWrapper(self1=<unavailable>, self2=<unavailable>, tf=(pdns_recursor`houseKeeping(void*) at pdns_recursor.cc:1474), tid=0, val1=<unavailable>, val2=<unavailable>)(void*), int, unsigned int, unsigned int) + 101 at mtasker.cc:400
    frame #14: 0x00007fff811d133b libsystem_platform.dylib`_ctx_start + 11
(lldb) frame select 6
frame #6: 0x00000001000fb0fb pdns_recursor`SyncRes::shuffleInSpeedOrder(std::__1::set<DNSName, std::__1::less<DNSName>, std::__1::allocator<DNSName> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) [inlined] std::__1::enable_if<(is_move_constructible<DNSName>::value) && (is_move_assignable<DNSName>::value), void>::type std::__1::swap<DNSName>(DNSName&, DNSName&) + 17 at type_traits:3562
   3559                                     is_nothrow_move_assignable<_Tp>::value)
   3560 {
   3561     _Tp __t(_VSTD::move(__x));
-> 3562     __x = _VSTD::move(__y);
   3563     __y = _VSTD::move(__t);
   3564 }
   3565 
(lldb) frame select 8
frame #8: 0x00000001000fb0a5 pdns_recursor`SyncRes::shuffleInSpeedOrder(this=0x00000001050fcb20, tnameservers=<unavailable>, prefix="") + 405 at syncres.cc:848
   845      speed=t_sstorage->nsSpeeds[val].get(&d_now);
   846      speeds[val]=speed;
   847    }
-> 848    random_shuffle(rnameservers.begin(),rnameservers.end(), dns_random);
   849    speedOrder so(speeds);
   850    stable_sort(rnameservers.begin(),rnameservers.end(), so);
   851  
(lldb) p rnameservers
(std::__1::vector<DNSName, std::__1::allocator<DNSName> >) $0 = size=9 {
  [0] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01i\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'i'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [1] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = "\x01")
            s = {
              h = (is_short = '\x01', length = '\0')
              data = {
                [0] = '\0'
                [1] = '\0'
                [2] = '\0'
                [3] = '\0'
                [4] = '\0'
                [5] = '\0'
                [6] = '\0'
                [7] = '\0'
                [8] = '\0'
                [9] = '\0'
                [10] = '\0'
                [11] = '\0'
                [12] = '\0'
                [13] = '\0'
                [14] = '\0'
                [15] = '\0'
                [16] = '\0'
                [17] = '\0'
                [18] = '\0'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [2] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01c\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'c'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [3] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01d\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'd'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [4] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01f\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'f'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [5] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01h\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'h'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\x91'
                [22] = 'V'
              }
            }
          }
        }
      }
    }
  }
  [6] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01a\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'a'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [7] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01l\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'l'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
  [8] = {
    d_storage = {
      boost::container::container_detail::basic_string_base<boost::container::new_allocator<char> > = {
        members_ = {
          m_repr = {
            r = (dummy = ")\x01m\froot-servers\x03net")
            s = {
              h = (is_short = '\x01', length = '\x14')
              data = {
                [0] = '\x01'
                [1] = 'm'
                [2] = '\f'
                [3] = 'r'
                [4] = 'o'
                [5] = 'o'
                [6] = 't'
                [7] = '-'
                [8] = 's'
                [9] = 'e'
                [10] = 'r'
                [11] = 'v'
                [12] = 'e'
                [13] = 'r'
                [14] = 's'
                [15] = '\x03'
                [16] = 'n'
                [17] = 'e'
                [18] = 't'
                [19] = '\0'
                [20] = '\0'
                [21] = '\0'
                [22] = '\0'
              }
            }
          }
        }
      }
    }
  }
}

recursor.conf:


# Generated by runtests.py
@zeha zeha added this to the rec-4.0.0 milestone Nov 29, 2015
@zeha
Copy link
Collaborator Author

zeha commented Nov 29, 2015

927aed2 has fixed this crash. Should keep this in mind when switching back to boost::container::string.

@Habbie
Copy link
Member

Habbie commented Dec 3, 2015

@ahupowerdns I'm closing this as it has been fixed, we're relying on you to remember this ticket when you retry boost::container::string ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants