openwrt / openwrt/libubox

`uloop_run_events` was not awakened when the first `timeout` was added.

Open
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
32
Forks
35
PR merge metrics
No merged PRs in 30d

Description

https://github.com/openwrt/libubox/blob/c1be505732e6d254464973bdeacb955214c76c46/uloop.c#L667-L678

consider the following case:
uloop_run_events (-1) was entered when there is no next_timeout
and then executing uloop_timeout_add to add a timeout "task" that will not wake up uloop_run_events
the timeout "task" will never be executed.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with uloop.c at lines 667-678 and trace how uloop_run_events(-1) waits when next_timeout is absent, then inspect uloop_timeout_add. Reproduce adding the first timeout while the event loop is waiting; done means the timeout wakes the loop and executes.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.