nexb / tracecode-toolkit-strace Goto Github PK
View Code? Open in Web Editor NEWTrace software components, packages and files between Development/Source and Deployment/Distribution/Binaries codebases - strace build analysis
Trace software components, packages and files between Development/Source and Deployment/Distribution/Binaries codebases - strace build analysis
For our paper we used the following strace options:
strace -e trace=file,process,dup,dup2,close,pipe,pipe2,fcntl -q -f -s 512
The -e option might be useful to reduce the amount of data that is stored. We actually stored quite a bit of data (512 bytes) per trace call. I don't clearly remember if that was too much or not, but since the paths in the Nix store can be quite long I think that's why ;-)
Hi,
I'm testing the tool on Ubuntu 18.
With python 3.6 I had the following issue from ./configure --dev
:
ModuleNotFoundError: No module named 'importlib.resources'
I updated to 3.10 and ./configure --dev
worked well.
Then I tried to pip3 install apt_pkg
as tracecode -h
was failing with ModuleNotFoundError: No module named 'apt_pkg'
and got the following:
AttributeError: module 'collections' has no attribute 'MutableMapping'
which is a result of updating collections.MutableMapping
to collections.abc.MutableMapping
in 3.10.
Then I downgraded to 3.9 and couldn't run again ./configure --dev
, as for
ModuleNotFoundError: No module named 'pip'
which I'm not sure how to fix in tracecode
's setup.
pip3 install apt_pkg
failed for all 3.9, 3.8 and 3.7 with:
Could not find a version that satisfies the requirement apt_pkg (from versions: )
No matching distribution found for apt_pkg
How can I clean up the whole installation and start from scratch and which python version should I use?
Thanks :)
$ $(which strace) -ff -y -ttt -qq -a1 -o /tmp/outputs/ls- ls -lah /tmp/
...<ls output>...
$ ls /tmp/outputs
ls-.1301978
$ tracecode parse /tmp/outputs /tmp/parsed_outputs
INFO:tracecode:Processing traces with cwd: None, input_dir: '/tmp/outputs', output_dir: '/tmp/parsed_outputs'.
INFO:tracecode:validate_traces: Found 1 traces with root pid: 1301978.
INFO:tracecode:validate_traces: Oldest pid: 1301978.
INFO:tracecode:validate_traces: Smallest pid: 1301978.
INFO:tracecode:Queuing trace of pid 1301978 for parsing. Left to do: 0
INFO:tracecode:All 1 traces queued for parsing in 0.26 seconds.
INFO:tracecode:Filtering and saving cleaned traces to '/tmp/parsed_outputs'.
INFO:tracecode:Applied filters to 1 traces in 0.00 seconds.
INFO:tracecode:Filtered 0 empty traces from '/tmp/parsed_outputs' with 1 cycles in 0.00 seconds.
INFO:tracecode:Processing completed in 0.60 seconds. All 1 traces parsed and saved to: "/tmp/parsed_outputs".
INFO:tracecode:Completed in 0.60 seconds.
$ ls /tmp/parsed_outputs
1301978.pickle
$ ls /tmp/a
$ ls /tmp/b
$ tracecode list /tmp/parsed_outputs /tmp/a/reads /tmp/b/writes
INFO:tracecode:Loading traces ...
INFO:tracecode:Building file lists ...
INFO:tracecode:Saving file lists ...
Traceback (most recent call last):
File "tracecode/tracecode-toolkit-strace/venv/bin/tracecode", line 8, in <module>
sys.exit(cli())
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2606, in cli
main(arguments)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2547, in main
save_file_lists(input_dir, reads_file, writes_file, debug=debug)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2255, in save_file_lists
save_sorted(reads_file, all_reads)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2317, in save_sorted
with open(file_out) as fo:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/a/reads'
$ tracecode list /tmp/parsed_outputs /tmp/a /tmp/b
INFO:tracecode:Loading traces ...
INFO:tracecode:Building file lists ...
INFO:tracecode:Saving file lists ...
Traceback (most recent call last):
File "tracecode/tracecode-toolkit-strace/venv/bin/tracecode", line 8, in <module>
sys.exit(cli())
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2606, in cli
main(arguments)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2547, in main
save_file_lists(input_dir, reads_file, writes_file, debug=debug)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2255, in save_file_lists
save_sorted(reads_file, all_reads)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2317, in save_sorted
with open(file_out) as fo:
IsADirectoryError: [Errno 21] Is a directory: '/tmp/a'
$ touch /tmp/a/reads
$ tracecode list /tmp/parsed_outputs /tmp/a /tmp/b
INFO:tracecode:Loading traces ...
INFO:tracecode:Building file lists ...
INFO:tracecode:Saving file lists ...
Traceback (most recent call last):
File "tracecode/tracecode-toolkit-strace/venv/bin/tracecode", line 8, in <module>
sys.exit(cli())
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2606, in cli
main(arguments)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2547, in main
save_file_lists(input_dir, reads_file, writes_file, debug=debug)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2255, in save_file_lists
save_sorted(reads_file, all_reads)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2317, in save_sorted
with open(file_out) as fo:
IsADirectoryError: [Errno 21] Is a directory: '/tmp/a'
$ tracecode list /tmp/parsed_outputs /tmp/a/reads /tmp/b
INFO:tracecode:Loading traces ...
INFO:tracecode:Building file lists ...
INFO:tracecode:Saving file lists ...
Traceback (most recent call last):
File "tracecode/tracecode-toolkit-strace/venv/bin/tracecode", line 8, in <module>
sys.exit(cli())
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2606, in cli
main(arguments)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2547, in main
save_file_lists(input_dir, reads_file, writes_file, debug=debug)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2255, in save_file_lists
save_sorted(reads_file, all_reads)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2318, in save_sorted
fo.write("\n".join(sorted(seq)))
io.UnsupportedOperation: not writable
$ tracecode list /tmp/parsed_outputs /tmp/a/reads /tmp/b
$ touch /tmp/a/writes
$ tracecode list /tmp/parsed_outputs /tmp/a/reads /tmp/b/writes
INFO:tracecode:Loading traces ...
INFO:tracecode:Building file lists ...
INFO:tracecode:Saving file lists ...
Traceback (most recent call last):
File "tracecode/tracecode-toolkit-strace/venv/bin/tracecode", line 8, in <module>
sys.exit(cli())
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2606, in cli
main(arguments)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2547, in main
save_file_lists(input_dir, reads_file, writes_file, debug=debug)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2255, in save_file_lists
save_sorted(reads_file, all_reads)
File "tracecode/tracecode-toolkit-strace/src/tracecode/tracecode.py", line 2318, in save_sorted
fo.write("\n".join(sorted(seq)))
io.UnsupportedOperation: not writable
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.