eclipse-mosquitto / mosquitto

Eclipse Mosquitto - An open source MQTT broker
https://mosquitto.org
Other
9.08k stars 2.4k forks source link

Broker crash while writing to mosquitto.db #2726

Open mharmonsls opened 1 year ago

mharmonsls commented 1 year ago

Mosquitto v1.6.12 on Windows Server 2019

I hope this is the appropriate venue, i tried creating an account for the mailing list but continually ran into issues.

Our Mosquitto broker crashed this morning while attempting to write to the mosquitto.db. The database is written to every 30 minutes and the broker had low traffic since the last time it was written to (~500-1000 messages). I don't have the exact size during the outage but our mosquitto.db file generally stays around 10-20KB.

Please let me know if there is any additional information required.

Event Message: 1/13/2023 11:11:07 AM

Faulting application name: mosquitto.exe, version: 0.0.0.0, time stamp: 0x5fb3b1cf Faulting module name: ucrtbase.dll, version: 10.0.17763.1490, time stamp: 0x48ac8393 Exception code: 0xc0000005 Fault offset: 0x000000000004621a Faulting process id: 0xc24 Faulting application start time: 0x01d92700d4e099af Faulting application path: C:\Program Files\mosquitto\mosquitto.exe Faulting module path: C:\windows\System32\ucrtbase.dllReport Id: 48d4baaa-0eec-45f1-9590-2e112c3262ce Faulting package full name: Faulting package-relative application ID:

Last events to be logged:

mosquitto.log:112985:2023-01-13T11:11:05: Sending PINGRESP to A mosquitto.log:112986:2023-01-13T11:11:06: Received PINGREQ from B mosquitto.log:112987:2023-01-13T11:11:06: Sending PINGRESP to B mosquitto.log:112988:2023-01-13T11:11:07: Received PINGREQ from C mosquitto.log:112989:2023-01-13T11:11:07: Sending PINGRESP to C mosquitto.log:112990:2023-01-13T11:11:07: Saving in-memory database to C:\Program Files\mosquitto\mosquitto.db.

mharmonsls commented 1 year ago

We have updated this broker to 2.0.15 and are still seeing this issue.

RoboMagus commented 1 year ago

Looks like I've experienced the same issue last night as well. First time I'm seeing this.

Log:

...

2023-09-08T05:52:42: Sending PUBLISH to mqttjs_33ab98ba (d0, q0, r0, m0, 'zigbee2mqtt/Koelkast', ... (138 bytes))
2023-09-08T05:52:42: Sending PUBLISH to mqtt-explorer-7ecf068b (d0, q0, r0, m0, 'zigbee2mqtt/Koelkast', ... (138 bytes))
2023-09-08T05:52:49: Received PUBLISH from mqttjs_33ab98ba (d0, q0, r0, m0, 'zigbee2mqtt/Sonoff_ZBmini_Zolder', ... (33 bytes))
2023-09-08T05:52:49: Sending PUBLISH to 7cH3lPRBqs28fWxdcQRzj1 (d0, q0, r0, m0, 'zigbee2mqtt/Sonoff_ZBmini_Zolder', ... (33 bytes))
2023-09-08T05:52:49: Sending PUBLISH to mqttjs_33ab98ba (d0, q0, r0, m0, 'zigbee2mqtt/Sonoff_ZBmini_Zolder', ... (33 bytes))
2023-09-08T05:52:49: Sending PUBLISH to mqtt-explorer-7ecf068b (d0, q0, r0, m0, 'zigbee2mqtt/Sonoff_ZBmini_Zolder', ... (33 bytes))
2023-09-08T05:52:49: Saving in-memory database to /mosquitto/data//mosquitto.db.
2023-09-08T07:37:05: mosquitto version 2.0.17 starting
2023-09-08T07:37:05: Config loaded from /mosquitto/config/mosquitto.conf.
2023-09-08T07:37:05: Warning: File /mosquitto/config/mosquitto.passwd has world readable permissions. Future versions will refuse to load this file.
2023-09-08T07:37:05: Opening ipv4 listen socket on port 1883.
2023-09-08T07:37:05: Opening ipv6 listen socket on port 1883.
2023-09-08T07:37:05: Warning: Address family not supported by protocol
2023-09-08T07:37:05: Opening ipv4 listen socket on port 8883.
2023-09-08T07:37:05: Opening ipv6 listen socket on port 8883.
2023-09-08T07:37:05: Warning: Address family not supported by protocol
2023-09-08T07:37:05: mosquitto version 2.0.17 running
2023-09-08T07:37:06: New connection from 172.18.0.1:33542 on port 1883.
2023-09-08T07:37:06: New client connected from 172.18.0.1:33542 as 00Eah8oYykodl79OwCr0k3 (p2, c1, k60, u'mqtt_hass_usr').
2023-09-08T07:37:06: Will message specified (7 bytes) (r0, q0).
2023-09-08T07:37:06:    homeassistant/status

...

Running Mosquitto 2.0.17 in Docker on a RaspberryPi4.