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

main thread error prints are in random order #224

Open
jtmoon79 opened this issue Nov 6, 2023 · 1 comment
Open

main thread error prints are in random order #224

jtmoon79 opened this issue Nov 6, 2023 · 1 comment
Labels
bug Something isn't working difficult A difficult problem; a major coding effort or difficult algorithm to perfect P2 less important

Comments

@jtmoon79
Copy link
Owner

jtmoon79 commented Nov 6, 2023

Problem

Running s4 with multiple errant files will print errors like ERROR: something something for file ./logs/... (which is expected). These lines printed to stderr occur in a varying order for subsequent runs of s4. This degrades the quality of comparison done in ./tools/compare-current-and-expected/compare.sh.

To Reproduce

  1. in ./tools/compare-current-and-expected/common.sh
    comment out the line filters ERROR: strings
  2. run ./tools/compare-current-and-expected/update.sh
  3. run ./tools/compare-current-and-expected/compare.sh until failure

The lines starting with ERROR: are in varying order.

Another simpler approach:

  1. run s4 manually with known errant files
    find ./logs/other/tests/ -name 'invalid*' -or -name 'empty*' | sort \
       | ./target/release/s4 - 1>/dev/null
    

Environment:

  • OS: ubuntu 22 (should occur on any OS)
  • s4 version: e75daad
@jtmoon79 jtmoon79 added bug Something isn't working P2 less important labels Nov 6, 2023
jtmoon79 added a commit that referenced this issue Nov 6, 2023
@jtmoon79
Copy link
Owner Author

jtmoon79 commented Nov 6, 2023

This may be similar cause as #213 where multi-threaded design is causing this behavior. However, it needs investigation to see if it's possible to accumulate errors for "the first round of processing" and then print errors along with normal prints in order of file path. Thinking about it, why isn't this already happening?

@jtmoon79 jtmoon79 added the difficult A difficult problem; a major coding effort or difficult algorithm to perfect label Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working difficult A difficult problem; a major coding effort or difficult algorithm to perfect P2 less important
Projects
None yet
Development

No branches or pull requests

1 participant