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

Run tests with -race #340

Closed
hsanjuan opened this issue Mar 9, 2018 · 6 comments
Closed

Run tests with -race #340

hsanjuan opened this issue Mar 9, 2018 · 6 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws) status/wontfix This will not be addressed

Comments

@hsanjuan
Copy link
Collaborator

hsanjuan commented Mar 9, 2018

We have some races for sure, even if not critical. We should fix them so that tests pass with -race.

@hsanjuan hsanjuan added kind/bug A bug in existing code (including security flaws) help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful status/ready Ready to be worked P1 High: Likely tackled by core team if no one steps up status/blocked Unable to be worked further until needs are met labels Mar 9, 2018
@hsanjuan
Copy link
Collaborator Author

Can't do this until libp2p comes with this fix multiformats/go-multistream#18

@s1na
Copy link
Collaborator

s1na commented Apr 24, 2018

In the meanwhile, apart from the go-multistream race, I get these races when running the tests:

@hsanjuan
Copy link
Collaborator Author

I have just bubbled the multistream fix to libp2p, but will need to bubble libp2p here.

@hsanjuan hsanjuan removed the status/blocked Unable to be worked further until needs are met label Jun 1, 2018
@hsanjuan hsanjuan self-assigned this Jun 1, 2018
@hsanjuan hsanjuan added status/in-progress In progress and removed help wanted Seeking public contribution on this issue status/ready Ready to be worked labels Jun 1, 2018
@hsanjuan
Copy link
Collaborator Author

hsanjuan commented Jun 4, 2018

ok, there's another race in yamux that will need to be bubbled: libp2p/go-libp2p#341

hsanjuan added a commit that referenced this issue Jun 4, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan
Copy link
Collaborator Author

hsanjuan commented Jun 4, 2018

Races in go-logging

==================
WARNING: DATA RACE
Write at 0x00c4200ab8f8 by goroutine 115:
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.(*moduleLeveled).SetLevel()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/level.go:100 +0x80
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.SetLevel()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/backend.go:33 +0x70
  gx/ipfs/QmTG23dvpBCBjqQwyDxV8CQT6jmS4PSftNr1VqHhE3MLy7/go-log.SetLogLevel()
      /home/hector/go/src/gx/ipfs/QmTG23dvpBCBjqQwyDxV8CQT6jmS4PSftNr1VqHhE3MLy7/go-log/oldlog.go:97 +0xed
  github.com/ipfs/ipfs-cluster/api/rest/client.NewClient()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/client.go:121 +0x299
  github.com/ipfs/ipfs-cluster/api/rest/client.testClientLibp2p()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/client_test.go:86 +0x19d
  github.com/ipfs/ipfs-cluster/api/rest/client.testClients.func1.1()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/methods_test.go:24 +0x70
  testing.tRunner()
      /usr/lib64/go/1.10/src/testing/testing.go:777 +0x16d

Previous read at 0x00c4200ab8f8 by goroutine 49:
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.(*moduleLeveled).IsEnabledFor()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/level.go:87 +0x89
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.(*Logger).IsEnabledFor()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/logger.go:149 +0x84
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.(*Logger).log()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/logger.go:153 +0x49
  gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging.(*Logger).Debugf()
      /home/hector/go/src/gx/ipfs/QmQvJiADDe7JR4m968MwXobTCCzUqQkP87aRHe29MEBGHV/go-logging/logger.go:272 +0x73
  gx/ipfs/QmTG23dvpBCBjqQwyDxV8CQT6jmS4PSftNr1VqHhE3MLy7/go-log.(*eventLogger).Debugf()
      <autogenerated>:1 +0x8d
  github.com/ipfs/ipfs-cluster/api/rest/client.(*Client).handleResponse()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/request.go:47 +0x321
  github.com/ipfs/ipfs-cluster/api/rest/client.(*Client).do()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/request.go:18 +0x19a
  github.com/ipfs/ipfs-cluster/api/rest/client.(*Client).SyncAll()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/methods.go:137 +0x161
  github.com/ipfs/ipfs-cluster/api/rest/client.TestSyncAll.func1()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/methods_test.go:258 +0x4a
  github.com/ipfs/ipfs-cluster/api/rest/client.testClients.func1.2()
      /home/hector/go/src/github.com/ipfs/ipfs-cluster/api/rest/client/methods_test.go:28 +0x8d
  testing.tRunner()
      /usr/lib64/go/1.10/src/testing/testing.go:777 +0x16d

hsanjuan added a commit that referenced this issue Jun 4, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Jun 4, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 15, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 15, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 15, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 15, 2018
Unfortunately, there are still some data races in yamux
libp2p/go-libp2p#396 so we can't
enable this by default.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 15, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Aug 17, 2018
@hsanjuan hsanjuan mentioned this issue Aug 19, 2018
hsanjuan added a commit that referenced this issue Oct 17, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Oct 18, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Oct 22, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue Oct 26, 2018
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
hsanjuan added a commit that referenced this issue May 17, 2019
License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
@hsanjuan
Copy link
Collaborator Author

Even though we re-solved most issues for -race, and it works sometimes, this will be a wontfix as it does not seem feasable to run with -race permanently for all tests.

@hsanjuan hsanjuan added status/wontfix This will not be addressed and removed exp/intermediate Prior experience is likely helpful status/in-progress In progress P1 High: Likely tackled by core team if no one steps up labels May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug A bug in existing code (including security flaws) status/wontfix This will not be addressed
Projects
None yet
Development

No branches or pull requests

2 participants