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

Segfault in ClockServer on ackData_cleanup #1

Closed
Infrasonics opened this issue Nov 16, 2020 · 1 comment
Closed

Segfault in ClockServer on ackData_cleanup #1

Infrasonics opened this issue Nov 16, 2020 · 1 comment

Comments

@Infrasonics
Copy link
Collaborator

Infrasonics commented Nov 16, 2020

I ran into a SIGSEGV while using the PhaseLockedClock with a remote server.

After some investigation I found this to happen in ClockServer::updateEntry. First the erase on the std::map deletes an entry, after that the loop moves the iterator further and invalidates it by skipping an element.

EDIT:
My setup is Linux, amd64, gcc-9.3 with exactly two clients, where one is running on the same machine as the ckserver.

I'll offer a PR with a simple fix. The PR provided fixes this in my case.

Infrasonics pushed a commit to Infrasonics/clockkit that referenced this issue Nov 16, 2020
Makes the iteration to clean old ack data in ClockServer::updateEntry
dependent on previous entry deletion.
camilleg pushed a commit that referenced this issue Nov 17, 2020
Makes the iteration to clean old ack data in ClockServer::updateEntry
dependent on previous entry deletion.

Co-authored-by: Fabian Dreer <[email protected]>
@camilleg
Copy link
Owner

camilleg commented Nov 17, 2020

Clear bug description and fix by Infrasonics. Confirmed on Linux x86-64 gcc-7.5.

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

No branches or pull requests

2 participants