Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 631388

Summary: app-metrics/collectd-5.7.2 : FAIL: test_common
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: RESOLVED FIXED    
Severity: major CC: kentnl, wizardedit
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard: was: dev-util/valgrind cannot trace any executables ( function redirection ... cannot be set up )
Package list:
Runtime testing required: ---
Attachments: emerge-info.txt
app-admin:collectd-5.7.2:20170919-041800.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2
logdiff
Passing tests on ~amd64

Description Toralf Förster gentoo-dev 2017-09-19 07:28:29 UTC
make[4]: Entering directory '/var/tmp/portage/app-admin/collectd-5.7.2/work/collectd-5.7.2/src/daemon'
make[5]: Entering directory '/var/tmp/portage/app-admin/collectd-5.7.2/work/collectd-5.7.2/src/daemon'
FAIL: test_common
FAIL: test_meta_data
FAIL: test_utils_avltree
FAIL: test_utils_heap

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 13.0-desktop_20170911-192633

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.4.0 *

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)
  [3]   pypy3 (fallback)
  [4]   pypy (fallback)

java-config:
The following VMs are available for generation-2:
*)	IcedTea JDK 3.5.1 [icedtea-bin-8]
Available Java Virtual Machines:
  [1]   icedtea-bin-8  system-vm

emerge -qpv app-admin/collectd
[ebuild  N    ] app-admin/collectd-5.7.2  USE="filecaps udev -contrib -debug -java -perl (-selinux) -static-libs -xfs" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog -aggregation -amqp -apache -apcups -ascent -battery -bind -ceph -cgroups -chrony -conntrack -contextswitch -cpu -cpufreq -cpusleep -csv -curl -curl_json -curl_xml -dbi -disk -dns -drbd -email -entropy -ethstat -exec -fhcount -filecount -fscache -gmond -gps -hddtemp -hugepages -ipc -ipmi -iptables -ipvs -java -log_logstash -logfile -lua -lvm -madwifi -match_empty_counter -match_hashed -match_regex -match_timediff -match_value -mbmon -md -memcachec -memcached -modbus -mqtt -multimeter -mysql -netlink -network -nfs -nginx -notify_desktop -notify_email -notify_nagios -ntpd -numa -nut -olsrd -onewire -openldap -openvpn -oracle -perl -ping -postgresql -powerdns -processes -protocols -python -redis -routeros -rrdcached -sensors -serial -sigrok -smart -snmp -statsd -table -tail -tail_csv -target_notification -target_replace -target_scale -target_set -tcpconns -teamspeak2 -ted -thermal -threshold -tokyotyrant -turbostat -unixsock -uptime -users -uuid -varnish -virt -vmem -vserver -wireless -write_graphite -write_http -write_kafka -write_log -write_prometheus -write_redis -write_sensu -write_tsdb -xencpu -zfs_arc -zookeeper" PYTHON_SINGLE_TARGET="python3_4 -python2_7 -python3_5 -python3_6" PYTHON_TARGETS="python2_7 python3_4 -python3_5 -python3_6"
Comment 1 Toralf Förster gentoo-dev 2017-09-19 07:28:32 UTC
Created attachment 495362 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-09-19 07:28:36 UTC
Created attachment 495364 [details]
app-admin:collectd-5.7.2:20170919-041800.log
Comment 3 Toralf Förster gentoo-dev 2017-09-19 07:28:39 UTC
Created attachment 495366 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-09-19 07:28:42 UTC
Created attachment 495368 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-09-19 07:28:46 UTC
Created attachment 495370 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-09-19 07:28:49 UTC
Created attachment 495372 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2017-09-19 07:28:52 UTC
Created attachment 495374 [details]
temp.tbz2
Comment 8 Thomas Deutschmann (RETIRED) gentoo-dev 2017-09-24 21:10:14 UTC
I cannot reproduce. Please either attach all test logs or tests/ directory.
Comment 9 Thomas Deutschmann (RETIRED) gentoo-dev 2017-09-25 19:22:54 UTC
Failure is

