You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue can be reproduced in a Docker container running Ubuntu 22.04 (e.g., docker run -it --rm ubuntu:22.04). Run the following script (or copy/paste each step):
set -ex
apt update
apt install -y curl git time proftpd gcc cmake make nano proftpd proftpd-mod-vroot
# Build provenance-to-use
git clone --recursive https://github.com/depaul-dice/provenance-to-use.git
cd provenance-to-use
# This patch is needed to compile provenance-to-use!
curl https://patch-diff.githubusercontent.com/raw/depaul-dice/provenance-to-use/pull/4.patch | patch --strip=1
./run.sh -r
export PATH=$PWD:$PATH
cd ..
# Set up Profptd srv directory
mkdir --parents proftpd/srv
echo Hello World > proftpd/srv/test
# Write Proftpd config file
USER=$(id --user --name)
GROUP=$(id --group --name)
echo $USER $GROUP
cat <<EOF > proftpd/conf
DefaultAddress 0.0.0.0
Port 54123
User $USER
Group $GROUP
DelayTable "$PWD/proftpd/delay"
ScoreboardFile "$PWD/proftpd/scoreboard"
PidFile "$PWD/proftpd/proftpd.pid"
TransferLog "$PWD/proftpd/xferlog"
DefaultRoot "$PWD/proftpd/srv"
LoadFile "/lib/proftpd/mod_vroot.so"
LoadModule mod_vroot.c
VRootEngine on
WtmpLog off
RequireValidShell off
<Anonymous $PWD/proftpd/srv/>
User $USER
Group $GROUP
UserAlias anonymous $USER
<Directory *>
AllowAll
</Directory>
</Anonymous>
EOF
Make sure the script completes successfully. Then we will test the behavior of a script with and without PTU. The script is
The script starts ProFTPD in the background, records its PID, waits for 5 seconds, kills ProFTPD, and waits for it to finish shutting down In a realistic setting, sleep 5 would be replaced with some FTP client activity (e.g., a load test). This script should take a little more than five seconds of "real" time, which should be shown on the third field of the last line. Indeed it is when we run natively (no PTU):
The nix shell <pkgs>... --command <cmd>... simply runs <cmd>... in a reproducible environment containing <pkgs>....
However if we do the same script with ptu, the script does not wait 5 seconds. The whole script completes in a fraction of a second. This means that the client load, represented by sleep 5 would not get a chance to connect to the FTP server.
Note that the prompt returns to the user as soon as the output of time is finished (line beginning with 0inputs), at which point, I pressed <enter> to get new blank prompts. It seems that the tracee process (sh -c '...') continues to execute, since we see its output but perhaps gets orphaned by the ptu process, which already terminated.
The text was updated successfully, but these errors were encountered:
charmoniumQ
changed the title
PTU causes program process to exit prematurely
PTU causes process to exit prematurely
Jul 4, 2024
This issue can be reproduced in a Docker container running Ubuntu 22.04 (e.g.,
docker run -it --rm ubuntu:22.04
). Run the following script (or copy/paste each step):Make sure the script completes successfully. Then we will test the behavior of a script with and without PTU. The script is
The script starts ProFTPD in the background, records its PID, waits for 5 seconds, kills ProFTPD, and waits for it to finish shutting down In a realistic setting,
sleep 5
would be replaced with some FTP client activity (e.g., a load test). This script should take a little more than five seconds of "real" time, which should be shown on the third field of the last line. Indeed it is when we run natively (no PTU):The
nix shell <pkgs>... --command <cmd>...
simply runs<cmd>...
in a reproducible environment containing<pkgs>...
.However if we do the same script with
ptu
, the script does not wait 5 seconds. The whole script completes in a fraction of a second. This means that the client load, represented bysleep 5
would not get a chance to connect to the FTP server.Note that the prompt returns to the user as soon as the output of time is finished (line beginning with
0inputs
), at which point, I pressed<enter>
to get new blank prompts. It seems that the tracee process (sh -c '...'
) continues to execute, since we see its output but perhaps gets orphaned by the ptu process, which already terminated.The text was updated successfully, but these errors were encountered: