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

HPX(bad_component_type) with gcc 4.7.2 and boost 1.51 #575

Closed
ghost opened this issue Oct 15, 2012 · 16 comments
Closed

HPX(bad_component_type) with gcc 4.7.2 and boost 1.51 #575

ghost opened this issue Oct 15, 2012 · 16 comments
Assignees
Milestone

Comments

@ghost
Copy link

ghost commented Oct 15, 2012

i everyone. I'm seeing the following error when running the simple ag_client example. Can anyone pinpoint what this is coming from?

Thanks,
Luke Dalessandro

<ldalessa@frogstar bin>$ ./ag_client --np 8 -t 8

<stack-trace>: 10 frames:
0x7f17fbf35a8e  : ??? + 0x7f17fbf35a8e in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf35ad5  : ??? + 0x7f17fbf35ad5 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf17f79  : hpx::detail::backtrace() + 0x9 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf393d5  : boost::exception_ptr hpx::detail::get_exception<hpx::exception>(hpx::exception const&, std::string const&, std::string const&, long) + 0x45 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf39729  : void hpx::detail::throw_exception<hpx::exception>(hpx::exception const&, std::string const&, std::string const&, long) + 0x19 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf82898  : hpx::naming::gid_type hpx::components::server::runtime_support::create_component1<hpx::lcos::server::barrier, unsigned long>(unsigned long) + 0x3d8 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf7e3c6  : ??? + 0x7f17fbf7e3c6 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbfa9935  : ??? + 0x7f17fbfa9935 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
0x7f17fbf98159  : ??? + 0x7f17fbf98159 in /u/ldalessa/hpx/build/lib/hpx/libhpx.so.0
<env>: 42 entries:
  BOOST_ROOT=/u/ldalessa/opt/local/boost/1.51
  CVS_RSH=ssh
  C_INCLUDE_PATH=/u/ldalessa/opt/local/boost/1.51/include
  EDITOR=emacs
  G_BROKEN_FILENAMES=1
  G_SLICE=debug-blocks
  HISTCONTROL=ignoredups
  HISTSIZE=1000
  HOME=/u/ldalessa
  HOSTNAME=frogstar.osl.iu.edu
  KDEDIRS=/usr
  KDE_IS_PRELINKED=1
  LANG=en_US.UTF-8
  LD_LIBRARY_PATH=/u/ldalessa/opt/local/boost/1.51/lib:/l/python3.2.2/lib:/u/ldalessa/opt/local/gcc/4.7.2/$LIB:/u/ldalessa/opt/local/gcc/infrastructure/lib
  LESSOPEN=|/usr/bin/lesspipe.sh %s
  LOADEDLOCALMODULES=
  LOADEDMODULES=soic.use.own:soic:gcc/4.7.2:python/3.2.2:boost/1.51
  LOGNAME=ldalessa
  LS_COLORS=rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38;5;13:do=38;5;5:bd=48;5;232;38;5;11:cd=48;5;232;38;5;3:or=48;5;232;38;5;9:mi=05;48;5;232;38;5;15:su=48;5;196;38;5;15:sg=48;5;11;38;5;16:ca=48;5;196;38;5;226:tw=48;5;10;38;5;16:ow=48;5;10;38;5;21:st=48;5;21;38;5;15:ex=38;5;34:*.tar=38;5;9:*.tgz=38;5;9:*.arj=38;5;9:*.taz=38;5;9:*.lzh=38;5;9:*.lzma=38;5;9:*.tlz=38;5;9:*.txz=38;5;9:*.zip=38;5;9:*.z=38;5;9:*.Z=38;5;9:*.dz=38;5;9:*.gz=38;5;9:*.lz=38;5;9:*.xz=38;5;9:*.bz2=38;5;9:*.tbz=38;5;9:*.tbz2=38;5;9:*.bz=38;5;9:*.tz=38;5;9:*.deb=38;5;9:*.rpm=38;5;9:*.jar=38;5;9:*.rar=38;5;9:*.ace=38;5;9:*.zoo=38;5;9:*.cpio=38;5;9:*.7z=38;5;9:*.rz=38;5;9:*.jpg=38;5;13:*.jpeg=38;5;13:*.gif=38;5;13:*.bmp=38;5;13:*.pbm=38;5;13:*.pgm=38;5;13:*.ppm=38;5;13:*.tga=38;5;13:*.xbm=38;5;13:*.xpm=38;5;13:*.tif=38;5;13:*.tiff=38;5;13:*.png=38;5;13:*.svg=38;5;13:*.svgz=38;5;13:*.mng=38;5;13:*.pcx=38;5;13:*.mov=38;5;13:*.mpg=38;5;13:*.mpeg=38;5;13:*.m2v=38;5;13:*.mkv=38;5;13:*.ogm=38;5;13:*.mp4=38;5;13:*.m4v=38;5;13:*.mp4v=38;5;13:*.vob=38;5;13:*.qt=38;5;13:*.nuv=38;5;13:*.wmv=38;5;13:*.asf=38;5;13:*.rm=38;5;13:*.rmvb=38;5;13:*.flc=38;5;13:*.avi=38;5;13:*.fli=38;5;13:*.flv=38;5;13:*.gl=38;5;13:*.dl=38;5;13:*.xcf=38;5;13:*.xwd=38;5;13:*.yuv=38;5;13:*.cgm=38;5;13:*.emf=38;5;13:*.axv=38;5;13:*.anx=38;5;13:*.ogv=38;5;13:*.ogx=38;5;13:*.aac=38;5;45:*.au=38;5;45:*.flac=38;5;45:*.mid=38;5;45:*.midi=38;5;45:*.mka=38;5;45:*.mp3=38;5;45:*.mpc=38;5;45:*.ogg=38;5;45:*.ra=38;5;45:*.wav=38;5;45:*.axa=38;5;45:*.oga=38;5;45:*.spx=38;5;45:*.xspf=38;5;45:
  MAIL=/var/spool/mail/ldalessa
  MALLOC_CHECK_=1
  MALLOC_PERTURB_=5
  MODULEPATH=/u/ldalessa/opt/local/share/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles
  MODULESHOME=/usr/share/Modules
  OLDPWD=/u/ldalessa
  PATH=/u/ldalessa/opt/local/bin:/l/python3.2.2/bin:/u/ldalessa/opt/local/gcc/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/cuda/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
  PKG_CONFIG_PATH=/l/python3.2.2/lib/pkgconfig
  PWD=/u/ldalessa/hpx/install/bin
  QTDIR=/usr/lib64/qt-3.3
  QTINC=/usr/lib64/qt-3.3/include
  QTLIB=/usr/lib64/qt-3.3/lib
  SHELL=/bin/bash
  SHLVL=1
  SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
  SSH_CLIENT=129.79.49.202 57774 22
  SSH_CONNECTION=129.79.49.202 57774 129.79.245.241 22
  SSH_TTY=/dev/pts/0
  TERM=xterm-256color
  USER=ldalessa
  _=./ag_client
  _LMFILES_=/etc/modulefiles/soic.use.own:/etc/modulefiles/soic:/u/ldalessa/opt/local/share/modulefiles/gcc/4.7.2:/etc/modulefiles/python/3.2.2:/u/ldalessa/opt/local/share/modulefiles/boost/1.51
  module=() {  eval /usr/bin/modulecmd bash $*
}
<what>: attempt to create component instance of invalid/unknown type: component_barrier[5(3)] (component not found in map): HPX(bad_component_type)
<locality-id>: 0
<hostname>: 127.0.0.1:7910
<process-id>: 469
<function>: runtime_support::create_component
<file>: /u/ldalessa/hpx/hpx/runtime/components/server/preprocessed/runtime_support_5.hpp
<line>: 63
<os-thread>: 7  
<thread-id>: 0000000002499e60
<thread-description>: <unknown>
<version>: V0.9.5-trunk (AGAS: V2.1), Git: 
<boost>: V1.51.0
<build-type>: release
<date>: Oct 15 2012 17:06:58
<platform>: linux
<compiler>: GNU C++ version 4.7.2
<stdlib>: GNU libstdc++ version 20120920

Aborted (core dumped)

@brycelelbach
Copy link
Member

Component loading problem

@brycelelbach
Copy link
Member

Can you add --hpx:debug-hpx-log and --hpx:dump-config please?

What machine are you building on?

@hkaiser
Copy link
Member

hkaiser commented Oct 16, 2012

Could you please provide us with a full log of your configure and build step, and your full command line? The error you're seeing is something which happens if the HPX core library can't be properly loaded for some reason.

@brycelelbach
Copy link
Member

Actually, just tarball your entire build directory, and your entire source directory, and host them somewhere where I can FTP them.

@ghost
Copy link
Author

ghost commented Oct 16, 2012

Thanks guys. Reconfigured and rebuilt and now it seems to be working. Who knows what the issue was... probably something local.

Closing this.

@ghost ghost closed this as completed Oct 16, 2012
@jewillco
Copy link

I get similar issues with GCC 4.7.2 and HPX 0.9.5 on my computer, and I have tried reconfiguring (with fresh build and install directories). I get some variant of "missing component" for many of the examples, including dataflow and ag_client. I did run "make components", and the missing component (at least for ag_client) is distributing_factory. The shared library does exist in my install directory, and the log messages say that the shared library is missing symbols hpx_exported_plugins_list_distributing_factory_commandline_options and hpx_exported_plugins_list_distributing_factory_startup_shutdown and does not say that it was successfully loaded (like the other components were). Do you know what the issue might be? I do not have any visibility options mentioned anywhere in my build tree, and my HPX install directory is in LD_LIBRARY_PATH.

