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

Segfault on sighup with persistence and per_listener_settings #2167

Closed
momoskitto opened this issue Apr 8, 2021 · 2 comments
Closed

Segfault on sighup with persistence and per_listener_settings #2167

momoskitto opened this issue Apr 8, 2021 · 2 comments

Comments

@momoskitto
Copy link

Observed on mosquitto 2.0.10 on debian buster, installed via "deb http:https://repo.mosquitto.org/debian buster main".

A reduced config file to reproduce the segfault:

persistence true
persistence_location /var/lib/mosquitto/
per_listener_settings true
listener 1888

Steps to reproduce:

  • start mosquitto broker
  • send SIGHUP (killall -s SIGHUP mosquitto)

Console output from mosquitto:

1617897029: mosquitto version 2.0.10 starting
1617897029: Config loaded from /tmp/mosquitto.conf.
1617897029: Opening ipv4 listen socket on port 1888.
1617897029: Opening ipv6 listen socket on port 1888.
1617897029: mosquitto version 2.0.10 running
1617897037: Reloading config.
Segmentation fault

Further information

  • the segfault does not occur if per_listener_settings is removed from the config file
  • the segfault does not occur if persistence is set to false
  • the segfault does not occur when deleting the persistence database mosquitto.db before starting the broker
  • the segfault depends on the persistence database. If mosquitto was started without db, then wrote a db and is restarted, the segfault does not happen. The segfault was observed with a mosquitto.db from a pervious version of the broker (mosquitto 1.x). However, it does not seem to happen with all databases from that version of mosquitto. Also, if mosquitto is started with that database, then stopped to rewrite the database, then restarted, the segfault does still happen, even though the database file was changed. I do not wish to make the mosquitto.db which causes the segfault public, but I can send it privately if necessary.
@ralight
Copy link
Contributor

ralight commented Apr 8, 2021

@momoskitto Could you please compress the mosquitto.db and send it to [email protected]?

@ralight
Copy link
Contributor

ralight commented Apr 8, 2021

Thanks for sending that, this is now fixed as in the changelog message.

@ralight ralight closed this as completed in c418b57 Jun 9, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants