SNIA / reanimator-lttng

The orchestrator for Re-Animator LTTng, an LTTng fork designed for process re-animation
4 stars 0 forks source link

lttng-client Example Hangs #10

Open mmcthrow opened 3 years ago

mmcthrow commented 3 years ago

Hello. I just installed reanimator-lttng on a fresh CentOS 8.3.11 installation with the kernel patch for kernel version 4.19.51+ installed. This CentOS installation is running inside of a x86-64 VirtualBox VM for testing purposes; I plan to use Re-Animator on a bare metal installation at a later date for my experiments.

When I tried running the ./lttng-client -s /tmp/session-capture/ -d /tmp/ls-example.ds -e /bin/ls example, it just hangs without doing anything. I'm wondering if there is anything that I overlooked when setting up Re-Animator.

Update: I tried a Ubuntu 18.04.5 VM and I'm still encountering the same problem.

lvkv commented 3 years ago

Have you disabled sudo prompts? If not, that might be a quick fix.

mmcthrow commented 3 years ago

I'm still running into problems after disabling the sudo prompts. This is the message I received when I ran the above command on my Ubuntu 18.04.5 VM:

Error: Kernel create session failed
Error: Channel channel0: Kernel create session failed (session strace2ds-session)
Error: Events: Kernel create session failed (channel channel0, session strace2ds-session)
Error: Event mm_filemap_add_to_page_cache: Kernel create session failed (channel channel0, session strace2ds-session)
Error: Event mm_filemap_fsl_read: Kernel create session failed (channel channel0, session strace2ds-session)
Error: Event fsl_writeback_dirty_page: Kernel create session failed (channel channel0, session strace2ds-session)
Error: tid: Kernel create session failed
Error: pid: Kernel create session failed
Error: No channel found in the session
CMakeCache.txt       lttng-client.log          reanimator-lttng-tools
CMakeFiles       lttng-read-buffer         reanimator-lttng-ust
Makefile         oneTBB            reanimator-replayer
Tests            reanimator-babeltrace     reanimator-userspace-rcu
cmake_install.cmake  reanimator-library        report.txt
lttng-client         reanimator-lttng-modules
Error: Kernel create session failed
Warning: Tracing already stopped for session strace2ds-session
05-15 00:19:53.184  3945  3945 E PLUGIN-CTF-FS-SRC create_ctf_fs_traces@fs.c:1191 No CTF traces recursively found in `/tmp/session-capture/kernel`.
05-15 00:19:53.184  3945  3945 W GRAPH bt_graph_add_component_with_init_method_data@graph.c:1064 Initialization method failed.
05-15 00:19:53.184  3945  3945 E CLI cmd_run_ctx_create_components_from_config_components@babeltrace.c:2411 Cannot create component: plugin-name="ctf", comp-cls-name="fs", comp-cls-type=0, comp-name="source-ctf-fs"
Cannot create component `source-ctf-fs`
05-15 00:19:53.184  3945  3945 E CLI cmd_run@babeltrace.c:2599 Cannot create components.
Cannot create components
>>>>>>>>>>>    babeltrace timing                       :    336  
>>>>>>>>>>>    tracing total timing                    :    500  
>>>>>>>>>>>    tracing just for execution period timing:    0    
iumitakgun commented 3 years ago

The running kernel does not contain Re-Animator kernel patches. That is why we are getting these errors. Did you follow "Installing Re-Animator Linux Kernel Modifications" instructions?

mmcthrow commented 3 years ago

My mistake; I forgot to boot into the new kernel :).

After carefully reviewing the instructions and running the example in the correct, patched kernel with the lttng* modules running, this is the output that I get now:

michael@michael-VirtualBox:~/reanimator-lttng/build$ ./lttng-client -s /tmp/session-capture -d /tmp/ls-example.ds -e /bin/ls
CMakeCache.txt       lttng-client.log          reanimator-lttng-tools
CMakeFiles       lttng-read-buffer         reanimator-lttng-ust
Makefile         oneTBB            reanimator-replayer
Tests            reanimator-babeltrace     reanimator-userspace-rcu
cmake_install.cmake  reanimator-library        report.txt
lttng-client         reanimator-lttng-modules
FStat: Struct stat buffer is set as NULL!!
Segmentation fault (core dumped)
>>>>>>>>>>>    babeltrace timing                       :    990  
>>>>>>>>>>>    tracing total timing                    :    2684 
>>>>>>>>>>>    tracing just for execution period timing:    7    

This is the output for attempting to replay the trace:

michael@michael-VirtualBox:~/reanimator-lttng/build$ reanimator-replayer/build/system-call-replayer /tmp/ls-example.ds

**** Assertion failure in file /home/michael/reanimator-lttng/build/reanimator-library/build/repositories/DataSeries/src/base/DataSeriesSink.cpp, line 308
**** Failed expression: tail[i] == 0xFF
**** Details: bad header for the tail of /tmp/ls-example.ds!
Aborted (core dumped)

I am wondering how I can fix the Fstat: Struct stat buffer is set as NULL!! problem?