@jewillco
Copy link

Running ag_client after it has been installed does work. Running my own code, built using pkg-config (after removing /usr/lib64 from the RPATH entries in the .pc files), fails with component_barrier[5(3)] missing, as in the error that started this issue.

@sithhell
Copy link
Member

Could you post the output of your code when running with --hpx:debug-hpx-log please?

@ghost ghost assigned hkaiser Feb 10, 2013
@hkaiser
Copy link
Member

hkaiser commented Feb 10, 2013

Jeremiah, please provide us with a full log of configure (cmake) and build (make) for HPX and your application.

@hkaiser hkaiser reopened this Feb 10, 2013
@jewillco
Copy link

@sithhell: The run log is at http://www.osl.iu.edu/~jewillco/hpx-run-log.txt
I don't have a full log of the entire configure, etc. process; would the CMakeCache.txt file be useful?

@sithhell
Copy link
Member

Yes, the cache is something we can work with. Also, steps to reproduce it would be great. Does the procedure and example as in the docs ( http://stellar.cct.lsu.edu/files/hpx_0.9.5/html/hpx/manual/cmake/unix_apps_pkg_config.html ) work for you?

@jewillco
Copy link

Yes, that example works (compiles and runs). Here's a small test that reproduces the problem:

#include <hpx/hpx.hpp>
#include <hpx/hpx_init.hpp>

int hpx_main(int argc, char** argv) {
    hpx::finalize();
    return 0;
}

int main(int argc, char* argv[]) {
    return hpx::init(argc, argv);
}

HPX_REGISTER_COMPONENT_MODULE();

The last line is important to triggering the problem. I am compiling using:

g++ -std=gnu++11 -I/u/jewillco/boost-svn `pkg-config --cflags hpx_application` -DHPX_APPLICATION_NAME=toy toy.cpp `pkg-config --libs hpx_application` -liostreams -ldistributing_factory

where g++ is 4.7.2.

@sithhell
Copy link
Member

The problem is indeed HPX_REGISTER_COMPONENT_MODULE(). It registers the startup and loading functions for a HPX module. Without any further actions it "thinks" it's the main hpx library. For some reason, this overrides everything defined in libhpx.so. In order to fix this, you need add a HPX_COMPONENT_NAME preprocessor constant so that the HPX_REGISTER_COMPONENT_MODULE() can generate the correct component registration code.
For example like this:

g++ -std=gnu++11 -I/u/jewillco/boost-svn `pkg-config --cflags hpx_application` -DHPX_APPLICATION_NAME=toy  -DHPX_COMPONENT_NAME=toy toy.cpp `pkg-config --libs hpx_application` -liostreams -ldistributing_factory

This is also documented at: http://stellar.cct.lsu.edu/files/hpx_0.9.5/html/hpx/manual/cmake/unix_comps_pkg_config.html

Please report if that fixes your problem

@jewillco
Copy link

I ended up just commenting out the HPX_REGISTER_COMPONENT_MODULE call since it did not seem to be necessary, and that prevented the error.

@sithhell
Copy link
Member

Correct. This is only necessary if you need to register components.

hkaiser added a commit that referenced this issue Feb 10, 2013
…se compiler errors if somebody uses HPX_REGISTER_COMPONENT_MODULE() without explicitly defining it (see #575: HPX(bad_component_type) with gcc 4.7.2 and boost 1.51)
@hkaiser
Copy link
Member

hkaiser commented Feb 14, 2013

This has been resolved by defining HPX_REGISTER_COMPONENT_MODULE if the macro HPX_APPLICATION_NAME is defined, which avoid running into this problem in the future.

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

4 participants