Repository: eclipse-mosquitto/mosquitto

Issue #1419: Installing mosquitto fails because service fails to start
Created: 2019-09-22T07:10:26Z
When attempting to install mosquitto, the installation fails because the service fails to start due to a segmentation fault. I've tried searching other issues but the issues I were able to find were resolved, and I couldn't find anything obvious to do from the threads, which is why I opened a new issue. Can someone help me figure out how to resolve this?
I've posted all the relevant details I could think of below but let me know if there's anything I can provide.
OS: Raspbian GNU/Linux 10 (buster)
mosquitto version: Mosquitto MQTT v3.1/v3.1.1 Broker
mosquitto package: 1.6.6-0mosquitto1~buster1
Installation logs:
$ apt-cache search mosquitto; sudo apt-get update; sudo apt-get install -f libmosquitto-dev mosquitto mosquitto-clients libmosquitto1
libmosquittopp-dev - MQTT version 3.1 client C++ library, development files
libmosquittopp1 - MQTT version 3.1/3.1.1 client C++ library
mosquitto-dev - Development files for Mosquitto
libmosquitto-dev - MQTT version 3.1/3.1.1/5.0 client library, development files
libmosquitto1 - MQTT version 3.1/3.1.1/5.0 client library
libmosquitto1-dbgsym - debug symbols for libmosquitto1
libmosquittopp1-dbgsym - debug symbols for libmosquittopp1
mosquitto - MQTT version 3.1/3.1.1/5.0 compatible message broker
mosquitto-clients - Mosquitto command line MQTT clients
mosquitto-clients-dbgsym - debug symbols for mosquitto-clients
mosquitto-dbgsym - debug symbols for mosquitto
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Hit:3 https://repo.mosquitto.org/debian buster InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libev4 libuv1 libwebsockets8
Suggested packages:
  apparmor
The following NEW packages will be installed:
  libev4 libmosquitto-dev libmosquitto1 libuv1 libwebsockets8 mosquitto mosquitto-clients
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 610 kB of archives.
After this operation, 1327 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.umd.edu/raspbian/raspbian buster/main armhf libev4 armhf 1:4.25-1 [34.5 kB]
Get:2 http://mirror.umd.edu/raspbian/raspbian buster/main armhf libuv1 armhf 1.24.1-1 [96.7 kB]
Get:3 http://mirror.umd.edu/raspbian/raspbian buster/main armhf libwebsockets8 armhf 2.0.3-3 [85.6 kB]
Get:4 https://repo.mosquitto.org/debian buster/main armhf libmosquitto1 armhf 1.6.6-0mosquitto1~buster1 [70.9 kB]
Get:5 https://repo.mosquitto.org/debian buster/main armhf libmosquitto-dev armhf 1.6.6-0mosquitto1~buster1 [62.1 kB]
Get:6 https://repo.mosquitto.org/debian buster/main armhf mosquitto armhf 1.6.6-0mosquitto1~buster1 [172 kB]
Get:7 https://repo.mosquitto.org/debian buster/main armhf mosquitto-clients armhf 1.6.6-0mosquitto1~buster1 [88.2 kB]
Fetched 610 kB in 6s (96.2 kB/s)
Selecting previously unselected package libev4:armhf.
(Reading database ... 46206 files and directories currently installed.)
Preparing to unpack .../0-libev4_1%3a4.25-1_armhf.deb ...
Unpacking libev4:armhf (1:4.25-1) ...
Selecting previously unselected package libmosquitto1:armhf.
Preparing to unpack .../1-libmosquitto1_1.6.6-0mosquitto1~buster1_armhf.deb ...
Unpacking libmosquitto1:armhf (1.6.6-0mosquitto1~buster1) ...
Selecting previously unselected package libmosquitto-dev:armhf.
Preparing to unpack .../2-libmosquitto-dev_1.6.6-0mosquitto1~buster1_armhf.deb ...
Unpacking libmosquitto-dev:armhf (1.6.6-0mosquitto1~buster1) ...
Selecting previously unselected package libuv1:armhf.
Preparing to unpack .../3-libuv1_1.24.1-1_armhf.deb ...
Unpacking libuv1:armhf (1.24.1-1) ...
Selecting previously unselected package libwebsockets8:armhf.
Preparing to unpack .../4-libwebsockets8_2.0.3-3_armhf.deb ...
Unpacking libwebsockets8:armhf (2.0.3-3) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../5-mosquitto_1.6.6-0mosquitto1~buster1_armhf.deb ...
Unpacking mosquitto (1.6.6-0mosquitto1~buster1) ...
Selecting previously unselected package mosquitto-clients.
Preparing to unpack .../6-mosquitto-clients_1.6.6-0mosquitto1~buster1_armhf.deb ...
Unpacking mosquitto-clients (1.6.6-0mosquitto1~buster1) ...
Setting up libmosquitto1:armhf (1.6.6-0mosquitto1~buster1) ...
Setting up libev4:armhf (1:4.25-1) ...
Setting up mosquitto-clients (1.6.6-0mosquitto1~buster1) ...
Setting up libuv1:armhf (1.24.1-1) ...
Setting up libmosquitto-dev:armhf (1.6.6-0mosquitto1~buster1) ...
Setting up libwebsockets8:armhf (2.0.3-3) ...
Setting up mosquitto (1.6.6-0mosquitto1~buster1) ...
Job for mosquitto.service failed because a fatal signal was delivered to the control process.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mosquitto, action "restart" failed.
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
   Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: signal) since Sun 2019-09-22 02:57:45 EDT; 200ms ago
     Docs: man:mosquitto.conf(5)
           man:mosquitto(8)
  Process: 28178 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=killed, signal=SEGV)
 Main PID: 28178 (code=killed, signal=SEGV)

