• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cilium / cilium / 9845
39%

Build:
DEFAULT BRANCH: master
Ran 08 Aug 2019 11:20AM UTC
Jobs 1
Files 435
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Aug 2019 11:00AM UTC coverage: 44.206% (+0.02%) from 44.182%
9845

push

travis-ci-com

tgraf
eventqueue: use mutex to synchronize access to events channel

Previously, a `sync.WaitGroup` was used to ensure the events channel for a given
`EventQueue` was not closed while a call to `Enqueue` was in in-flight. However,
a panic could result when stopping a queue, which called `Wait` on said
`WaitGroup`, and multiple calls to `Enqueue` were called while said `Wait` was
happening:

```
panic: sync: WaitGroup is reused before previous Wait has returned

goroutine 55 [running]:
sync.(*WaitGroup).Wait(0xc000360120)
        /usr/local/go/src/sync/waitgroup.go:132 +0xae
github.com/cilium/cilium/pkg/eventqueue.(*EventQueue).Stop.func1()
        /go/src/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go:279 +0x18a
sync.(*Once).Do(0xc000360114, 0xc0000e57b8)
        /usr/local/go/src/sync/once.go:44 +0xb3
github.com/cilium/cilium/pkg/eventqueue.(*EventQueue).Stop(0xc0003600f0)
        /go/src/github.com/cilium/cilium/pkg/eventqueue/eventqueue.go:269 +0x81
```

This occured because the `WaitGroup` is waiting while at the same time that
`WaitGroup` has more deltas being added to its internal counter. Replace this
`WaitGroup` with a mutex that is Locked when closing the events channel,
blocking out in-flight calls to `Enqueue`. Calls to `Enqueue` take an `RLock` so
multiple Enqueues can occur at the same time without a problem.

Signed-off by: Ian Vernon <ian@cilium.io>

25347 of 57338 relevant lines covered (44.21%)

1189.64 hits per line

Jobs
ID Job ID Ran Files Coverage
1 9845.1 08 Aug 2019 11:19AM UTC 0
44.21
Travis Job 9845.1
Source Files on build 9845
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #9845
  • 2c686371 on github
  • Prev Build on master (#9842)
  • Next Build on master (#9844)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc