robotpy / robotpy/robotpy-navx
[BUG]: OffsetTracker::UpdateHistory can segfault in tests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3
- Forks
- 4
- Avg merge
- 7d 5h
- Merged PRs (30d)
- 1
Description
Running pyfrc robot tests, I sometimes get these segfaults on Linux:
(gdb) bt
#0 0x00007ffff140ff10 in OffsetTracker::UpdateHistory(float) () from ~/.local/share/virtualenvs/rpy/lib/python3.10/site-packages/navx/_navx.cpython-310-x86_64-linux-gnu.so
#1 0x00007ffff140eef1 in AHRSInternal::SetAHRSPosData(AHRSProtocol::AHRSPosUpdate&, long) ()
from ~/.local/share/virtualenvs/rpy/lib/python3.10/site-packages/navx/_navx.cpython-310-x86_64-linux-gnu.so
#2 0x00007ffff1414b34 in SimIO::UpdatePeriodicFromSimVariables(long) () from /home/seedbox/.local/share/virtualenvs/rpy/lib/python3.10/site-packages/navx/_navx.cpython-310-x86_64-linux-gnu.so
#3 0x00007ffff1414c99 in SimIO::Run() () from ~/.local/share/virtualenvs/rpy/lib/python3.10/site-packages/navx/_navx.cpython-310-x86_64-linux-gnu.so
#4 0x00007ffff140c6aa in AHRS::ThreadFunc(IIOProvider*) () from ~/.local/share/virtualenvs/rpy/lib/python3.10/site-packages/navx/_navx.cpython-310-x86_64-linux-gnu.so
#5 0x00007ffff6caf4d4 in std::execute_native_thread_routine (__p=0x7fff9801e020) at /usr/src/debug/gcc/libstdc++-v3/src/c++11/thread.cc:82
#6 0x00007ffff7a415c2 in start_thread () from /usr/lib/libc.so.6
#7 0x00007ffff7ac6584 in clone () from /usr/lib/libc.so.6
An interesting note: I seem to only be able to reproduce the segfault with my team's code if I let the operator control and disabled tests run...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the gdb backtrace for OffsetTracker::UpdateHistory(float) in the navx extension and trace the call path through AHRSInternal::SetAHRSPosData, SimIO::UpdatePeriodicFromSimVariables, and SimIO::Run. Reproduce the failure with pyfrc robot tests on Linux, especially with operator control enabled and tests disabled; done means the intermittent segfault no longer occurs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- robotics, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100