Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to process trace #3

Open
pombredanne opened this issue Jan 5, 2023 · 0 comments
Open

Failed to process trace #3

pombredanne opened this issue Jan 5, 2023 · 0 comments

Comments

@pombredanne
Copy link
Collaborator

$ $(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
pombredanne added a commit that referenced this issue Jan 5, 2023
Somehow a recent commit did trash writing to files.
A separate commit adds end to end testing for all write operations

Reference: #3
Signed-off-by: Philippe Ombredanne <[email protected]>
pombredanne added a commit that referenced this issue Jan 5, 2023
We want strace and graphviz dot installed for the new end to end tests

Reference: #3
Signed-off-by: Philippe Ombredanne <[email protected]>
pombredanne added a commit that referenced this issue Jan 5, 2023
Reference: #3
Signed-off-by: Philippe Ombredanne <[email protected]>
pombredanne added a commit that referenced this issue Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant