Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Mosquitto » High Resources Mosquitto Pub(Unknown problem with mosquitto pub)
High Resources Mosquitto Pub [message #1843229] Tue, 20 July 2021 21:42
Patrich Tivoli is currently offline Patrich TivoliFriend
Messages: 1
Registered: July 2021
Junior Member
Hi everyone,

in this days I was running some experiments on mosquitto, mosquitto_pub and mosquitto_sub.

Description of the event:
In local I installed mosquitto 1.6.9 from the offical Ubuntu repository and then I installed mosquitto-clients (mosuqitto_pub and mosquitto_sub) always from the official Ubuntu repository through apt-get.

Then, I made a new configuration file with this exact content:

pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
per_listener_settings true
allow_anonymous false
log_type all
cafile /home/ca.crt
keyfile /home/server.key
certfile /home/server.crt
require_certificate true
use_identity_as_username true

Then, I decided to run mosquitto:
service mosquitto start

After that, always in localhost, I tried to publish a message:
mosquitto_pub --cafile /home/ca.crt --cert /home/client.crt --key /home/client.key -d -h 127.0.0.1 -p 1883 -t temp -m 25 --insecure

Everything was working in a perfect way but then I decided to change the mosquitto.conf file in this way:
pid_file /var/run/mosquitto.pid
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
per_listener_settings true
allow_anonymous false
log_type all

I restarted mosquitto and finally I tried to publish a message in the exact same way I did before:
mosquitto_pub --cafile /home/ca.crt --cert /home/client.crt --key /home/client.key -d -h 127.0.0.1 -p 1883 -t temp -m 25 --insecure

I know that it doesn't have any sense trying to publish a message with certificates despite I put a configuration file which doesn't ask for it but I expected an error or something like that.

Result:
mosquitto_pub printed
Client mosq-0sGd7aKRnfNgaXv3EU sending CONNECT
mosquitto_pub after that doesn't print anything else but suddenly the requested resources start increasing and one core of my CPU reaches 100% according to the System Monitor (in fact my fans increase their speed).
Then, when I kill the program everything come back to the normality.

Debugging:
I downloaded mosquitto from git so that I was able to compile the program manually and I obtained the same exact result.
When I used GDB it gives me this error right after killing the process:
0x00007fa50dc2c1db in __pselect (nfds=6, readfds=0x7ffc49835270,
writefds=0x7ffc498352f0, exceptfds=0x0, timeout=<optimized out>,
sigmask=0x0) at ../sysdeps/unix/sysv/linux/pselect.c:48
48 ../sysdeps/unix/sysv/linux/pselect.c: No such file or directory.

My question is:
GDB tells me this problem but it seems quite strange that when this problem happens I don't receive any error and one of my core remains full until I don't kill it.
Should I report this problem on Bugzilla?

Thanks a lot for your kind answers!
Previous Topic:Latency of Mqtt Messages
Next Topic:Certbot (Lets Encrypt) leaves Mosquitto service dead
Goto Forum:
  


Current Time: Fri May 03 00:01:40 GMT 2024

Powered by FUDForum. Page generated in 0.02307 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top