Skip to content

Conversation

@aquaratixc
Copy link

This PR fixes the usage of the try_lock/lock method in the core_dump_composer and core_dump_agent modules of the core-dump-handler project.
Specifically, it enforces the use of the try_lock/lock implementation from the AdvisoryFileLock trait provided by the advisory-lock crate for the std::fs::File type.

This change is necessary to prevent compilation errors on Rust versions 1.89.0 and above, where the compiler tries to call the try_lock/lock method directly from the standard library's std::fs::File instead of from the advisory-lock crate.

With this fix, the code explicitly scopes the try_lock/lock call to AdvisoryFileLock, ensuring compatibility with newer Rust versions and avoiding ambiguous method call errors.

The fix improves stability and future-proofing of the file locking mechanism in core-dump-handler.

@No9
Copy link
Collaborator

No9 commented Sep 1, 2025

Hi @aquaratixc
Thanks for this PR - if you wouldn't mind fixing the DCO issue I'm happy to merge

@aquaratixc
Copy link
Author

Hi @aquaratixc Thanks for this PR - if you wouldn't mind fixing the DCO issue I'm happy to merge

Thanks for your reply. I'll resolve the DCO control issue a little later, if you don't mind.

fix std and advisory_lock collision in try_lock method in core-dump-agent

Signed-off-by: aquaratixc <[email protected]>
fix std and advisory_lock collision in lock method in core-dump-composer

Signed-off-by: aquaratixc <[email protected]>
fix missing file argument

Signed-off-by: aquaratixc <[email protected]>
fix lock method

Signed-off-by: aquaratixc <[email protected]>
@aquaratixc
Copy link
Author

Hi @aquaratixc Thanks for this PR - if you wouldn't mind fixing the DCO issue I'm happy to merge

DCO passed

Signed-off-by: ou.baharev <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants