Skip to content

Conversation

@guedou
Copy link
Member

@guedou guedou commented Oct 5, 2024

Fixes #4546

@codecov
Copy link

codecov bot commented Oct 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.62%. Comparing base (c38a5de) to head (4556f1a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4558   +/-   ##
=======================================
  Coverage   81.61%   81.62%           
=======================================
  Files         356      356           
  Lines       85540    85540           
=======================================
+ Hits        69816    69819    +3     
+ Misses      15724    15721    -3     
Files with missing lines Coverage Δ
scapy/main.py 70.37% <100.00%> (ø)

... and 6 files with indirect coverage changes

@gpotter2
Copy link
Member

gpotter2 commented Oct 6, 2024

This issue is a bit ridiculous. But alright.

@gpotter2 gpotter2 merged commit 2ae46b7 into master Oct 6, 2024
@gpotter2 gpotter2 deleted the guedou/20241005/Issue_#4546 branch October 6, 2024 10:24
@KepptnKool
Copy link

Will there be a patch level release containing the fix in the near future?

@ctheune
Copy link

ctheune commented Dec 16, 2024

This issue is a bit ridiculous. But alright.

I'd love to understand why it's ridiculous. It's totally possible that I am missing a /s here ... ;)

To clarify: this is a real problem. We had two concurrent processes in our test suite that ended up racing each other quite often exactly on this line and caused stochastic failures ... so I'm very happy to see this has been caught and released already! :) So, big thanks from me!

@gpotter2
Copy link
Member

gpotter2 commented Dec 16, 2024

The code is

if not path.exists():
    path.mkdir()

The fact that this can fail with an "already exists" error is ridiculous to me.

@gpotter2 gpotter2 changed the title Fix the race condition Dec 16, 2024
@whoisxy
Copy link

whoisxy commented Jul 20, 2025

The code is

if not path.exists():
    path.mkdir()

The fact that this can fail with an "already exists" error is ridiculous to me.

@gpotter2 TOCTOU

@gpotter2
Copy link
Member

gpotter2 commented Jul 20, 2025

If we were in a multi processed code, sure. If you somehow managed to start multiple instances of Scapy, maybe. But that's not the case isn't it?

Closing though.

@secdev secdev locked as resolved and limited conversation to collaborators Jul 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

6 participants