Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Cancelling two simultaneous IP allocation requests crashes weave #1424

Closed
bboreham opened this issue Sep 14, 2015 · 0 comments
Closed

Cancelling two simultaneous IP allocation requests crashes weave #1424

bboreham opened this issue Sep 14, 2015 · 0 comments
Assignees
Milestone

Comments

@bboreham
Copy link
Contributor

Due to dumb coding in alloc.cancelOpsFor()

To reproduce:

$ sudo weave launch --init-peer-count=2 
$ sudo docker run -tdi ubuntu
df7fe26b8d870e7090662b4e36edf988c4d1df0545a6ee1e1bcaf3999ebe2486
$ sudo weave attach df7 &
[1] 32082
$ sudo weave attach df7 &
[2] 32090
$ sudo docker kill df7
[attach commands fail and exit]
$ sudo docker logs weave
...
panic: runtime error: slice bounds out of range

goroutine 16 [running]:
github.com/weaveworks/weave/ipam.(*Allocator).cancelOpsFor(0xc2090d4300, 0xc2090d4360, 0xc2092e3100, 0x40, 0xd261a0)
    /home/bryan/golang/src/github.com/weaveworks/weave/ipam/allocator.go:133 +0x2fa
github.com/weaveworks/weave/ipam.func·004()
    /home/bryan/golang/src/github.com/weaveworks/weave/ipam/allocator.go:249 +0x1b6
...

(note this was on a dev branch so line numbers may be slightly off, but the bug is on master)

@rade rade added this to the 1.1.1 milestone Sep 14, 2015
@rade rade changed the title Cancelling two simultaneous requests crashes weave Cancelling two simultaneous IP allocation requests crashes weave Sep 14, 2015
@bboreham bboreham self-assigned this Sep 14, 2015
@rade rade closed this as completed in 8e656c1 Sep 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants