Bug 956035 - -202 break Ruby's test suite/build - Errno::ENOENT: No such file or directory - getaddrinfo
Summary: -202 break Ruby's test suite/build - Errno::ENOENT: No such file or directory...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: systemd
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: systemd-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-04-24 08:24 UTC by Vít Ondruch
Modified: 2014-01-14 22:22 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-14 22:22:16 UTC
Type: Bug


Attachments (Terms of Use)
systemd-202 vs systemd-201 (5.98 KB, text/x-log)
2013-04-24 11:57 UTC, Vít Ondruch
no flags Details

Description Vít Ondruch 2013-04-24 08:24:12 UTC
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.

Comment 1 Harald Hoyer 2013-04-24 11:02:16 UTC
Why is this systemd's fault????

Comment 2 Harald Hoyer 2013-04-24 11:05:23 UTC
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?

Comment 3 Michal Schmidt 2013-04-24 11:17:42 UTC
What does the Ruby test exactly do with getaddrinfo? Can the testcase be minimized to a short C program? (I don't know Ruby.)

Comment 4 Vít Ondruch 2013-04-24 11:18:54 UTC
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.

Comment 5 Vít Ondruch 2013-04-24 11:21:01 UTC
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.

Comment 6 Michal Schmidt 2013-04-24 11:22:35 UTC
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.

Comment 7 Vít Ondruch 2013-04-24 11:29:47 UTC
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

Comment 8 Bohuslav "Slavek" Kabrda 2013-04-24 11:38:14 UTC
(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.

Comment 9 Harald Hoyer 2013-04-24 11:40:10 UTC
I would bluntly say /etc/hostname is empty in the mock build environment, so hostname is not set.

Comment 10 Vít Ondruch 2013-04-24 11:46:56 UTC
(In reply to comment #9)
There is no /etc/hostname at all if it makes any difference

Comment 11 Harald Hoyer 2013-04-24 11:50:14 UTC
(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?

Comment 12 Vít Ondruch 2013-04-24 11:55:35 UTC
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

Comment 13 Vít Ondruch 2013-04-24 11:57:57 UTC
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.

Comment 14 Michal Schmidt 2013-04-24 12:10:23 UTC
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 ...

Comment 15 Harald Hoyer 2013-04-24 12:15:08 UTC
$ 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

Comment 16 Harald Hoyer 2013-04-24 12:16:55 UTC
systemd commit 1e335af70f29d1a1e9c132338aa35b8971934441 ??

Comment 17 Zbigniew Jędrzejewski-Szmek 2013-04-24 12:34:33 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=954012

Comment 18 Harald Hoyer 2013-04-24 13:03:03 UTC
Please test systemd-202-3.fc20

http://koji.fedoraproject.org/koji/buildinfo?buildID=414064

Sorry for the unnecessary unqualified rant!

Comment 19 Vít Ondruch 2013-04-25 08:11:27 UTC
(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

Comment 20 Fedora End Of Life 2013-09-16 16:57:42 UTC
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


Note You need to log in before you can comment on or make changes to this bug.