Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Race condition in retrieval #878

Closed
beorn7 opened this Issue Jul 6, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@beorn7
Copy link
Member

beorn7 commented Jul 6, 2015

I have found twe races in the retrieval package. Stack traces:

==================
WARNING: DATA RACE
Write by goroutine 321:
  github.com/prometheus/prometheus/retrieval.(*Target).Update()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:222 +0xa94
  github.com/prometheus/prometheus/retrieval.func·008()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:235 +0xbf

Previous read by goroutine 308:
  github.com/prometheus/prometheus/retrieval.(*Target).scrape()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:390 +0xf36
  github.com/prometheus/prometheus/retrieval.(*Target).RunScraper()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:312 +0x7a7

Goroutine 321 (running) created at:
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:237 +0x683 
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197

Goroutine 308 (running) created at:
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:257 +0xd15 
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197
==================
==================
WARNING: DATA RACE  
Write by goroutine 321:
  github.com/prometheus/prometheus/retrieval.(*Target).Update()  
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:210 +0x5ef
  github.com/prometheus/prometheus/retrieval.func·008()  
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:235 +0xbf

 revious read by goroutine 308:
  github.com/prometheus/prometheus/retrieval.(*Target).scrape()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:371 +0xcd9
  github.com/prometheus/prometheus/retrieval.(*Target).RunScraper()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:312 +0x7a7

Goroutine 321 (running) created at:
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:237 +0x683 
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197

Goroutine 308 (running) created at:
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:257 +0xd15 
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197
==================

@beorn7 beorn7 added bug labels Jul 6, 2015

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jul 6, 2015

@fabxc I guess you are most qualified to deal with this.

@beorn7

This comment has been minimized.

Copy link
Member Author

beorn7 commented Jul 6, 2015

Another one:

==================  
WARNING: DATA RACE
Write by goroutine 288:  
  github.com/prometheus/prometheus/retrieval.(*Target).Update()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:208 +0x5ab  
  github.com/prometheus/prometheus/retrieval.func·008()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:235 +0xbf

Previous read by goroutine 213:  
  github.com/prometheus/prometheus/retrieval.(*Target).scrape()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:345 +0x3f3  
  github.com/prometheus/prometheus/retrieval.(*Target).RunScraper()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/target.go:312 +0x7a7  

Goroutine 288 (running) created at:  
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:237 +0x683
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()  
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197  

Goroutine 213 (running) created at:  
  github.com/prometheus/prometheus/retrieval.(*TargetManager).updateTargetGroup()
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:257 +0xd15
  github.com/prometheus/prometheus/retrieval.(*TargetManager).handleTargetUpdates()  
      /home/bjoern/prometheus/.build/root/gopath/src/github.com/prometheus/prometheus/retrieval/targetmanager.go:115 +0x197  
==================
@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.