Sep 22 02:57:45 pihole systemd[1]: mosquitto.service: Service RestartSec=100ms expired, scheduling restart.
Sep 22 02:57:45 pihole systemd[1]: mosquitto.service: Scheduled restart job, restart counter is at 1.
Sep 22 02:57:45 pihole systemd[1]: Stopped Mosquitto MQTT v3.1/v3.1.1 Broker.
dpkg: error processing package mosquitto (--configure):
 installed mosquitto package post-installation script subprocess returned error exit status 1
Processing triggers for systemd (241-7~deb10u1+rpi1) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10+rpi1) ...
Errors were encountered while processing:
 mosquitto
E: Sub-process /usr/bin/dpkg returned an error code (1)
Running mosquitto manually:
$ /usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
Segmentation fault
/etc/mosquitto/mosquitto.conf contents:
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /var/run/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

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

include_dir /etc/mosquitto/conf.d

Duplicate issue #1455: Cannot install MQTT Raspi 0
Created: 2019-10-11T11:31:17Z
Hi all!
It's been days I have been trying to install MQTT on my raspi with stretch on it. The installation always spits and error, I attach the log:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libev4 libmosquitto1 libuv1 libwebsockets8
Suggested packages:
apparmor
The following NEW packages will be installed:
libev4 libmosquitto1 libuv1 libwebsockets8 mosquitto mosquitto-clients
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 540 kB of archives.
After this operation, 1,114 kB of additional disk space will be used.
Get:1 http://archive.raspberrypi.org/debian stretch/main armhf libuv1 armhf 1.18.0-3bpo9+1 [86.3 kB]
Get:3 http://archive.raspberrypi.org/debian stretch/main armhf libwebsockets8 armhf 2.0.3-2+b1rpt1 [85.2 kB]
Get:2 http://mirror.serverius.net/raspbian/raspbian stretch/main armhf libev4 armhf 1:4.22-1 [34.0 kB]
Get:4 https://repo.mosquitto.org/debian stretch/main armhf libmosquitto1 armhf 1.6.7-0mosquitto1stretch1 [71.0 kB]
Get:5 https://repo.mosquitto.org/debian stretch/main armhf mosquitto armhf 1.6.7-0mosquitto1stretch1 [174 kB]
Get:6 https://repo.mosquitto.org/debian stretch/main armhf mosquitto-clients armhf 1.6.7-0mosquitto1stretch1 [89.0 kB]
Fetched 540 kB in 1s (300 kB/s)
Selecting previously unselected package libev4.
(Reading database ... 81051 files and directories currently installed.)
Preparing to unpack .../0-libev4_1%3a4.22-1_armhf.deb ...
Unpacking libev4 (1:4.22-1) ...
Selecting previously unselected package libmosquitto1:armhf.
Preparing to unpack .../1-libmosquitto1_1.6.7-0mosquitto1stretch1_armhf.deb ...
Unpacking libmosquitto1:armhf (1.6.7-0mosquitto1stretch1) ...
Selecting previously unselected package libuv1:armhf.
Preparing to unpack .../2-libuv1_1.18.0-3bpo9+1_armhf.deb ...
Unpacking libuv1:armhf (1.18.0-3bpo9+1) ...
Selecting previously unselected package libwebsockets8:armhf.
Preparing to unpack .../3-libwebsockets8_2.0.3-2+b1rpt1_armhf.deb ...
Unpacking libwebsockets8:armhf (2.0.3-2+b1rpt1) ...
Selecting previously unselected package mosquitto.
Preparing to unpack .../4-mosquitto_1.6.7-0mosquitto1stretch1_armhf.deb ...
Unpacking mosquitto (1.6.7-0mosquitto1stretch1) ...
Selecting previously unselected package mosquitto-clients.
Preparing to unpack .../5-mosquitto-clients_1.6.7-0mosquitto1stretch1_armhf.deb ...
Unpacking mosquitto-clients (1.6.7-0mosquitto1stretch1) ...
Setting up libev4 (1:4.22-1) ...
Setting up libuv1:armhf (1.18.0-3bpo9+1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for systemd (232-25+deb9u12) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libmosquitto1:armhf (1.6.7-0mosquitto1stretch1) ...
Setting up libwebsockets8:armhf (2.0.3-2+b1rpt1) ...
Setting up mosquitto-clients (1.6.7-0mosquitto1stretch1) ...
Setting up mosquitto (1.6.7-0mosquitto1stretch1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/mosquitto.service → /lib/systemd/system/mosquitto.service.
Job for mosquitto.service failed because a fatal signal was delivered to the control process.
See "systemctl status mosquitto.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mosquitto, action "start" failed.
● mosquitto.service - Mosquitto MQTT v3.1/v3.1.1 Broker
Loaded: loaded (/lib/systemd/system/mosquitto.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: signal) since Fri 2019-10-11 12:23:01 BST; 114ms ago
Docs: man:mosquitto.conf(5)
man:mosquitto(8)
Process: 2478 ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf (code=killed, signal=SEGV)
Main PID: 2478 (code=killed, signal=SEGV)
Oct 11 12:23:01 raspberrypi systemd[1]: mosquitto.service: Failed with resul…l'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package mosquitto (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.24-11+deb9u4) ...
Processing triggers for systemd (232-25+deb9u12) ...
Errors were encountered while processing:
mosquitto
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to google around, but nothing. Can you help me please? Many thanks!

Closing comment (2019-10-28T10:17:24Z): Duplicate of #1419