Commit baa882ec authored by Jim Newsome's avatar Jim Newsome
Browse files

Enable lttng tracing (doesn't work)

Builds tor with lttng tracing, and enables it at run time.  The goal was
to have the simulated tor processes talk to the real lttng daemon on the
host machine, but it doesn't look like it's going to work.

lttng clients try to pass a file descriptor to the daemon over a named
unix socket. I don't think shadow implements passing file descriptors
over sockets at all, and definitely not from a simulated process to a
native process.
parent e0d667d0
......@@ -76,13 +76,15 @@ RUN apt-get update && apt-get install -y \
libssl-dev \
make \
zlib1g-dev
# For tracing
RUN apt-get install -y liblttng-ust-dev
WORKDIR /root/src
ARG tor_repo=https://gitlab.torproject.org/tpo/core/tor.git
ARG tor_branch=main
RUN git clone --depth=1 -b $tor_branch $tor_repo
WORKDIR /root/src/tor
RUN sh autogen.sh
RUN ./configure --prefix=/opt/tor --disable-asciidoc --disable-dependency-tracking --enable-tracing
RUN ./configure --prefix=/opt/tor --disable-asciidoc --disable-dependency-tracking --enable-tracing-instrumentation-lttng
RUN make -j`nproc`
RUN make install
......@@ -143,6 +145,8 @@ RUN apt-get update && apt-get install -y \
libevent-dev \
libssl-dev \
zlib1g-dev
# For tracing
RUN apt-get install -y liblttng-ust-dev
ARG network_scale=0.01
RUN tornettools generate \
relayinfo_staging_*.json \
......@@ -159,6 +163,8 @@ RUN apt-get update && apt-get install -y \
libevent-dev \
libssl-dev \
zlib1g-dev
# tracing deps
RUN apt-get install -y liblttng-ust-ctl4 lttng-tools liblttng-ust-dev liblttng-ust0
# shadow runtime deps
RUN apt-get update && apt-get install -y \
libglib2.0-0 \
......@@ -171,6 +177,7 @@ COPY --from=build-shadow /opt/shadow /opt/shadow/
COPY --from=build-tgen /opt/tgen /root/.shadow/
COPY --from=build-tor /opt/tor /root/.shadow/
COPY --from=build-oniontrace /opt/oniontrace /root/.shadow/
RUN service lttng-sessiond start
# Don't actually run the simulation
CMD tornettools simulate -s /opt/shadow/bin/shadow tornet
CMD service lttng-sessiond start && tornettools simulate -s /opt/shadow/bin/shadow tornet
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment