Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421933 - dev-python/twisted-11.1.0 fails tests
Summary: dev-python/twisted-11.1.0 fails tests
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-19 09:51 UTC by Nikoli
Modified: 2016-02-10 09:50 UTC (History)
1 user (show)

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


Attachments
build.log (twisted-11.1.0_build.log,558.47 KB, text/plain)
2012-06-19 09:51 UTC, Nikoli
Details
build.log (12.0.0) (twisted-12.0.0_build.log,575.76 KB, text/plain)
2012-06-19 10:06 UTC, Nikoli
Details
log (twisted.test.test_tcp.WriteDataTestCase.test_writeAfterShutdownWithoutReading.log,751.72 KB, text/plain)
2012-06-20 15:39 UTC, Nikoli
Details
tail -n 2000 of trial --spew (trial_shortened.log,143.48 KB, text/plain)
2013-02-28 17:36 UTC, Sean Santos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nikoli 2012-06-19 09:51:02 UTC
Created attachment 315743 [details]
build.log

Portage 2.1.10.49 (hardened/linux/amd64, gcc-4.5.3, glibc-2.14.1-r3, 3.4.2-hardened x86_64)
=================================================================
                        System Settings
=================================================================
Timestamp of tree: Tue, 19 Jun 2012 06:45:01 +0000
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.3-r2
dev-util/cmake:           2.8.7-r5
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r2
sys-devel/gcc-config:     1.6
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo nikoli
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -mtune=generic -mavx -maes -mpclmul -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=core2 -mtune=generic -mavx -maes -mpclmul -O2 -pipe"
DISTDIR="/var/package-manager/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="ru en"
MAKEOPTS="-j9"
PKGDIR="/var/package-manager/packages/corei7-avx_hardened"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTDIR="/var/package-manager/portage"
PORTDIR_OVERLAY="/var/lib/layman/nikoli"
USE="X a52 aac acl acpi aes-ni akonadi alsa amd64 amr atm audiofile avx bash-completion bluetooth bzip2 cairo caps cdda cddb cdio cdparanoia cdr celt cli consolekit cracklib crypt css cups cxx dbus djvu dri dts dv dvd dvdr encode exif fat ffmpeg flac fluidsynth fontconfig fortran gd geoip gif gimp gmp gnutls gphoto2 gpm graphviz gsm gstreamer gtk handbook hardened iconv icu id3tag idn ilbc imagemagick imap imlib ios ipod ipv6 jbig jpeg jpeg2k justify kde kipi kontact lame laptop lcms libass libnotify libproxy libsamplerate lm_sensors lzma lzo mac mad matroska mikmod mmx mmxext mng modplug modules mp3 mp4 mpeg mtp mudflap multilib musepack musicbrainz ncurses networkmanager nls nptl nptlonly ntfs ogg openal openexr opengl openmp pam pango pax_kernel pcre pdf pg-intdatetime phonon plasma pm-utils png policykit postscript pppd qt3support qt4 quicktime rar raw readline reiserfs replaygain rtmp sasl scanner schroedinger semantic-desktop session sid smp sndfile socks5 speex spell sqlite sse sse2 sse3 sse4_1 ssl ssse3 startup-notification svg symlink sysfs taglib theora threads thumbnail tiff truetype tta udev unicode upnp usb v4l v4l2 vaapi vcd vdpau vorbis vpx wavpack webkit webp wifi wma wmf wps x264 xattr xcb xcomposite xface xinerama xml xmp xorg xpm xscreensaver xv xvid xz zip 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="*" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="ru en" NGINX_MODULES_HTTP="access auth_basic autoindex fastcgi gzip rewrite" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="radeon r600 vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

dev-python/twisted-11.1.0 was built with the following:
USE="crypt (multilib) -gtk -serial"
Comment 1 Nikoli 2012-06-19 10:06:29 UTC
Created attachment 315745 [details]
build.log (12.0.0)

Same problem with 12.0.0
Comment 2 Marien Zwart (RETIRED) gentoo-dev 2012-06-19 11:58:33 UTC
The twisted.test.test_log.FileObserverTestCase.test_timeFormatting is already fixed in later twisteds (and indeed gone in your log for 12.0).

The failure after that is twisted.test.test_tcp.WriteDataTestCase.test_writeAfterShutdownWithoutReading timing out, followed by various other failures that may be fallout of this failure or caused by the same underlying problem. The test opens a listening port on 127.0.0.1, connects to it, has the "server" side close the connection immediately afterwards, has the "client" side repeatedly send bytes to it, and verifies the "client" side notices it got disconnected.

Is there anything odd about your networking (and firewall) setup? For example: if connections to 127.0.0.1 end up tarpitted I could see this test timing out. Make sure you have a loopback interface that is up, and nothing iffy going on with connections to 127.0.0.1. If in doubt please attach anything networking-related that's out of the ordinary.
Comment 3 Nikoli 2012-06-19 12:23:00 UTC
# grep '^net' /etc/sysctl.conf 
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_echo_ignore_all = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1

ipv6 kernel module is not loaded:
# ifconfig lo
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:1582223 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1582223 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1105355700 (1.0 GiB)  TX bytes:1105355700 (1.0 GiB)


firewall was disabled before running emerge:
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Comment 4 Marien Zwart (RETIRED) gentoo-dev 2012-06-20 15:24:22 UTC
I'm at a bit of a loss. I see you're running a hardened kernel: is there anything unusual about networking set up at the kernel config level? Can you install twisted 12.0.0 (ignoring the test failure) and attach or email me the output of "trial --spew twisted.test.test_tcp.WriteDataTestCase.test_writeAfterShutdownWithoutReading", after confirming "trial twisted.test.test_tcp.WriteDataTestCase.test_writeAfterShutdownWithoutReading" fails? I'll try to see if I can work out where it fails from that, but it'll probably take me some time.
Comment 5 Nikoli 2012-06-20 15:39:13 UTC
Created attachment 315863 [details]
log

I have CONFIG_GRKERNSEC_BLACKHOLE=y and noexec in /etc/fstab for /tmp, /home and /var
Comment 6 Marien Zwart (RETIRED) gentoo-dev 2012-06-21 20:30:52 UTC
The trial run you provided a --spew log for did not run any tests, most likely because you ran it from a directory you do not have write permission for. Please try without --spew first, check it runs the test and it fails, and then re-run with --spew to get a log file.

CONFIG_GRKERNSEC_BLACKHOLE almost but not quite explains this: the test that times out does rely on a RST packet that a feature like this could blackhole, but it runs on the loopback interface and while the socket is still being listened on. So if the description of the feature is accurate it should not affect the test.

One other thing you could do other than trial --spew is to run trial while capturing network traffic over loopback to see if the RST packet the test needs is actually sent. Or if you can sensibly reboot into a non-hardened kernel on the affected system: try that.
Comment 7 Sean Santos 2013-02-28 17:36:31 UTC
Created attachment 340528 [details]
tail -n 2000 of trial --spew

I have the same failed tests (also in a hardened kernel with CONFIG_GRKERNSEC_BLACKHOLE).

I ran trial --spew, but the output to stdout was insane, 1GB. I'm not sure how much of it to send where. I ended up attaching from just before the timeout to the end.
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2016-02-10 09:50:25 UTC
not present in gentoo.git anymore