Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491522 - =net-misc/tor-0.2.5.1_alpha-r2 'policies' test hangs in smartlist_ensure_capacity at src/common/container.c:72
Summary: =net-misc/tor-0.2.5.1_alpha-r2 'policies' test hangs in smartlist_ensure_capa...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL: https://trac.torproject.org/projects/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 21:25 UTC by eroen
Modified: 2013-12-03 23:57 UTC (History)
0 users

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


Attachments
build.log (build.log,131.54 KB, text/plain)
2013-11-17 21:25 UTC, eroen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eroen 2013-11-17 21:25:43 UTC
Created attachment 363452 [details]
build.log

net-misc/tor-0.2.5.1_alpha-r2 hangs when running tests.

make -j4 check 
make  check-TESTS
make[1]: Entering directory `/var/tmp/portage/net-misc/tor-0.2.5.1_alpha-r2/work/tor-0.2.5.1-alpha'
onion_handshake: OK
bad_onion_handshake: OK
onion_queues: OK
ntor_handshake: OK
circuit_timeout: OK
policies: @@Hangs here until killed@@/bin/sh: line 5: 106781 Terminated              ${dir}$tst
FAIL: src/test/test
==================
1 of 1 test failed
==================
make[1]: *** [check-TESTS] Error 1




--------------------------------
falcon ~ # pstree -alp $(pidof -x emerge)
emerge,100900 /usr/bin/emerge -v1 tor --ignore-default-opts
  └─sandbox,106748 /usr/lib64/portage/bin/ebuild.sh test
      └─ebuild.sh,106750 /usr/lib64/portage/bin/ebuild.sh test
          └─ebuild.sh,106767 /usr/lib64/portage/bin/ebuild.sh test
              └─emake,106772 /usr/lib64/portage/bin/ebuild-helpers/emake check                                       
                  └─make,106774 -j4 check                                                                            
                      └─make,106779 check-TESTS                                                                      
                          └─sh,106780 -c failed=0; all=0; xfail=0; xpass=0; skip=0; \\\012srcdir=.; export srcdir; \\\012list=' src/test/test '; \\\012red=; grn=; lgn=; blu=; std=; \\\012if test -n "$list"; then \\\012  for tst in $list; do \\\012    if test -f ./$tst; then dir=./; \\\012    elif test -f $tst; then dir=; \\\012    else dir="./"; fi; \\\012    if  ${dir}$tst; then \\\012      all=`expr $all + 1`; \\\012      case "  " in \\\012      *[\\ \\\011]$tst[\\ \\\011]*) \\\012\011xpass=`expr $xpass + 1`; \\\012\011failed=`expr $failed + 1`; \\\012\011col=$red; res=XPASS; \\\012      ;; \\\012      *) \\\012\011col=$grn; res=PASS; \\\012      ;; \\\012      esac; \\\012    elif test $? -ne 77; then \\\012      all=`expr $all + 1`; \\\012      case "  " in \\\012      *[\\ \\\011]$tst[\\ \\\011]*) \\\012\011xfail=`expr $xfail + 1`; \\\012\011col=$lgn; res=XFAIL; \\\012      ;; \\\012      *) \\\012\011failed=`expr $failed + 1`; \\\012\011col=$red; res=FAIL; \\\012      ;; \\\012      esac; \\\012    else \\\012      skip=`expr $skip + 1`; \\\012      col=$blu; res=SKIP; \\\012    fi; \\\012    echo "${col}$res${std}: $tst"; \\\012  done; \\\012  if test "$all" -eq 1; then \\\012    tests="test"; \\\012    All=""; \\\012  else \\\012    tests="tests"; \\\012    All="All "; \\\012  fi; \\\012  if test "$failed" -eq 0; then \\\012    if test "$xfail" -eq 0; then \\\012      banner="$All$all $tests passed"; \\\012    else \\\012      if test "$xfail" -eq 1; then failures=failure; else failures=failures; fi; \\\012      banner="$All$all $tests behaved as expected ($xfail expected $failures)"; \\\012    fi; \\\012  else \\\012    if test "$xpass" -eq 0; then \\\012      banner="$failed of $all $tests failed"; \\\012    else \\\012      if test "$xpass" -eq 1; then passes=pass; else passes=passes; fi; \\\012      banner="$failed of $all $tests did not behave as expected ($xpass unexpected $passes)"; \\\012    fi; \\\012  fi; \\\012  dashes="$banner"; \\\012  skipped=""; \\\012  if test "$skip" -ne 0; then \\\012    if test "$skip" -eq 1; then \\\012      skipped="($skip test was not run)"; \\\012    else \\\012      skipped="($skip tests were not run)"; \\\012    fi; \\\012    test `echo "$skipped" | wc -c` -le `echo "$banner" | wc -c` || \\\012      dashes="$skipped"; \\\012  fi; \\\012  report=""; \\\012  if test "$failed" -ne 0 && test -n ""; then \\\012    report="Please report to "; \\\012    test `echo "$report" | wc -c` -le `echo "$banner" | wc -c` || \\\012      dashes="$report"; \\\012  fi; \\\012  dashes=`echo "$dashes" | sed s/./=/g`; \\\012  if test "$failed" -eq 0; then \\\012    col="$grn"; \\\012  else \\\012    col="$red"; \\\012  fi; \\\012  echo "${col}$dashes${std}"; \\\012  echo "${col}$banner${std}"; \\\012  test -z "$skipped" || echo "${col}$skipped${std}"; \\\012  test -z "$report" || echo "${col}$report${std}"; \\\012  echo "${col}$dashes${std}"; \\\012  test "$failed" -eq 0; \\\012else :; fi                                                                          
                              └─test,106781

falcon ~ # strace -f -p 106781                                                                                       
Process 106781 attached                                                                                              
^CProcess 106781 detached # no output

falcon ~ # strace -f -p 106780
Process 106780 attached
wait4(-1, ^CProcess 106780 detached
 <detached ...>

falcon ~ # kill 106781




falcon ~ # emerge --info '=net-misc/tor-0.2.5.1_alpha-r2::gentoo'
Portage 2.2.7 (default/linux/amd64/13.0, gcc-4.8.2, glibc-2.17, 3.10.7-e6-falcon0+ x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.10.7-e6-falcon0+-x86_64-Intel-R-_Core-TM-2_Quad_CPU_@_2.40GHz-with-gentoo-2.2
KiB Mem:     4038272 total,   1234684 free
KiB Swap:    8388604 total,   8373836 free
Timestamp of tree: Sun, 17 Nov 2013 14:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0
dev-lang/python:          2.7.5-r4, 3.2.5-r3, 3.3.2-r2
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12.1-r1
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.6, 1.13.4, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            4.5.4, 4.6.4, 4.7.3-r1, 4.8.2
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: gentoo gamerlay eroen
ACCEPT_KEYWORDS="amd64 ~amd64 ~x86"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /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"
CXXFLAGS="-march=core2 -O2 -pipe"
DISTDIR="/var/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 3 --nospinner --quiet-build --with-bdeps=y --binpkg-respect-use y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="/var/temdist/ /var/distfiles-occam/ http://mirrors.eu.kernel.org/gentoo/ http://mirrors.kernel.org/gentoo/ http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j4"
PKGDIR="/var/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/gamerlay /var/lib/layman/eroen"
SYNC="rsync://mirrors.eu.kernel.org/gentoo-portage/"
USE="X a52 aac aacs accessibility acl adns alsa amd64 ao atm berkdb bluray bs2b bzip2 cairo calendar canberra caps cdda cdio cdparanoia cdr cli corefonts cracklib crypt css cue cups curl cxx dbus dia dirac djvu dmapi dri dts dvd dvdnav dvi ebook eigen exif faac fam fbcondecor ffmpeg fftw fits flac fontconfig fortran fuse g3dvl gcrypt gd gdbm gif gimp git gmp gnutls gold gstreamer hdri highlight iconv icu id3tag idn imagemagick inotify iptc ipv6 jpeg jpeg2k kde kvm lcms lensfun libnotify loop-aes lqr lzma lzo mad man matroska midi mikmod mkv mms mmx mmxext mng mod modplug modules mp3 mp4 mpeg mpeg2 mpeg4 mpeg4pt2 mplayer mtp mudflap multilib musepack ncurses netlink nfs nls nouveau nptl ocr offensive ogg openal opencl openexr opengl opengtl openmp openvg optimization osmesa pam pango pcre pdf png pnm portaudio postscript pulseaudio qalculate qemu qt3support qt4 rar raw rdesktop readline real rtmp samba scanner schroedinger security session smp sndfile socks5 speex spice sse sse2 sse3 ssl ssse3 strong-optimization svg tbb tcpd theora threads tiff timidity tls truetype udev uml unicode usb usbredir v4l v4l2 vdpau virtualbox vnc vorbis wacom wavpack webp wmf x264 xattr xcb xcomposite xetex xfs xft xine xinerama xorg xps xrandr xv xvid xvmc zlib" ABI_X86="32 64" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CURL_SSL="openssl" DRACUT_MODULES="biosdevname caps crypt crypt-gpg dash dmraid lvm mdraid 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 pc qemu" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver presenter-console presenter-minimizer" LINGUAS="en en_US en_GB nb no nb_NO" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" RUBY_TARGETS="ruby20" SANE_BACKENDS="net plustek pnm" USERLAND="GNU" VIDEO_CARDS="nouveau nvidia vesa" XFCE_PLUGINS="menu" 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"
USE_PYTHON="2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

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

net-misc/tor-0.2.5.1_alpha-r2 was built with the following:
USE="ecc nat-pmp threads tor-hardening transparent-proxy upnp -bufferevents (-selinux) -stats -test -web"

falcon ~ # emerge -pqv '=net-misc/tor-0.2.5.1_alpha-r2::gentoo'
[ebuild   R   ] net-misc/tor-0.2.5.1_alpha-r2  USE="ecc nat-pmp threads tor-hardening transparent-proxy upnp -bufferevents (-selinux) -stats {-test} -web"
Comment 1 eroen 2013-11-17 22:51:30 UTC
Tests run and pass if I add -fno-tree-vrp to CFLAGS (CFLAGS="-march=core2 -O2 -pipe -fno-tree-vrp")
Comment 2 eroen 2013-11-17 22:54:59 UTC
gdb backtrace of hanging 'test' process with CFLAGS="-ggdb -O2":

falcon ~ # gdb -p 297312
GNU gdb (Gentoo 7.6.1 p1) 7.6.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>.
Attaching to process 297312
Reading symbols from /var/tmp/portage/net-misc/tor-0.2.5.1_alpha-r2/work/tor-0.2.5.1-alpha/src/test/test...done.

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Reading symbols from /usr/lib64/libsandbox.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libsandbox.so
Reading symbols from /lib64/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/libz.so.1
Reading symbols from /lib64/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libm.so.6
Reading symbols from /usr/lib64/libevent-2.0.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libevent-2.0.so.5
Reading symbols from /usr/lib64/libssl.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libssl.so.1.0.0
Reading symbols from /usr/lib64/libcrypto.so.1.0.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libcrypto.so.1.0.0
Reading symbols from /usr/lib64/libseccomp.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib64/libseccomp.so.2
Reading symbols from /lib64/libpthread.so.0...(no debugging symbols found)...done.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Loaded symbols for /lib64/libpthread.so.0
Reading symbols from /lib64/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib64/libc.so.6
Reading symbols from /lib64/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/libdl.so.2
Reading symbols from /lib64/librt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib64/librt.so.1
Reading symbols from /lib64/ld-linux-x86-64.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
0x000000000064f399 in smartlist_ensure_capacity (sl=sl@entry=0x1ba4750, size=17) at src/common/container.c:72
72          if (PREDICT_UNLIKELY(size > MAX_CAPACITY/2)) {
(gdb) bt
#0  0x000000000064f399 in smartlist_ensure_capacity (sl=sl@entry=0x1ba4750, size=17) at src/common/container.c:72
#1  0x000000000064fb1f in smartlist_add (sl=sl@entry=0x1ba4750, element=0x1ba4f90) at src/common/container.c:88
#2  0x00000000005f113c in policy_expand_unspec (policy=policy@entry=0x7fff78d33b28) at src/or/policies.c:136
#3  0x00000000005f16b3 in parse_addr_policy (cfg=0x0, cfg@entry=0x7fff78d33b70, dest=dest@entry=0x7fff78d33c48, 
    assume_action=assume_action@entry=-1) at src/or/policies.c:193
#4  0x00000000005f17a6 in append_exit_policy_string (policy=policy@entry=0x7fff78d33c48, 
    more=more@entry=0x6eb690 "reject *:25,reject *:119,reject *:135-139,reject *:445,reject *:563,reject *:1214,reject *:4661-4666,reject *:6346-6429,reject *:6699,reject *:6881-6999,accept *:*") at src/or/policies.c:835
#5  0x00000000005f1905 in policies_parse_exit_policy (cfg=cfg@entry=0x0, dest=dest@entry=0x7fff78d33c48, 
    ipv6_exit=ipv6_exit@entry=1, rejectprivate=rejectprivate@entry=1, local_address=local_address@entry=0x0, 
    add_default_policy=add_default_policy@entry=1) at src/or/policies.c:978
#6  0x00000000004120a1 in test_policies () at src/test/test.c:696
#7  0x000000000040f8ae in legacy_test_helper (data=<optimized out>) at src/test/test.c:1568
#8  0x0000000000509fb5 in testcase_run_bare_ (testcase=testcase@entry=0x947648 <test_array+200>)
    at src/ext/tinytest.c:89
#9  0x000000000050a320 in testcase_run_one (group=group@entry=0x947440 <testgroups>, 
    testcase=0x947648 <test_array+200>) at src/ext/tinytest.c:224
#10 0x000000000050a8c7 in tinytest_main (c=c@entry=1, v=v@entry=0x7fff78d33ed8, 
    groups=groups@entry=0x947440 <testgroups>) at src/ext/tinytest.c:347
#11 0x000000000040eb59 in main (c=1, v=0x7fff78d33ed8) at src/test/test.c:1712
(gdb)
Comment 3 Anthony Basile gentoo-dev 2013-12-03 23:57:21 UTC
(gdb) bt
#0  0x000000000064f399 in smartlist_ensure_capacity (sl=sl@entry=0x1ba4750, size=17) 

This is upstream issue

    https://trac.torproject.org/projects/tor/ticket/10259.

Its actually a gcc problem and is fixed in

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59358

Thanks for the report!