Hello,
Currently we use an old Version of DynamoRIO, which we wanted to update to the new 9.0.0 Version.
We run our test with “drrun -t drcov -- ...”. Which currently takes around 30 minutes.
Using the new 9.0.0 version, the same test now need over 2 hours (the timeout of the runner, tests still not completed).
The cause seems to be a change between cronbuild-8.0.18740 (tests take about 30 min) and cronbuild-8.0.18747 (timeout after 2h).
Has someone an idea which of the changes between this two version could be the cause? And if there is a configuration we could change to prevent this massive slowdown?
Thanks
Philippe
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dynamorio-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/0f36f29e1bd14e028bfe860e66144c94%40rohde-schwarz.com.
> What platform is this: x86_64? Is it Linux?
It is a x86 Executable, running in a 64-bit Windows (Docker container).
> If Linux, does the app use signals?
The platform we run the test on is Windows.
> If you run without drcov (i.e., just "drrun -- <your-app>") is the slowdown still there?
Yes, the slowdown is still there without drcov.
> Is this a hang, rather than a slowdown?
I don’t think it is. Currently running the test locally (still running as I write this, but already more than 2h), and there I can see it is getting further (by the occasional output).
Unfortunately attaching the Visual Studio debugger to the running test provides strange behavior.
During the first run there I attached it after quite a while, I did see there the main thread was waiting for a result (and std::future), but did not see any other thread with a useful stack trace, i.e. there the result should have been generated. Was thinking maybe was indeed a crash of the worker thread and killed it.
During the current run, there I attached it very early to set breakpoints, I did not see any usable stack trace for the main thread. Currently I do see again something useful for the main thread (waiting for generated RSA key), but the stack trace view for the worker thread is again broken.
What we do a quite a few times in the tests in generating RSA keys with the Botan library. This already takes a long time in a normal debug build under Windows, without running with drrun. And is I think the main cause why the test take long even without using drrun (around 22 min).
My current impression is that this is slowed down now even more. But currently still unsure if:
1. By how much this RSA key generation really is slowed down by the new drrun version
2. If it is the only thing responsible for the massive slowdown.
> Would it be possible to binary search the commits in between?
I can try doing that, but may take a few days until I find time for it.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/CAO1ikSbtEHs2yueBWm_io32v%2B2yMAXY2g_62z3fX9AC0V3K96A%40mail.gmail.com.
> What platform is this: x86_64? Is it Linux?
It is a x86 Executable, running in a 64-bit Windows (Docker container).
> If Linux, does the app use signals?
The platform we run the test on is Windows.
> If you run without drcov (i.e., just "drrun -- <your-app>") is the slowdown still there?
Yes, the slowdown is still there without drcov.
> Is this a hang, rather than a slowdown?
I don’t think it is. Currently running the test locally (still running as I write this, but already more than 2h), and there I can see it is getting further (by the occasional output).
Unfortunately attaching the Visual Studio debugger to the running test provides strange behavior.
During the first run there I attached it after quite a while, I did see there the main thread was waiting for a result (and std::future), but did not see any other thread with a useful stack trace, i.e. there the result should have been generated. Was thinking maybe was indeed a crash of the worker thread and killed it.
During the current run, there I attached it very early to set breakpoints, I did not see any usable stack trace for the main thread. Currently I do see again something useful for the main thread (waiting for generated RSA key), but the stack trace view for the worker thread is again broken.
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/2c9e947930174d05b91ee9b75b6864f3%40rohde-schwarz.com.
Did a few test runs just generating an RSA key using Botan (version 2.14.0) (code at the bottom):
key length | no drrun | 8.0.18740 | 8.0.18747
---------------------------------------------
1024 | 1.795s | 3.282s | 30.307s
2048 | 7.29s | 5.221s | 7m16s
2048 | 4.297s | 11.939s | 2m36s
4096 | 55.728s | 43.128s | 2h17m
4096 | 19.509s | 23.371s | 28m57s
4096 | 3m15s | 1m38s |
4096 | 27.336s | 38.346s |
Although times are fluctuating a lot, one can still see that there is a big slowdown then using the 8.0.18747 Version.
So seems like the newer DynamoRIO versions have some performance problems with the Botan code.
Is that enough Information for you to take a closer look at that is going wrong? Or should I still try to compile DynamoRIO myself and binary search the commits in between?
Test code:
#include <botan/auto_rng.h>
#include <botan/rsa.h>
Botan::AutoSeeded_RNG rng;
Botan::RSA_PrivateKey key( rng, 1024 );
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/CAO1ikSY7Uvgcw_b98H1ifkvFGhDUSYzZe9uatrYNPcETMYix-Q%40mail.gmail.com.
% cat botan.cpp
#include <botan/rsa.h>#include <botan/auto_rng.h>#include <iostream>
int main(){
Botan::AutoSeeded_RNG rng;
Botan::RSA_PrivateKey key( rng, 1024 );
std::cout << "Success.\n";return 0;
}
% cl /Zi /EHsc /Febotan.exe botan.cpp /Ic:/Botan/include/botan-2 c:/Botan/lib/botan.libMicrosoft (R) C/C++ Optimizing Compiler Version 19.16.27045 for x64Copyright (C) Microsoft Corporation. All rights reserved.
botan.cppCopyright (C) Microsoft Corporation. All rights reservedMicrosoft (R) Incremental Linker Version 14.16.27045.0
/debug
/out:botan.exe
botan.objc:/Botan/lib/botan.lib% /usr/bin/time ~/dr/releases/DynamoRIO-Windows-8.0.18740/bin64/drrun -- ./botan.exeSuccess.0.00user 0.01system 0:00.55elapsed 2%CPU (0avgtext+0avgdata 5108maxresident)k0inputs+0outputs (1326major+0minor)pagefaults 0swaps
% /usr/bin/time ~/dr/releases/DynamoRIO-Windows-8.0.18747/bin64/drrun -- ./botan.exeSuccess.0.01user 0.00system 0:00.53elapsed 2%CPU (0avgtext+0avgdata 5108maxresident)k0inputs+0outputs (1325major+0minor)pagefaults 0swaps
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/617445af560a429784efa829ab0a08ff%40rohde-schwarz.com.
I did a few more tests with a fresh Botan build, and noticed that the slowdown only happens with the debug build of Botan. Both with 32-bit and 64-bit (OS Win10 1909).
The commands I used to configure Botan:
64-bit release (no slowdown; 0.473s -> 0.459s):
py .\configure.py --minimized-build --build-targets=shared --enable-modules=auto_rng,system_rng,rsa
64-bit debug (slowdown; 1.231s -> 10.133s):
py .\configure.py --minimized-build --build-targets=shared --enable-modules=auto_rng,system_rng,rsa --debug-mode
32-bit release (no slowdown; 0.828s -> 0.878s):
py .\configure.py --minimized-build --build-targets=shared --enable-modules=auto_rng,system_rng,rsa --cpu=x86_32
32-bit debug (slowdown; 2.257s -> 18.670s):
py .\configure.py --minimized-build --build-targets=shared --enable-modules=auto_rng,system_rng,rsa --cpu=x86_32 --debug-mode
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/CAO1ikSa_PY3z7wXd9DMueoF6sCdJj4XDz3Vd4gc%2B3w8DVhgX_g%40mail.gmail.com.
$ /usr/bin/time ~/dr/releases/DynamoRIO-Linux-8.0.18740/bin64/drrun -- ~/spec2006/bzip2-test/bzip2_base.gcc-64bit ~/spec2006/bzip2-test/dryer.jpg 2
2.16user 0.02system 0:02.21elapsed 99%CPU (0avgtext+0avgdata 21276maxresident)k
0inputs+8outputs (0major+6401minor)pagefaults 0swaps
$ /usr/bin/time ~/dr/releases/DynamoRIO-Linux-8.0.18747/bin64/drrun -- ~/spec2006/bzip2-test/bzip2_base.gcc-64bit ~/spec2006/bzip2-test/dryer.jpg 2
2.15user 0.03system 0:02.22elapsed 98%CPU (0avgtext+0avgdata 22856maxresident)k
0inputs+8outputs (0major+6601minor)pagefaults 0swaps
To view this discussion on the web visit https://groups.google.com/d/msgid/dynamorio-users/b5f674e8cb3e4530a8a7e663dd6caf4e%40rohde-schwarz.com.