Hi!
Did you observe the memory consumption and number of open file descriptors after each read/write, and it didn't increase?
I have another timeslot tonight when I will reproduce it. Unfortunately the device is still in use in a pump-house 350km away, so no local access at the moment. I will try to get hold of another device to test with.
I'm not sure I can get the troubleshoot file though, since the UI is half-broken even after killing and restarting some services, but I will try.
For reference, here is the small C application I have been using to reproduce it:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <modbus/modbus.h>
int main(int argc, char *argv[]) {
modbus_t *mb;
int reg_addr = 0;
uint16_t reg_val = 0;
int reg_count = 0;
if (argc != 4) {
printf("Usage: %s <hostname> <register> <read_count>\n", argv[0]);
return -1;
}
reg_addr = atoi(argv[2]);
reg_count = atoi(argv[3]);
int i;
for (i=0; i<reg_count; i++) {
mb = modbus_new_tcp(argv[1], 502);
modbus_set_slave(mb, 1);
modbus_connect(mb);
modbus_read_registers(mb, reg_addr, 1, ®_val);
modbus_close(mb);
modbus_free(mb);
sleep(1);
}
return 0;
}