Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 298680 - dev-lang/python-2.6.4 fails test my_ip_addr = socket.gethostbyname(socket.gethostname())
Summary: dev-lang/python-2.6.4 fails test my_ip_addr = socket.gethostbyname(socket.get...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 308901 336458 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-28 13:45 UTC by Claes
Modified: 2011-11-19 06:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
test_socket.py (test_socket.py,40.87 KB, text/plain)
2009-12-28 13:53 UTC, Claes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Claes 2009-12-28 13:45:26 UTC
Emerging stable python 2.6.4 fails testing with:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/test/test_socket.py", line 474, in testSockName
    my_ip_addr = socket.gethostbyname(socket.gethostname())
gaierror: [Errno -2] Name or service not known


Reproducible: Always

Steps to Reproduce:
emerge =dev-lang/python-2.6.4*




# emerge --info
Portage 2.1.6.13 (default/linux/amd64/10.0/server, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6 x86_64)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-1.12.13
Timestamp of tree: Mon, 28 Dec 2009 07:45:01 +0000
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r1
dev-lang/python:     2.6.4
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O1 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=native -O1 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks fixpackages multilib-strict parallel-fetch protect-owned sandbox sfperms splitdebug strict test unmerge-orphans userfetch"
GENTOO_MIRRORS="http://ftp.df.lth.se/pub/gentoo/ http://ftp.ing.umu.se/linux/gentoo/ http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror/ http://mirror.uni-c.dk/pub/gentoo/ http://ftp.klid.dk/ftp/gentoo/"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/letharion"
SYNC="rsync://94.247.168.189/gentoo-portage"
USE="acl amd64 apache2 bash-completion bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 ldap mmx modules mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session snmp spl sse sse2 ssl symlink sysfs tcpd truetype unicode xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Claes 2009-12-28 13:53:03 UTC
Created attachment 214388 [details]
test_socket.py

The test-file that fails
Comment 2 mehrunes 2010-01-14 12:24:54 UTC
I got similar error when emerging python-2.6.4, same message, but test name differs
(In reply to comment #0)
>
>   File
> "/var/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/test/test_socket.py",
> line 474, in testSockName
>     my_ip_addr = socket.gethostbyname(socket.gethostname())
> gaierror: [Errno -2] Name or service not known

my error:
=========================== emerge log start ============================
Ran 33 tests in 10.027s

FAILED (errors=1)
test test_urllib2 failed -- Traceback (most recent call last):
  File "/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/test/test_urllib2.py", line 653, in test_file
    h.file_open, Request(url))
  File "/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/unittest.py", line 336, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/urllib2.py", line 1242, in file_open
    return self.open_local_file(req)
  File "/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/urllib2.py", line 1273, in open_local_file
    (not port and socket.gethostbyname(host) in self.get_names()):
gaierror: [Errno -2] Name or service not known
=========================== emerge log   end ============================

Do i need to publish additional information such as emerge --info?
Comment 3 Claes 2010-01-14 12:34:40 UTC
You probably should. It's better to have it there when a dev takes the time to look at it, so the only reply isn't "post emerge --info"
Comment 4 mehrunes 2010-01-14 15:05:48 UTC
> You probably should. It's better to have it there when a dev takes the time to
> look at it, so the only reply isn't "post emerge --info"
> 
Portage 2.1.6.13 (default/linux/amd64/10.0/developer, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.29-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.29-gentoo-r5-x86_64-Intel-R-_Core-TM-_i7_CPU_965_@_3.20GHz-with-glibc2.2.5
Timestamp of tree: Mon, 11 Jan 2010 00:00:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 2.1.7
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r2
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=core2 -pipe -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -foptimize-sibling-calls -fprefetch-loop-arrays"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O3 -march=core2 -pipe -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -foptimize-sibling-calls -fprefetch-loop-arrays"
DISTDIR="/mnt/server4ibm-gentoo-read_only/distfiles"
FEATURES="collision-protect cvs distlocks fixpackages multilib-strict protect-owned sandbox sfperms sign splitdebug strict test unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en_GB ru"
MAKEOPTS="-j -l3"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="lzma"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp/"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/calculate.overlay /usr/local/portage/general.overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 7zip X a52 aac aalib acl acpi alsa amd64 apache2 apm audiofile avi berkdb bittorrent bzip2 cairo cddb cdparanoia cdr chm clamav cli consolekit cracklib crypt cups cxx dbus djvu dri dts dv dvd dvdr dvdread ebook emboss encode evo exif fam fbcon ffmpeg firefox flac flash foomaticdb fortran ftp fuse gd gdbm ggi gif gphoto2 gpm gtk hal iconv id3tag ieee1394 imagemagick irc jabber jingle jpeg jpeg2k kqemu latex libcaca libnotify libwww lirc logrotate lzo mad matroska mbox mikmod mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musepack mysql nas ncurses nfs nptl nptlonly nsplugin nvidia ogg oggvorbis openal opengl openmp oscar pam pcre pdf perl png portaudio ppds pppd python qt3support qt4 quicktime readline reflection samba scanner sdl session slang smp snmp speex spell spl srt sse sse2 sse3 sse4.1 sse4.2 sse4a sse5 ssl ssse3 startup-notification svg sysfs tcpd tga theora threadsafe thunar tiff truetype unicode usb userlocales v4l v4l2 vcd vhosts vorbis wavpack webkit wma wmf wxwindows x264 xanim xcomposite xine xml xorg xpm xulrunner xv xvid xvmc yahoo zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nv"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Comment 5 Neil Leathers 2010-10-07 14:50:17 UTC
*** Bug 336458 has been marked as a duplicate of this bug. ***
Comment 6 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-10-27 12:02:41 UTC
*** Bug 308901 has been marked as a duplicate of this bug. ***
Comment 7 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-10-27 12:12:15 UTC
Does this still fail for people on 2.6.6? Seems to pass here.
Comment 8 Neil Leathers 2010-10-27 15:59:15 UTC
The failure is due to the host name not being set. Since the host name does not resolve to an address the error message is (correctly) produced which is not expected by the test case.

For a static IP just edit /etc/hosts. If your IP isn't static then fixing this depends on your network configuration. (You can fudge it temporarily by setting it in /etc/hosts.)
Comment 9 Dirkjan Ochtman (RETIRED) gentoo-dev 2010-10-27 16:45:20 UTC
Nice analysis, thanks. In that case, I think we should report this upstream, so they can modify the test to skip instead of fail in this case.
Comment 10 Neil Leathers 2010-10-27 17:25:03 UTC
(In reply to comment #9)
> I think we should report this upstream, so
> they can modify the test to skip instead of fail in this case.

This failure does indicate a problem but not a problem in the package. I'm not sure if it should be skipped and might not request that change upstream. However, it should be documented upstream as a configuration problem and merits at least a documentation request.



Comment 11 Dirkjan Ochtman (RETIRED) gentoo-dev 2011-06-27 09:35:59 UTC
Well, the test case is supposed to test Python; here it fails not because Python fails but because the environment is wrong. It seems to me that Python shouldn't fail the test in this case, but just skip it (and a note will be made of the skipping).
Comment 12 Ian Delaney (RETIRED) gentoo-dev 2011-11-19 06:42:30 UTC
2.6.4 long dropped,