[DRE-maint] Bug#1084766: ruby-excon: FTBFS with unshare backend
Santiago Vila
sanvila at debian.org
Mon Oct 7 23:41:07 BST 2024
Package: src:ruby-excon
Version: 0.112.0-2
Severity: serious
Tags: ftbfs
Dear maintainer:
During a rebuild of all packages in unstable, your package failed to build:
--------------------------------------------------------------------------------
[...]
debian/rules binary
dh binary --buildsystem=ruby --with ruby
dh_update_autotools_config -O--buildsystem=ruby
dh_autoreconf -O--buildsystem=ruby
dh_auto_configure -O--buildsystem=ruby
dh_ruby --configure
dh_auto_build -O--buildsystem=ruby
dh_ruby --build
dh_auto_test -O--buildsystem=ruby
dh_ruby --test
create-stamp debian/debhelper-build-stamp
dh_testroot -O--buildsystem=ruby
dh_prep -O--buildsystem=ruby
dh_auto_install --destdir=debian/ruby-excon/ -O--buildsystem=ruby
[... snipped ...]
readline nonblock can handle partial reads
+ returns [["one\n", "two\n"], 2, [5, "EAGAIN", 3, "EOF"]]
readline nonblock before read
+ returns [["one\n", "two\n"], 2, [8, "EOF"]]
read_nonblock does not EOF early
+ returns [["one", "two"], 2, [3, "EAGAIN", 3, "EOF"]]
chunk_size: 512
read_nonblock
readline nonblock is efficient
+ returns ["one\n", 1, [8, "EOF"]]
readline nonblock works sequentially
+ returns [["one\n", "two\n"], 1, [8, "EOF"]]
readline nonblock can handle partial reads
+ returns [["one\n", "two\n"], 2, [5, "EAGAIN", 3, "EOF"]]
readline nonblock before read
+ returns [["one\n", "two\n"], 2, [8, "EOF"]]
read_nonblock does not EOF early
+ returns [["one", "two"], 2, [3, "EAGAIN", 3, "EOF"]]
Excon thread safety
thread_safe_sockets configuration
thread_safe_sockets default + returns true
with thread_safe_sockets set false + returns false
+ long_thread
+ short_thread
read should timeout
nonblock => false hits read_timeout + raises Excon::Error::Timeout
nonblock => true hits read_timeout + raises Excon::Error::Timeout
Excon::Utils
#connection_uri
using UNIX scheme + returns "unix:///tmp/some.sock"
using HTTP scheme
with default port + returns "http://foo.com:80"
without default port + returns "http://foo.com"
#request_uri
using UNIX scheme
without query + returns "unix:///tmp/some.sock/some/path"
with query + returns "unix:///tmp/some.sock/some/path?bar=that&foo=this"
using HTTP scheme
without query + returns "http://foo.com:80/some/path"
with query + returns "http://foo.com:80/some/path?bar=that&foo=this"
#escape_uri + returns "/hello%20excon"
#unescape_uri + returns "/hello excon"
#unescape_form + returns "message=We love excon!"
#split_header_value + returns ["value"]
#split_header_value + returns ["value1", "value2"]
#split_header_value + returns ["text/html;q=0.5", "application/json; version=1"]
#split_header_value + returns ["foo/bar;key=\"A,B,C\""]
#split_header_value + returns []
13 pending and 1457 succeeded in 42.9364881921355 seconds
/usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*/\*_spec.rb -c -f doc -r ./spec/spec_helper.rb
Excon::Error
#status_errors
.keys
returns the pertinent HTTP error numbers
#new
returns an Excon::Error
raises errors for bad URIs
raises errors for bad paths
when remaining backwards compatible
#new
should raise standard error and catch standard error
should raise legacy errors and catch legacy errors
should raise standard error and catch legacy errors
#status_error
should raise with status_error() and catch with standard error
should raise with status_error() and catch with legacy error
should raise with legacy status_error() and catch with standard
when exceptions are rescued
when :debug_request and :debug_response are switched off
exception message does not include response or response info
when :debug_request and :debug_response are switched on
exception message includes request and response info
when only :debug_request is turned on
exception message includes only request info
when only :debug_response is turned on
exception message includes only response info
Excon::Test::Server
when the web server is webrick
it should behave like a excon test server
returns an instance
starts the server
stops the server
when the web server is unicorn
bound to a tcp socket
it should behave like a excon test server
returns an instance
starts the server
stops the server
bound to a unix socket
it should behave like a excon test server
returns an instance
starts the server
stops the server
when the web server is puma
it should behave like a excon test server
returns an instance
starts the server
stops the server
when the web server is a executable
it should behave like a excon test server
returns an instance
starts the server
stops the server
Excon
has a version number
Excon::Connection
when an explicit uri is passed
.new
returns an instance
when :method is :get and :path is /content-length/100
#request
returns an Excon::Response
Excon::Response
#status
returns 200
when nonblock is true and persistent is false
when :method is get and :path is /content-length/100
#request
returns an Excon::Response
Excon::Response
#status
returns 200
#status returns 200
#headers
["Content-Length"] returns 100
["Content-Type"] returns "text/html;charset=utf-8"
['Date'] returns a valid date
['Server'] matches /^WEBrick/
['Custom'] returns Foo: bar
#remote_ip
returns 127.0.0.1
when tcp_nodelay is true
#request
returns an Excon::Response
Excon::Response
#body
.status
#returns 200
when utilizing deprecated block usage
#request
yields with a chunk, remaining length, and total length
completes with expected data
when utilizing response_block usage
#request
yields a chunk, remaining length, and total_length
completes with expected data
when method is :post
when :path is /body-sink
when a body parameter is supplied
returns an Excon::Response
Excon::Response
#body
equals "5000000"
when the body parameter is an empty string
returns an Excon::Response
Excon::Response
#body
equals "0"
when :path is /echo
when a file handle is the body paramter
Excon::Response
#body equals "x" * 100 + "\n"
when a string is the body paramter
does not change the enconding of the body
without request_block
Excon::Response
#body equals 'x' * 100)
when a request_block paramter is supplied
Excon::Response
#body equals'x' * 100
when a multi-byte string is the body paramter
Excon::Response
#body properly concatenates request+headers and body
when nonblock is true and persistent is true
when :method is get and :path is /content-length/100
#request
returns an Excon::Response
Excon::Response
#status
returns 200
#status returns 200
#headers
["Content-Length"] returns 100
["Content-Type"] returns "text/html;charset=utf-8"
['Date'] returns a valid date
['Server'] matches /^WEBrick/
['Custom'] returns Foo: bar
#remote_ip
returns 127.0.0.1
when tcp_nodelay is true
#request
returns an Excon::Response
Excon::Response
#body
.status
#returns 200
when utilizing deprecated block usage
#request
yields with a chunk, remaining length, and total length
completes with expected data
when utilizing response_block usage
#request
yields a chunk, remaining length, and total_length
completes with expected data
when method is :post
when :path is /body-sink
when a body parameter is supplied
returns an Excon::Response
Excon::Response
#body
equals "5000000"
when the body parameter is an empty string
returns an Excon::Response
Excon::Response
#body
equals "0"
when :path is /echo
when a file handle is the body paramter
Excon::Response
#body equals "x" * 100 + "\n"
when a string is the body paramter
does not change the enconding of the body
without request_block
Excon::Response
#body equals 'x' * 100)
when a request_block paramter is supplied
Excon::Response
#body equals'x' * 100
when a multi-byte string is the body paramter
Excon::Response
#body properly concatenates request+headers and body
when nonblock is false and persistent is true
when :method is get and :path is /content-length/100
#request
returns an Excon::Response
Excon::Response
#status
returns 200
#status returns 200
#headers
["Content-Length"] returns 100
["Content-Type"] returns "text/html;charset=utf-8"
['Date'] returns a valid date
['Server'] matches /^WEBrick/
['Custom'] returns Foo: bar
#remote_ip
returns 127.0.0.1
when tcp_nodelay is true
#request
returns an Excon::Response
Excon::Response
#body
.status
#returns 200
when utilizing deprecated block usage
#request
yields with a chunk, remaining length, and total length
completes with expected data
when utilizing response_block usage
#request
yields a chunk, remaining length, and total_length
completes with expected data
when method is :post
when :path is /body-sink
when a body parameter is supplied
returns an Excon::Response
Excon::Response
#body
equals "5000000"
when the body parameter is an empty string
returns an Excon::Response
Excon::Response
#body
equals "0"
when :path is /echo
when a file handle is the body paramter
Excon::Response
#body equals "x" * 100 + "\n"
when a string is the body paramter
does not change the enconding of the body
without request_block
Excon::Response
#body equals 'x' * 100)
when a request_block paramter is supplied
Excon::Response
#body equals'x' * 100
when a multi-byte string is the body paramter
Excon::Response
#body properly concatenates request+headers and body
when nonblock is false and persistent is false
when :method is get and :path is /content-length/100
#request
returns an Excon::Response
Excon::Response
#status
returns 200
#status returns 200
#headers
["Content-Length"] returns 100
["Content-Type"] returns "text/html;charset=utf-8"
['Date'] returns a valid date
['Server'] matches /^WEBrick/
['Custom'] returns Foo: bar
#remote_ip
returns 127.0.0.1
when tcp_nodelay is true
#request
returns an Excon::Response
Excon::Response
#body
.status
#returns 200
when utilizing deprecated block usage
#request
yields with a chunk, remaining length, and total length
completes with expected data
when utilizing response_block usage
#request
yields a chunk, remaining length, and total_length
completes with expected data
when method is :post
when :path is /body-sink
when a body parameter is supplied
returns an Excon::Response
Excon::Response
#body
equals "5000000"
when the body parameter is an empty string
returns an Excon::Response
Excon::Response
#body
equals "0"
when :path is /echo
when a file handle is the body paramter
Excon::Response
#body equals "x" * 100 + "\n"
when a string is the body paramter
does not change the enconding of the body
without request_block
Excon::Response
#body equals 'x' * 100)
when a request_block paramter is supplied
Excon::Response
#body equals'x' * 100
when a multi-byte string is the body paramter
Excon::Response
#body properly concatenates request+headers and body
Excon::Socket
passes the dns_timeouts to Resolv::DNS::Config (FAILED - 1)
when the DNS server is unreachable
returns a Excon::Error::Socket
Excon
when dispatching requests
to a server that does not supply response headers
when no block is given
should rescue from an EOFError and return response
when a block is given
should rescue from EOFError and return response
to a server that prematurely aborts the request with no response
should raise an EOFError
Excon::Socket
resolv_resolver config reaches Resolv::DNS::Config (FAILED - 2)
when the DNS server is unreachable
returns a Excon::Error::Socket
Excon::Connection
blocking connection
when timeout is not set
does not error
when timeout is not triggered
does not error
when timeout is triggered
does not raise
non-blocking connection
when timeout is not set
does not error
when timeout is not triggered
does not error
when timeout is triggered
returns a request Excon::Error::Timeout
when read timeout is triggered
returns a read Excon::Error::Timeout
Excon::Connection
when speaking to a UNIX socket
via Excon.new
accepts the unix:/ URL
Host header handling
sends an empty Host= by default
doesn't overwrite an explicit Host header
Excon::Connection
validating parameters
with default middleware
Connection.new warns on invalid parameter keys
Connection#request warns on invalid parameter keys
with custom middleware at instantiation
Connection.new accepts parameters that are valid for the provided middleware
Connection.new warns on parameters that are not valid for the provided middleware
Connection#request accepts parameters that are valid for the provided middleware
Connection#request warns on parameters that are not valid for the provided middleware
with custom middleware at request time
Connection#request accepts parameters that are valid for the provided middleware
Connection#request warns on parameters that are not valid for the request middleware
Connection#request warns on parameters from instantiation that are not valid for the request middleware
Failures:
1) Excon::Socket passes the dns_timeouts to Resolv::DNS::Config
Failure/Error: fail exception unless @socket
Excon::Error::Socket:
no address for foo.com (Resolv::ResolvError)
# ./lib/excon/socket.rb:191:in `connect'
# ./lib/excon/socket.rb:60:in `initialize'
# ./lib/excon/connection.rb:483:in `new'
# ./lib/excon/connection.rb:483:in `socket'
# ./lib/excon/connection.rb:120:in `request_call'
# ./lib/excon/middlewares/mock.rb:57:in `request_call'
# ./lib/excon/middlewares/instrumentor.rb:34:in `request_call'
# ./lib/excon/middlewares/idempotent.rb:19:in `request_call'
# ./lib/excon/middlewares/base.rb:22:in `request_call'
# ./lib/excon/middlewares/base.rb:22:in `request_call'
# ./lib/excon/connection.rb:293:in `request'
# ./spec/requests/dns_timeout_spec.rb:12:in `block (3 levels) in <top (required)>'
# ./spec/helpers/warning_helpers.rb:5:in `silence_warnings'
# ./spec/requests/dns_timeout_spec.rb:11:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Resolv::ResolvError:
# no address for foo.com
# ./lib/excon/socket.rb:191:in `connect'
2) Excon::Socket resolv_resolver config reaches Resolv::DNS::Config
Failure/Error: fail exception unless @socket
Excon::Error::Socket:
no address for foo.com (Resolv::ResolvError)
# ./lib/excon/socket.rb:191:in `connect'
# ./lib/excon/socket.rb:60:in `initialize'
# ./lib/excon/connection.rb:483:in `new'
# ./lib/excon/connection.rb:483:in `socket'
# ./lib/excon/connection.rb:120:in `request_call'
# ./lib/excon/middlewares/mock.rb:57:in `request_call'
# ./lib/excon/middlewares/instrumentor.rb:34:in `request_call'
# ./lib/excon/middlewares/idempotent.rb:19:in `request_call'
# ./lib/excon/middlewares/base.rb:22:in `request_call'
# ./lib/excon/middlewares/base.rb:22:in `request_call'
# ./lib/excon/connection.rb:293:in `request'
# ./spec/requests/resolv_resolver_spec.rb:15:in `block (2 levels) in <top (required)>'
# ------------------
# --- Caused by: ---
# Resolv::ResolvError:
# no address for foo.com
# ./lib/excon/socket.rb:191:in `connect'
Finished in 3.48 seconds (files took 0.16396 seconds to load)
155 examples, 2 failures
Failed examples:
rspec ./spec/requests/dns_timeout_spec.rb:10 # Excon::Socket passes the dns_timeouts to Resolv::DNS::Config
rspec ./spec/requests/resolv_resolver_spec.rb:14 # Excon::Socket resolv_resolver config reaches Resolv::DNS::Config
/usr/bin/ruby3.1 -I/usr/share/rubygems-integration/all/gems/rspec-support-3.13.1/lib:/usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/lib /usr/share/rubygems-integration/all/gems/rspec-core-3.13.0/exe/rspec --pattern spec/\*\*/\*_spec.rb -c -f doc -r ./spec/spec_helper.rb failed
ERROR: Test "ruby3.1" failed. Exiting.
dh_auto_install: error: dh_ruby --install /<<PKGBUILDDIR>>/debian/ruby-excon returned exit code 1
make: *** [debian/rules:8: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------
The above is just how the build ends and not necessarily the most relevant part.
If required, the full build log is available here:
https://people.debian.org/~sanvila/build-logs/202410/
About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.
The unshare backend of sbuild was used for the build. A failure usually
indicates the package is trying to access Internet.
If you could not reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.
If this is really a bug in one of the build-depends, please use
reassign and affects, so that this is still visible in the BTS web
page for this package.
Thanks.
More information about the Pkg-ruby-extras-maintainers
mailing list