"shared-state-async discover" hangs

Open
#1,198 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
backend

Research direction

The issue points to src/async_command.cc, especially closeAFD at lines 265–279; begin by tracing what happens after shared-state-async-discover is called. Reproduce the hang on Debian across the listed build types and compare behavior with the debug printout workaround. Done means identifying and fixing the cause so shared-state-async discover completes and produces output.

Written by the indexing model from the issue text.

Description

Building and running shared-state-async on Debian results in a binary that hangs on shared-state-async discover and produces no output. The external script shared-state-async-discover does get called, so the hangup comes after that.

A workaround is to put a debug printout such as this anywhere in the body of the function closeAFD:

RS_DBG("Debug printout as a workaround");

This suggests to me that it is a memory management bug, and that the extra printout happens to change the memory layout in such a way that the bug no longer shows itself.

The problem appears in Debug, Coverage as well as Release builds, and the workaround works in all three cases.

Dominant language
Lua
Stars
338
Forks
113
Avg merge
8d 3h
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from libremesh/lime-packages

All issues in libremesh/lime-packages

Similar issues

More Lua issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.