Skip to content

Debugging VeloxMR

Vicente Adolfo Bolea Sanchez edited this page Apr 25, 2017 · 2 revisions

Logic errors and overview

By default VeloxMR does not output any message to the standard output or error. This is because VeloxMR is executed in a distributed environment and we can not assure whether that output can be captured.

However, for debugging not having access to the standrad output is a serious problem. For that reason one of the ways to debug Velox is to launch all the nodes normally but one of them manually. Thankfully the eclipsed script has an option for that called:

 eclipsed attach_at # or eclipsed all_but

Memory problems

Memory problems are really hard to debug, in the case of Velox using tools like valgrind is requires some tweaking due to the fact that BOOST ASIO does not plays well with it.

Before all at the configure state you will have to run it with those preproccesor defines:

sh ../configure ...All your settings... CPPFLAGS="-DBOOST_USE_VALGRIND -DMALLOC_CHECK_=3 -DBOOST_ASIO_ENABLE_HANDLER_TRACKING"

After that you will want to run valgrind in one of the nodes while the other ones are being executed normally

eclipsed all_but "your node"
ssh "your node"
valgrind --leak-check=full --vgdb=yes --vgdb-error=0 eclipse_node

Create another shell

ssh "your node"
gdb eclipse_node
> target remote | vgdb
> continue

Clone this wiki locally