Description of problem: Ruby's test suite fails with: 7) Error: test_proxy_eh_ENV_no_proxy(TestNetHTTP): Errno::ENOENT: No such file or directory - getaddrinfo /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `getaddress' /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `find_proxy' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1026:in `proxy_uri' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1013:in `proxy?' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:137:in `block in test_proxy_eh_ENV_no_proxy' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:185:in `clean_http_proxy_env' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:133:in `test_proxy_eh_ENV_no_proxy' 8) Error: test_proxy_port_ENV(TestNetHTTP): Errno::ENOENT: No such file or directory - getaddrinfo /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `getaddress' /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `find_proxy' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1026:in `proxy_uri' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1041:in `proxy_port' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:159:in `block in test_proxy_port_ENV' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:185:in `clean_http_proxy_env' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:154:in `test_proxy_port_ENV' 9) Error: test_proxy_address_ENV(TestNetHTTP): Errno::ENOENT: No such file or directory - getaddrinfo /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `getaddress' /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `find_proxy' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1026:in `proxy_uri' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1032:in `proxy_address' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:106:in `block in test_proxy_address_ENV' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:185:in `clean_http_proxy_env' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:101:in `test_proxy_address_ENV' 10) Error: test_proxy_eh_ENV(TestNetHTTP): Errno::ENOENT: No such file or directory - getaddrinfo /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `getaddress' /builddir/build/BUILD/ruby-2.0.0-p0/lib/uri/generic.rb:1652:in `find_proxy' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1026:in `proxy_uri' /builddir/build/BUILD/ruby-2.0.0-p0/lib/net/http.rb:1013:in `proxy?' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:122:in `block in test_proxy_eh_ENV' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:185:in `clean_http_proxy_env' /builddir/build/BUILD/ruby-2.0.0-p0/test/net/http/test_http.rb:117:in `test_proxy_eh_ENV' Version-Release number of selected component (if applicable): # rpm -q systemd systemd-202-2.fc20.x86_64 How reproducible: Steps to Reproduce: 1. Build Ruby with systemd -201 2. Update to systemd -202 3. Actual results: getaddrinfo test failure Expected results: No failure Additional info: http://lists.fedoraproject.org/pipermail/devel/2013-April/181752.html Please note that Python fails with similar errors, I've heard rumors about Perl as well.
Why is this systemd's fault????
Can you please revert your negative karma on https://admin.fedoraproject.org/updates/FEDORA-2013-6070/systemd-202-2.fc19 unless you can clearly show this is a systemd bug?
What does the Ruby test exactly do with getaddrinfo? Can the testcase be minimized to a short C program? (I don't know Ruby.)
Well, I can reproduce it locally in mock ... build with systemd 201 works while build with 202 does not, for both, F19 and F20. I won't revert the karma as long as there is not identified root cause. Sorry.
This is the source code of offending tests: https://github.com/ruby/ruby/blob/trunk/test/net/http/test_http.rb Please note that it is not just Ruby, but Python as well.
Well, I do know a bit of Python, so if you can point me to a short python script demonstrating the bug, that would be nice.
Well, actually I should point you to the correct tag: https://github.com/ruby/ruby/blob/v2_0_0_0/test/net/http/test_http.rb This is the line where it fails: https://github.com/ruby/ruby/blob/v2_0_0_0/lib/uri/generic.rb#L1652 And this is the C implementation: https://github.com/ruby/ruby/blob/v2_0_0_0/ext/socket/ipsocket.c#L279
(In reply to comment #6) > Well, I do know a bit of Python, so if you can point me to a short python > script demonstrating the bug, that would be nice. It should be as simple as: >>> import socket >>> socket.gethostbyname(socket.gethostname()) it seems to fail in both Python 2 and 3.
I would bluntly say /etc/hostname is empty in the mock build environment, so hostname is not set.
(In reply to comment #9) There is no /etc/hostname at all if it makes any difference
(In reply to comment #10) > (In reply to comment #9) > There is no /etc/hostname at all if it makes any difference Well, then it's no wonder this fails. And because of this you are holding up an important fix for s390 RHEL-7 testing?
For the record, it is enough to have Ruby and rubygem-minitest installed and run the "ruby test_http.rb" https://github.com/ruby/ruby/blob/v2_0_0_0/test/net/http/test_http.rb
Created attachment 739422 [details] systemd-202 vs systemd-201 Here is the debug session. Nothing except systemd was changed. And now, please try to focus on triaging the problem. I cannot build Ruby at least since Monday if we are speaking about holding some updates or whatever. Thank you.
Maybe something changed in nss-myhostname. I've setup a Rawhide mock environment and am looking into differences when running "getent hosts $HOSTNAME" with systemd-201 vs. -202 ...
$ mock -r fedora-rawhide-x86_64 --install hostname $ mock -r fedora-rawhide-x86_64 shell <mock-chroot>[root@lenovo /]# rpm -q systemd systemd-202-2.fc20.x86_64 <mock-chroot>[root@lenovo /]# python Python 2.7.4 (default, Apr 11 2013, 12:48:19) [GCC 4.8.0 20130320 (Red Hat 4.8.0-0.18)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> hn = socket.gethostname() >>> print hn lenovo >>> socket.gethostbyname(hn) '192.168.2.20' >>> <mock-chroot>[root@lenovo /]# hostname lenovo <mock-chroot>[root@lenovo /]# cat /etc/hostname cat: /etc/hostname: No such file or directory
systemd commit 1e335af70f29d1a1e9c132338aa35b8971934441 ??
https://bugzilla.redhat.com/show_bug.cgi?id=954012
Please test systemd-202-3.fc20 http://koji.fedoraproject.org/koji/buildinfo?buildID=414064 Sorry for the unnecessary unqualified rant!
(In reply to comment #18) > Sorry for the unnecessary unqualified rant! NP, The F20 build passes: http://koji.fedoraproject.org/koji/taskinfo?taskID=5300424 The F19 works as well: $ mock -r fedora-19-x86_64 --install http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-202-3.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-libs-202-3.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-sysv-202-3.fc19.x86_64.rpm INFO: mock.py version 1.1.30 starting... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run Mock Version: 1.1.30 INFO: Mock Version: 1.1.30 Start: lock buildroot INFO: installing package(s): http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-202-3.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-libs-202-3.fc19.x86_64.rpm http://kojipkgs.fedoraproject.org//packages/systemd/202/3.fc19/x86_64/systemd-sysv-202-3.fc19.x86_64.rpm Start: Outputting list of available packages Finish: Outputting list of available packages INFO: ================================================================================ Package Arch Verze Repozitář Vel. ================================================================================ Aktualizace: systemd x86_64 202-3.fc19 /systemd-202-3.fc19.x86_64 10 M systemd-libs x86_64 202-3.fc19 /systemd-libs-202-3.fc19.x86_64 325 k systemd-sysv x86_64 202-3.fc19 /systemd-sysv-202-3.fc19.x86_64 3.9 k Shrnutí transakce ================================================================================ Upgrade 3 Packages Celková velikost: 11 M Aktualizováno: systemd.x86_64 0:202-3.fc19 systemd-libs.x86_64 0:202-3.fc19 systemd-sysv.x86_64 0:202-3.fc19 Finish: lock buildroot Finish: run [vondruch@unused-4-228 ruby (master *%)]$ mock -r fedora-19-x86_64 shell INFO: mock.py version 1.1.30 starting... Start: init plugins INFO: selinux enabled Finish: init plugins Start: run Start: lock buildroot Start: device setup Finish: device setup Start: shell <mock-chroot>[root@unused-4-228 /]# cd builddir/build/BUILD/ruby-2.0.0-p0/ <mock-chroot>[root@unused-4-228 ruby-2.0.0-p0]# make test-all TESTS=test/net/http/test_http.rb CC = gcc LD = ld LDSHARED = gcc -shared CFLAGS = -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -mtune=generic -fPIC -m64 XCFLAGS = -include ruby/config.h -include ruby/missing.h -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -I. -I.ext/include/x86_64-linux -I./include -I. DLDFLAGS = -Wl,-soname,libruby.so.2.0 -fstack-protector -m64 SOLIBS = -lpthread -lrt -ldl -lcrypt -lm ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" test/net/http/test_http.rb Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" # Running tests: Finished tests in 14.035022s, 3.6338 tests/s, 20.7338 assertions/s. 51 tests, 291 assertions, 0 failures, 0 errors, 0 skips ruby -v: ruby 2.0.0p0 (2013-02-24) [x86_64-linux] <mock-chroot>[root@unused-4-228 ruby-2.0.0-p0]# rpm -q systemd systemd-202-3.fc19.x86_64
This bug appears to have been reported against 'rawhide' during the Fedora 20 development cycle. Changing version to '20'. More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora20