Skip to content

Fall back to non-threaded DNS requests if can't start async DNS thread? #6830

@NattyNarwhal

Description

@NattyNarwhal

I did this

A lot of IBM i users are calling curl (not the native ILE version, but the Unix version under PASE, though the ILE native one will likely be affected since pthread is the same under both), be it standalone or via say, PHP, through programs/scripts in the native environment. The native environment has... quirky thread safety rules, so by default, programs invoked can't create threads. As such, curl will usually fail out with a message like getaddrinfo() thread failed to start.

I expected the following

I end up telling people a lot to add the magic environment variable or such to make threading work. While this is ideal (you want async DNS to work if it can), it is pretty annoying; I wonder if a fallback is reasonable, or perhaps on i specifically, a better error message?

curl/libcurl version

curl 7.70.0 (powerpc-ibm-os400) libcurl/7.70.0 OpenSSL/1.1.1g zlib/1.2.11 libssh2/1.9.0
Release-Date: 2020-04-29
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS HTTPS-proxy IPv6 Largefile libz NTLM NTLM_WB SSL TLS-SRP UnixSockets

operating system

IBM i PASE 7.2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions