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

mavlink: Use polling fd, hack to prevent crash #863

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joukkone
Copy link

@joukkone joukkone commented Jan 8, 2025

Poling fd is used to detect if uart hangs and
set _uart_fd to -1. Set instance pointer to
zero so stop command cannot delete Mavlink instance. That hack prevents crash in kernel mode when usb-cable is removed and then inserted to restore connection. Root cause for memory corruption remains unclear.

Solved Problem

When ... I found that ...

Fixes #{Github issue ID}

Solution

  • Add ... for ...
  • Refactor ...

Changelog Entry

For release notes:

Feature/Bugfix XYZ
New parameter: XYZ_Z
Documentation: Need to clarify page ... / done, read docs.px4.io/...

Alternatives

We could also ...

Test coverage

Context

Related links, screenshot before/after, video

@joukkone joukkone marked this pull request as draft January 8, 2025 12:34
@joukkone joukkone requested review from jlaitine and jnippula January 8, 2025 12:34
@joukkone
Copy link
Author

joukkone commented Jan 8, 2025

As a draft, maybe help for further debugging.

@joukkone joukkone force-pushed the mavlink_fix_totest branch from 9858102 to 31f6e41 Compare January 8, 2025 12:41
Poling fd is used to detect if uart hangs and
set _uart_fd to -1. Set instance pointer to
zero so stop command cannot delete Mavlink instance.
That hack prevents crash in kernel mode when usb-cable
is removed and then inserted to restore connection.
Root cause for memory corruption remains unclear.

Signed-off-by: Jouni Ukkonen <[email protected]>
@joukkone joukkone force-pushed the mavlink_fix_totest branch from 31f6e41 to 8a2a9b1 Compare January 8, 2025 13:19
@jlaitine
Copy link

The root cause is fixed in #866, this one can be closed

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