Shopify / Shopify/toxiproxy

Fallback in case ToxicDelete stuck

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

Nobody has claimed this yet.

Dominant language
Go
Stars
12.4k
Forks
509
PR merge metrics
No merged PRs in 30d

Description

Sometime happens that Toxiproxy stuck on ToxicDelete.
Currently it is waiting for Delete for all links.

sync.(*WaitGroup).Wait(0x40001fe0f0)
	/opt/hostedtoolcache/go/1.17.7/x64/src/sync/waitgroup.go:130 +0xa4

github.com/Shopify/toxiproxy/v2.(*ToxicCollection).chainRemoveToxic(0x40000a1440, 0x400027ad80)
	/home/runner/work/toxiproxy/toxiproxy/toxic_collection.go:266 +0x2cc

github.com/Shopify/toxiproxy/v2.(*ToxicCollection).RemoveToxic(0x40000a1440, {0x40000a229f, 0x12})
	/home/runner/work/toxiproxy/toxiproxy/toxic_collection.go:169 +0xdc

github.com/Shopify/toxiproxy/v2.(*ApiServer).ToxicDelete(0x4000028150, {0x5041c0, 0x40001ca0e0}, 0x4000184c00)
	/home/runner/work/toxiproxy/toxiproxy/api.go:379 +0x10c

net/http.HandlerFunc.ServeHTTP(0x4000028a10, {0x5041c0, 0x40001ca0e0}, 0x4000184c00)
	/opt/hostedtoolcache/go/1.17.7/x64/src/net/http/server.go:2047 +0x40

Need to find solution to unblock removing WaitGroup with removing stucked Link.

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 toxic_collection.go at chainRemoveToxic and RemoveToxic, then trace the ToxicDelete entry point in api.go. Use the reported WaitGroup stack trace to investigate how a stuck link blocks deletion; done means ToxicDelete can remove the toxic without remaining blocked on that link.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.