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

HUP segfaults mosquitto #965

Closed
dustin opened this issue Sep 16, 2018 · 6 comments
Closed

HUP segfaults mosquitto #965

dustin opened this issue Sep 16, 2018 · 6 comments
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Milestone

Comments

@dustin
Copy link

dustin commented Sep 16, 2018

I've been running 1.5.1 for a couple of days now on debian testing/buster (built from source since the latest released version is 1.5 and has broken bridging). I found something interesting has been occurring:

Sep 15 00:00:02 eve kernel:  [278513.821971] mosquitto[12256]: segfault at bc ip 0000563c12cf703f sp 00007ffd21c740c0 error 4 in mosquitto[563c12ce0000+1e000]
Sep 16 00:00:02 eve kernel:  [364913.396950] mosquitto[28319]: segfault at bc ip 0000557f8414203f sp 00007ffcc2a67770 error 4 in mosquitto[557f8412b000+1e000]

Since this is happening local time, and seems to be fairly aligned with my logs, I assumed it was related to log rotation. I've confirmed that SIGHUP segfaults:

Sep 16 11:01:00 eve kernel: [404571.651633] mosquitto[28833]: segfault at bc ip 000056202bc2903f sp 00007ffcefda5b10 error 4 in mosquitto[56202bc12000+1e000]
@dustin
Copy link
Author

dustin commented Sep 16, 2018

This may be a dup of #849 -- I started typing the bug before I figured out it was related to log rotation.

@ralight
Copy link
Contributor

ralight commented Sep 18, 2018

Could you provide some more details about what platform you are using and your mosquitto configuration?

@dustin
Copy link
Author

dustin commented Sep 18, 2018

dustin@eve:~$ uname -a ; lsb_release -a
Linux eve 4.17.0-3-amd64 #1 SMP Debian 4.17.17-1 (2018-08-18) x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux testing (buster)
Release:        testing
Codename:       buster

/etc/mosquitto.conf

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

per_listener_settings true

listener 1883 0.0.0.0
allow_anonymous true

listener 8883 0.0.0.0
# acl_file /etc/mosquitto/acls
password_file /etc/mosquitto/passwd
allow_anonymous false

cafile /etc/mosquitto/ca_certificates/cacert.pem
certfile /etc/mosquitto/certs/fullchain.pem
keyfile /etc/mosquitto/certs/privkey.pem
tls_version tlsv1


log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

/etc/mosquitto/conf.d/adafruit.conf

I've also got a bridging config to adafruit:

connection adafruit
address io.adafruit.com:8883
bridge_capath /etc/ssl/certs/
notifications false
remote_username ME
remote_password MYPASS
start_type automatic
bridge_protocol_version mqttv311
try_private false

topic + in 0 adafruit.io/ ME/feeds/

topic "" out 0 thing1 ME/feeds/grp.thing1
topic "" out 0 thing2 ME/feeds/grp.thing2
topic "" out 0 thing3 ME/feeds/grp.thing3
topic "" out 0 thing4 ME/feeds/grp.thing4

@ralight
Copy link
Contributor

ralight commented Sep 19, 2018

Lovely, that helps.

ralight added a commit that referenced this issue Sep 19, 2018
Closes #849. Closes #965. Thanks to Wolfgand Hottgenroth and Dustin Sallings.
@ralight
Copy link
Contributor

ralight commented Sep 19, 2018

I think this is fixed now in the fixes branch, could you give it a try and close this issue if you're happy?

@ralight ralight added this to the 1.5.2 milestone Sep 19, 2018
@ralight ralight added Type: Bug Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. labels Sep 19, 2018
@dustin
Copy link
Author

dustin commented Sep 19, 2018

I'm going to go with "probably" :) HUP doesn't segfault. I'll know if starts happening again. Thanks for the quick fix!

@dustin dustin closed this as completed Sep 19, 2018
ralight added a commit that referenced this issue Nov 8, 2018
Closes #849. Closes #965. Thanks to Wolfgand Hottgenroth and Dustin Sallings.
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Component: mosquitto-broker Status: Completed Nothing further to be done with this issue, it can be closed by the requestor or committer. Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants