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

Getting race during reconnect #22

Open
millerlogic opened this issue Dec 3, 2019 · 2 comments
Open

Getting race during reconnect #22

millerlogic opened this issue Dec 3, 2019 · 2 comments

Comments

@millerlogic
Copy link

Hi, I'm getting the below race condition when emitter disappears and reappears (reconnect). I'm getting it consistently when killing (SIGTERM) emitter.

It looks like the issue is in github.com/eclipse/paho.mqtt.golang however it was potentially fixed in v1.2.0

WARNING: DATA RACE
Read at 0x00c00010cb18 by goroutine 62:
  github.com/eclipse/paho%2emqtt%2egolang.keepalive()
      /home/dev/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.1.1/ping.go:42 +0x22e

Previous write at 0x00c00010cb18 by goroutine 28:
  github.com/eclipse/paho%2emqtt%2egolang.(*client).reconnect()
      /home/dev/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.1.1/client.go:377 +0x11f8

Goroutine 62 (running) created at:
  github.com/eclipse/paho%2emqtt%2egolang.(*client).reconnect()
      /home/dev/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.1.1/client.go:374 +0x15fc

Goroutine 28 (running) created at:
  github.com/eclipse/paho%2emqtt%2egolang.(*client).internalConnLost()
      /home/dev/go/pkg/mod/github.com/eclipse/paho.mqtt.golang@v1.1.1/client.go:465 +0x10c
@bokunodev
Copy link

bokunodev commented Sep 13, 2022

paho, master branch. the data race happen because client.onconnect in paho.
removing any onconnect code does work with simple pubsub example.
but, the race also happen in emitter server.

@bokunodev
Copy link

seems to have been fixed on master branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants