I’m facing problems with Segmentation faults on the mempool functionality. I already did a bugreport on github: https://github.com/librenms/librenms/issues/13214 . But seems that’s not the correct way
The problem
I moved my LibreNMS instance to a new server (RHEL 7 to RHEL 8) everything runs ok. But the discovery (PHP actually) process is constantly segfaulting on the mempool module on random hosts.
Also the memory graphs seems not be filled.
When I disable the Mempool module it does not segfaults.
So far I tried:
- Disabling SElinux
- Switched between PHP 7.3, 7.4 and 8.0
- Disable/Enable Mempool
Output of ./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 21.8.0-41-g0a76ca444
DB Schema | 2021_25_01_0129_isis_adjacencies_nullable (217)
PHP | 7.3.29
Python | 3.6.8
MySQL | 10.6.4-MariaDB
RRDTool | 1.7.0
SNMP | NET-SNMP 5.8
====================================
[OK] Composer Version: 2.1.6
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct```
What was the last working version of LibreNMS?
No response
Anything in the logs that might be useful for us?
While running with -d and Xdebug (xdebug only enabled because of the segfault!) these are the last lines:
SNMP['/usr/bin/snmpget' '-v2c' '-c' 'COMMUNITY' '-OQUv' '-m' 'HOST-RESOURCES-MIB' '-M' '/var/path/website/html/webroot/librenms/mibs' 'udp:HOSTNAME:161' 'hrMemorySize.0']
3823388
Free memory adjusted by availability calculation: 1004.2 MiiB -> 2 GiiB
SQL[select * from `mempools` where `mempools`.`device_id` = ? and `mempools`.`device_id` is not null [628] 0.53ms]
SQL[update `mempools` set `mempool_perc` = ?, `mempool_used` = ?, `mempool_used_oid` = ?, `mempool_free` = ? where `mempool_id` = ? [45,1764937728,".1.3.6.1.2.1.25.2.3.1.6.1",2150211584,1753] 1.41ms]
Updated data:
array (
'mempool_perc' => 45.0,
'mempool_used' => 1764937728,
'mempool_used_oid' => '.1.3.6.1.2.1.25.2.3.1.6.1',
'mempool_free' => 2150211584,
)
SQL[update `mempools` set `mempool_class` = ?, `mempool_perc` = ?, `mempool_used` = ?, `mempool_used_oid` = ?, `mempool_free` = ? where `mempool_id` = ? ["virtual",46,3739041792,".1.3.6.1.2.1.25.2.3.1.6.3",4471070720,1754] 0.97ms]
Updated data:
array (
'mempool_class' => 'virtual',
'mempool_perc' => 46.0,
'mempool_used' => 3739041792,
'mempool_used_oid' => '.1.3.6.1.2.1.25.2.3.1.6.3',
'mempool_free' => 4471070720,
)
Mempool class changed Virtual memory (1754)
Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames {"exception":"[object] (Error(code: 0): Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames at /var/path/website/html/webroot/librenms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php:1322)"}