Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calling "ss" command on a linux node fails with glibc symbol error #91

Open
richi235 opened this issue Jan 26, 2019 · 4 comments
Open

Comments

@richi235
Copy link
Contributor

  • ns3 version (cat $NS3FOLDER/VERSION or the commit hash): dev (changeset 13896)
  • DCE version (git log|head -n1): Wed Nov 21 18:32:56 2018 +0900 (add ns3.29 support (__init__.py: look for ns3.29/ns3.28 libraries too #84) )
  • Operating system/version (lsb_release -a): Fedora 26
  • Libc version (ldd -v): glibc-2.25-13.fc26
  • compiler version (gcc -v/g++ -v/clang -v/clang++ -v): gcc version 7.3.1 20180130 (Red Hat 7.3.1-2)

Description of the problem

When compilling and executing thehajime s example of using the ss util in DCE, it fails with the following messages:

'build' finished successfully (56.482s)                           
IP Header size is: 20                                                      
TCP Header size is: 40                                      
TCP ADU size is: 1446                                      
assert failed. cond="handle != 0", msg="Could not open elf-cache/0/libselinux.so.1 elf-cache/0/libselinux.so.1: symbol strverscmp, version GLIBC_2.2.5 not defined in file 0002.so.6 with link time r
eference", file=../model/cooja-loader-factory.cc, line=236      
terminate called without an active exception   

output of ./waf configure

Setting out to                           : /root/dce-dev/source/ns-3-dce/build 
Checking for 'gcc' (C compiler)          : /usr/bin/gcc 
Checking for cc version                  : 7.3.1 
Checking for 'g++' (C++ compiler)        : /usr/bin/g++ 
Checking for program 'pkg-config'        : /usr/bin/pkg-config 
Checking for pkg-config version >= '0.0.0' : yes 
Checking for -Wl,--soname=foo              : yes 
Checking for ns3-core (ns3-dev)            : yes 
Checking for ns3-network (ns3-dev)         : yes 
Checking for ns3-internet (ns3-dev)        : yes 
Checking for ns3-point-to-point (ns3-dev)  : yes 
Checking for ns3-tap-bridge (ns3-dev)      : yes 
Checking for ns3-netanim (ns3-dev)         : yes 
Checking for ns3-wifi (ns3-dev)            : yes 
Checking for ns3-csma (ns3-dev)            : yes 
Checking for ns3-mobility (ns3-dev)        : yes 
Checking for ns3-point-to-point-layout (ns3-dev) : yes 
Checking for ns3-mpi (ns3-dev)                   : yes 
Checking for ns3-lte (ns3-dev)                   : yes 
Error: your ns-3 version number is not found among the supported ns3_versions: ['3-dev', '3.29', '3.28', '3.27', '3.26', '3.25', '3.24', '3.23', '3.22', '3.21', '3.20', '3.19', '3.18', '3.17']
Try updating the ns3_versions variable found in ns3waf/__init__.py
or else point the --with-ns3 configuration target to a supported version
Checking for ns3-visualizer (None)               : not found 
Checking for ns3-applications (ns3-dev)          : yes 
Checking for ns3-fd-net-device (ns3-dev)         : yes 
Checking for header stdint.h                     : yes 
Checking for header inttypes.h                   : yes 
Checking for header sys/inttypes.h               : not found 
Checking for header sys/types.h                  : yes 
Checking for header sys/stat.h                   : yes 
Checking for header dirent.h                     : yes 
Checking for library dl                          : yes 
Checking for glibc get_cpu_features              : yes 
Checking for glibc secure_getenv                 : yes 
Checking for glibc explicit_bzero                : yes 
Checking for header valgrind/valgrind.h          : not found 
Checking for header valgrind/memcheck.h          : not found 
Checking for header sim.h                        : yes 
Checking for ns3-flow-monitor (ns3-dev)          : yes 
elf-loader does not exist
Checking for header hook-manager.h               : yes 
Checking for program 'valgrind'                  : not found 
Checking for program 'doxygen'                   : not found 
Checking for header netinet/sctp.h               : not found 
Checking for program 'python'                    : /usr/bin/python 
Checking for python version                      : (2, 7, 15, 'final', 0) 
python-config                                    : not found 
Checking for library python2.7 in LIBDIR         : not found 
Checking for library python2.7 in python_LIBPL   : not found 
Checking for library python2.7 in $prefix/libs   : not found 
Checking for library python2.7m in LIBDIR        : not found 
Checking for library python2.7m in python_LIBPL  : not found 
Checking for library python2.7m in $prefix/libs  : not found 
Checking for library python27 in LIBDIR          : not found 
Checking for library python27 in python_LIBPL    : not found 
Checking for library python27 in $prefix/libs    : not found 
Checking for header Python.h                     : Distutils not installed? Broken python installation? Get python-config now! 
---- Summary of optional NS-3 features:
Static build                  : not enabled (option --enable-static not selected)
Logging                       : enabled
Assert checks                 : enabled
Code coverage                 : not enabled (option --enable-gcov not selected)
Example programs              : enabled
Test programs                 : enabled
Debug Symbols                 : enabled
ELF magic loader              : not enabled (elf-loader not found)
Aspect-based tracing          : enabled
sctp-tools-dev                : not enabled (sctp-tools (netinet/sctp.h) not found)
Python Bindings               : not enabled (Python library or headers missing)
'configure' finished successfully (2.531s)

Steps to reproduce

 1. Download https://gist.github.com/thehajime/5e9e05ea2df08141ae47 and copy to myscripts/ as ss-example.cc
 2. Execute ./waf --run ss-example
@teto
Copy link
Member

teto commented Jan 26, 2019

see the documentation on how to add symbols. you should add strverscmp manually.

@richi235
Copy link
Contributor Author

richi235 commented Jan 29, 2019

Hi,
thank you for the tip. It was the right direction. But after adding a NATIVE(strverscmp), it turned out ss also needs fts_set().

Since this is a file system related call I'm not sure if it necesarry to do a DCE(fts_set) here and modify its behaviour, and to what new behaviour. Additionally, I managed to fix the bug in my model that I want to diagnose/understand with ss in another way, so getting ss working is no longer that urgent

@akshayLuhach
Copy link

Hi @thehajime @richi235 @teto

Do we need to add symbols for all errors? Is there any other solution such as linking to another glibc version?
I am getting similar error as you:

Error is:
assert failed. cond="handle != 0", msg="Could not open elf-cache/0/libresolv.so.2 elf-cache/0/libresolv.so.2: symbol __h_errno, version GLIBC_PRIVATE not defined in file 0002.so.6 with link time reference", file=../model/cooja-loader-factory.cc, line=236
terminate called without an active exception

My ns3 version is 3.24, Ubuntu version is 16.04 and glibc is 2.23. Is there a compatibility issue of this with dce?


output of ldd --version

ldd (Ubuntu GLIBC 2.23-0ubuntu11.2) 2.23
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.


output of cat /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.7 LTS"

@akshayLuhach
Copy link

@thehajime I am using Ubuntu 16.04 64 bit which uses linux kernel 4.4.0. I am using dce-1.7 which has been tested with upto Ubuntu 15.04 64 bit. Do you know if it is compatible for 16.04 as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants