modemDaemon

Good day!
We noticed that the modemDaemon consumes more and more memory with every hour of work. The growth rate is about 1 MB per hour. Accordingly, after a while it takes up all the RAM. What can lead to this behavior?

how do you know about this?
Any command you used to verify this on WP module?

For example top, after a cold start of the system, modemDaemon takes 2.1% of RAM (~ 2000 Kib). After 23 hours of operation, modemDaemon takes up 11.7% of RAM (17852 Kib).
screen_2020-10-23_09-30-45

Which module and fw are you using

I don’t see the modemDaemon in “top” command after “cm data connect &”.
Is this only happening to your FW?

I am using this FW:

root@fx30:~# cm info
Device: WP8548
IMEI: 359377060004735
IMEISV: 2F
FSN: LL537500110203
Firmware Version: SWI9X15Y_07.13.07.00 92cfd2c jenkins 2018/08/22 19:18:52
[ 138.538806] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1363c8, irq:187
Bootloader Version: SWI9X15Y_07.13.07.00 92cfd2c jenk[ 138.545582] qup_i2c qup_i2c.0: I2C slave addr:0x3a not connected
ins 2018/08/22 19:18:39
MCU Version: 002.004
PRI Part Number (PN): 9904889
PRI Revision: 01.11
Carrier PRI Name: ATT
Carrier PRI Revision: 001.036_000
SKU: 1102621
Last Reset Cause: Unknown
Resets Count: Expected: 0 Unexpected: 0
root@fx30:~#
root@fx30:~# legato version
18.06.4_a2b118ed13919cebd20f9d71e8810748

Rolled back Legato to 18.06.4:
root# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
768 ? Sl 0:00 4 5 85206 3904 2.5 modemDaemon
1655 pts/0 S+ 0:00 0 589 1706 512 0.3 grep modem

I don’t see the memory is increasing :

root@fx30:~#
root@fx30:~# cm info
Device: WP8548
IMEI: 359377060004735
IMEISV: 2F
FSN: LL537500110203
Firmware Version: SWI9X15Y_07.13.07.00 92cfd2c jenkins 2018/08/22 19:18:52
Bootloader Version: SWI9X15Y_07.13.07.00 92cfd2c jenkins 2018/08/22 19:18:39
[ 4554.091194] qup_i2c qup_i2c.0: QUP: I2C status flags :0x1300c8, irq:187
[ 4554.097847] qup_i2c qup_i2c.0: I2C slave addr:0x3a not connected
MCU Version: 002.004
PRI Part Number (PN): 9904889
PRI Revision: 01.11
Carrier PRI Name: ATT
Carrier PRI Revision: 001.036_000
SKU: 1102621
Last Reset Cause: Unknown
Resets Count: Expected: 0 Unexpected: 0
^[[Aroot@fx30:~#
root@fx30:~# date
Fri Oct 23 07:35:32 UTC 2020
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
9424 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# legato version
18.06.4_a2b118ed13919cebd20f9d71e8810748
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
9578 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
10290 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
10638 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# cm radio
Power: ON
Current Network Operator: 1O1O
Current RAT: UMTS network (LE_MRC_RAT_UMTS)
Status: Registered, home network (LE_MRC_REG_HOME)
Signal: Good signal strength (3)
PS: Packet Switched Registered, home network (LE_MRC_REG_HOME)

root@fx30:~#
root@fx30:~#
root@fx30:~# cm data
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: no
root@fx30:~#
root@fx30:~# cm data connect &
root@fx30:~#
root@fx30:~# cm data connect &'Setting up profile 1
Connecting …
root@fx30:~#
root@fx30:~# ok
[ 5263.500808] Alignment trap: netmgrd (822) PC=0x4d374280 Instr=0xe1c980d0 Address=0xb67f0ed6 FSR 0x001
[ 5263.509048] Alignment trap: netmgrd (822) PC=0x4d374284 Instr=0xe1c320d0 Address=0xb67f0ede FSR 0x001

root@fx30:~#
root@fx30:~# Checking if device ‘rmnet0’ is up … ok
Routing inet … ok
mv: can’t remove ‘/etc/resolv.conf’: Device or resource busy
Updating /etc/resolv.conf … ok
Updating /etc/resolv.conf … ok
Testing connection … Checking if device ‘rmnet0’ is up … ok
Routing inet … ok
mv: can’t remove ‘/etc/resolv.conf’: Device or resource busy
Testing connection …
root@fx30:~#
root@fx30:~# cm data
Index: 1
APN: hkcsl
PDP Type: IPV4
Connected: yes
Interface: rmnet0
Family[IPv4]: inet
IP[IPv4]: 10.128.69.186
Gateway[IPv4]: 10.128.69.185
Dns1[IPv4]: 10.145.148.1
Dns2[IPv4]: 10.144.148.133
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
10843 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# failed
failed
[ 7243.633388] Alignment trap: netmgrd (822) PC=0x4d374280 Instr=0xe1c980d0 Address=0xb67f0ed6 FSR 0x001
[ 7243.642422] Alignment trap: netmgrd (822) PC=0x4d374284 Instr=0xe1c320d0 Address=0xb67f0ede FSR 0x001

[2]+ Done(1) cm data connect
[1]+ Done(1) cm data connect
root@fx30:~#
root@fx30:~# ps -A v | grep modem
19 ? S< 0:00 0 0 0 0 0.0 [modem_notifier]
759 ? Sl 0:01 4 5 85206 4048 2.6 modemDaemon
14536 ttyHSL1 S+ 0:00 0 589 1706 520 0.3 grep modem
root@fx30:~#
root@fx30:~# date
Fri Oct 23 08:21:34 UTC 2020

Indeed, when cm data connect, ping data, netcat does not increase the modemDaemon’s RAM.
We will continue the tests, something may become clear.

yes, at least with the correct reproducible steps.

The solution was found. One of our modules regularly called le_temp_Request (“POWER_CONTROLLER”) and le_temp_Request (“POWER_AMPLIFIER”), which caused le_temp to allocate memory for the le_temp_Sensor structure each time.
Thanks everyone for the help.