title: getaddrinfo calls assert in the program
body: <p>I am developing a program using the libcurl. The program creates a thread, which in turn makes an HTTP request using libcurl. But sometimes the program crashes with the error </p>
  
  <blockquote>
    <p>unexpected error 9 on netlink descriptor</p>
  </blockquote>
  
  <p>After in curl turned off AsynchDNS. But the problem remains. As I understand the reason for assert is <code>getaddrinfo</code>. Maybe to use <code>getaddrinfo</code> in multi-threaded applications some kind of initialization is needed? Or is <code>getaddrinfo</code> generally non-thread safe?</p>
  
  <p><a href="https://i.stack.imgur.com/DZXMc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DZXMc.jpg" alt="GDB stack trace"></a></p>
  
  <p>libcurl version:</p>
  
  <blockquote>
    <p>curl 7.67.0 (x86_64-pc-linux-gnu) libcurl/7.67.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4
    Release-Date: 2019-11-06
    Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
    Features: HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets</p>
  </blockquote>
  
  <p>glibc version:</p>
  
  <blockquote>
    <p>ldd (Ubuntu GLIBC 2.27-3ubuntu1) 2.27
    Copyright (C) 2018 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Written by Roland McGrath and Ulrich Drepper.</p>
  </blockquote>