> FAIL: test_common
> =================
> 
> 
> valgrind:  Fatal error at startup: a function redirection
> valgrind:  which is mandatory for this platform-tool combination
> valgrind:  cannot be set up.  Details of the redirection are:
> valgrind:  
> valgrind:  A must-be-redirected function
> valgrind:  whose name matches the pattern:      strlen
> valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
> valgrind:  was not found whilst processing
> valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
> valgrind:  
> valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
> valgrind:  package on this machine.  (2, longer term): ask the packagers
> valgrind:  for your Linux distribution to please in future ship a non-
> valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
> valgrind:  that exports the above-named function using the standard
> valgrind:  calling conventions for this platform.  The package you need
> valgrind:  to install for fix (1) is called
> valgrind:  
> valgrind:    On Debian, Ubuntu:                 libc6-dbg
> valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
> valgrind:  
> valgrind:  Note that if you are debugging a 32 bit process on a
> valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
> valgrind:  package (e.g. libc6-dbg:i386).
> valgrind:  
> valgrind:  Cannot continue -- exiting now.  Sorry.
> 
> FAIL test_common (exit status: 1)

I cannot reproduce yet. Could this be a platform issue caused by your chroot environment?
Comment 10 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-09-25 21:42:02 UTC
Created attachment 496416 [details, diff]
logdiff

I can replicate this, would have filed a bug hours ago but I had to rebuild perl to be sure.

I have the ability to give you a log from last month that passed, and one that failed today, so their differences might be indicative.

=app-admin/collectd-5.6.2-r4
=app-admin/collectd-5.7.1
=app-admin/collectd-5.7.2

All failed 100%

Ansi-filtered diff attached.
Comment 11 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-09-25 21:56:54 UTC
Also, incidentally, this problem goes away completely without valgrind installed.
Comment 12 Thomas Deutschmann (RETIRED) gentoo-dev 2017-09-25 22:08:48 UTC
Created attachment 496420 [details]
Passing tests on ~amd64

Weird. See my attached build.log from my ~amd64 system. Passing tests. Showing that collectd is picking up valgrind as well...

Is valgrind broken on your system?
Comment 13 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2017-09-26 04:27:29 UTC
I did a clean remove of valgrind, tests pass.

Install valgrind 3.12.0 from scratch, tests fail.

However:

 valgrind /bin/true
==873533== Memcheck, a memory error detector
==873533== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==873533== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info
==873533== Command: /bin/true
==873533==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:
valgrind:  Cannot continue -- exiting now.  Sorry.


Upgrading to latest valgrind 3.13.0 also has the same result:

==883062== Memcheck, a memory error detector
==883062== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==883062== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==883062== Command: /bin/true
==883062==

valgrind:  Fatal error at startup: a function redirection
valgrind:  which is mandatory for this platform-tool combination
valgrind:  cannot be set up.  Details of the redirection are:
valgrind:
valgrind:  A must-be-redirected function
valgrind:  whose name matches the pattern:      strlen
valgrind:  in an object with soname matching:   ld-linux-x86-64.so.2
valgrind:  was not found whilst processing
valgrind:  symbols from the object with soname: ld-linux-x86-64.so.2
valgrind:
valgrind:  Possible fixes: (1, short term): install glibc's debuginfo
valgrind:  package on this machine.  (2, longer term): ask the packagers
valgrind:  for your Linux distribution to please in future ship a non-
valgrind:  stripped ld.so (or whatever the dynamic linker .so is called)
valgrind:  that exports the above-named function using the standard
valgrind:  calling conventions for this platform.  The package you need
valgrind:  to install for fix (1) is called
valgrind:
valgrind:    On Debian, Ubuntu:                 libc6-dbg
valgrind:    On SuSE, openSuSE, Fedora, RHEL:   glibc-debuginfo
valgrind:
valgrind:  Note that if you are debugging a 32 bit process on a
valgrind:  64 bit system, you will need a corresponding 32 bit debuginfo
valgrind:  package (e.g. libc6-dbg:i386).
valgrind:
valgrind:  Cannot continue -- exiting now.  Sorry.

Reassigning to valgrind team as valgrind is clearly broken on an entirely special level.
Comment 14 Guilherme Amadio gentoo-dev 2017-09-26 09:16:17 UTC
The link below may be helpful to fix this bug. It could be a simple case of GCC inlining strlen. I have glibc with debugging and nostrip, and still my valgrind is broken.

https://wwwtech.de/articles/2012/jan/valgrind-again:-strlen-redirection
Comment 15 Guilherme Amadio gentoo-dev 2020-07-28 22:11:45 UTC
This is actually not a bug. See https://wiki.gentoo.org/wiki/Debugging#Valgrind
Comment 16 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-07-28 22:45:48 UTC
That Wiki page doesn't fix the test failures in collectd.

I would possibly suggest collectd should disable this test given user configuration and rebuilding glibc is required for it to pass.
Comment 17 Conrad Kostecki gentoo-dev 2022-06-05 12:55:54 UTC
Since app-metrics/collectd-5.7.2 does not exist anymore in tree, closing here. Please reopen, if problem persists with current version.