`nginx-util init_lan` freezes
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Not sure about the trigger but on my system nginx-util init_lan sometimes freezes. After analyzing the source code, and checking the files in /var/lib/nginx it looks to me like line 229 (create_lan) is executed but line 239 (init_uci) isn't. Also, the exception handler at line 222 is triggered. Therefore I conclude that the configuring.lock() at line 236 deadlocks. Let's look at the unlock configuring.unlock() at line 219:
If line 217 or 218 (rather than 220) throws an exception, then the code would deadlock. At least that's my interpretation, I may be wrong.
Contributor guide
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 in nginx-util.cpp around lines 217-239 and trace the exception path through create_lan and init_uci, especially the configuring.lock() and configuring.unlock() calls. Run nginx-util init_lan under the affected conditions and verify that exceptions do not leave the lock held and that the command no longer freezes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, nginx
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100