(Gelöst)memory leak fhem.pl Speicherbedarf wächst kontinuierlich an

Begonnen von schka17, 20 September 2014, 17:36:03

Vorheriges Thema - Nächstes Thema

schka17

Stimmt, habe übersehen dass ich es in dieser fhemweb Instanz so konfiguriert habe. Bin jetzt gerade dabei fhem in der version vom 15.9. zu testen, allerdings mit meiner aktuellen config. Jetzt nach ein paar Minuten sieht es leider so aus dass es damit genauso einen kontinuierlichen Speicherverbrauch gibt. Werde das noch weiter beobachten und dann mal analysieren welche Unterschiede in der config gibt.


Sent from my iPad using Tapatalk
M: Thinclient x64 Debian | CUL FS20, HMS100WD, HMS100TF, HMS100T, HMS100CO, S300, S555TH | OWServer DS1420, DS18B20, DS2408 | RFXCOM UVN128, THWR800, THGR228N,RTGR328, PCR800 |Jeelink PCA301 EC3000|CUNO+IR|HMLAN|HMUSB|CUL433 Somfy|mySensors|espEasy
S1:Raspberry mit BPM810, Jeelink EC3000

AHA1805

Hallo,

was war letzt endlich das Problem?
Ich habe auch irgendwo ein Speicherloch?

Und bin gerade am suchen nach der Ursache.

Gruss Hannes

Gesendet von Tapatalk

AHA 1805 RIP 29.08.2016 --> RUHE IN FRIEDEN
In Gedanken Bei dir HANNES
Dein Bruder Gerd (Inputsammler) Vermisst dich Hannes (AHA1805)

schka17

Hallo Hannes,
Die Ursache habe ich leider niemals herausgefunden, aber nach Umstieg auf ein anderes System (mit 2GB Ram) habe ich zumindest keine Abstürze mehr, ausser ab und zu mal mit "too many files open",. Einmal im Monat restart, dann läuft es.

Gruß

Karl


Sent from my iPad using Tapatalk
M: Thinclient x64 Debian | CUL FS20, HMS100WD, HMS100TF, HMS100T, HMS100CO, S300, S555TH | OWServer DS1420, DS18B20, DS2408 | RFXCOM UVN128, THWR800, THGR228N,RTGR328, PCR800 |Jeelink PCA301 EC3000|CUNO+IR|HMLAN|HMUSB|CUL433 Somfy|mySensors|espEasy
S1:Raspberry mit BPM810, Jeelink EC3000

AHA1805

Hallo Karl,

danke für die schnelle Antwort.
Das ist schade, ich hatte bis August, dass System am Laufen ohne irgendwelche Speicher zuwächse.
Z.T. ist FHEM bis zu 150 Tage ohne neustart gelaufen.

Mal schauen, vielleicht spiel ich einfach mal das Backup vom August rein und schau mal, ob es dann wieder weg ist.


Gruß Hannes
AHA 1805 RIP 29.08.2016 --> RUHE IN FRIEDEN
In Gedanken Bei dir HANNES
Dein Bruder Gerd (Inputsammler) Vermisst dich Hannes (AHA1805)

u302320

Ich beobachte auf meinem System (Fritzbox 7390, aktuelle FHEM-Version) ebenfalls ungefähr seit dem 10. Oktober massive Speicher-Probleme. Bei mir gibt es typischerweise einige PRESENCE-Warnungen, danach folgen die Fork-Probleme (Cannot allocate memory). Da das Problem erstmalig während meines Urlaubs (wann sonst?) auftrat bin ich mir recht sicher, dass es nicht auf Konfigurationsänderungen zurück zu führen ist. Die einzige Änderung, die FHEM bei mir jeden Morgen um 08.00 bekommt, ist ein update restart.
FHEM benötigt auf meinem Gerät typischerweise 13-14MB nach der Aufwärmphase. Der Speicherverbrauch steigt dann "irgendwann" in der Nacht sehr stark, ab 90MB Speicherauslastung (durch perl) wird die Fritzbox als solche schon sehr schlecht benutzbar. Der darauf folgende "update restart" Zyklus um 08.00 schlägt dann ebenfalls fehl, da auch hierfür fork verwendet wird.
Die Konfiguration würde ich als eher einfach einschätzen, das meiste sind FS20 und FHT-Devices, dazu noch 11x PRESENCE (3x lan-ping, 8x fritzbox), logfiles, SVG-Diagramme und einige watchdogs.

Etwas rätselhaft ist für mich, dass die Probleme laut logfile immer ungefähr um die gleiche Zeit auftreten (00.20 - 00.35). Es gibt keinen für mich offensichtlichen Zusammenhang zum Start von FHEM (wenn ich FHEM zB um 16h anhalte und neustarte, verschiebt sich der Zeitpunkt des Fehlers nach meiner Beobachtung nicht wesentlich). Zu diesem Zeitpunkt laufen auch keine besonderen Aktivitäten auf der Fritzbox (crontab) oder im Haushalt. Das einzige, was möglicherweise in diese Zeit fallen könnte, wäre das Aktualisieren der Podcast-Feeds seitens der Fritzbox, das vermutlich auch irgendwann nachts erfolgt. Ist aber gut möglich, dass ich hier auf einer falschen Spur bin. Sprang mir nur ins Auge beim Anschauen der Zeiten, zu denen der Fehler auftritt.

Leider steht auf einer Fritzbox 7390 kein Data::Serialize zur Verfügung. Gibt es andere Methoden, sich in einer laufenden FHEM-Instanz auf einer Fritzbox eine Übersicht über die Speicherbelegung zu machen? Bei dem enormen Speicherverbrauch sollte eine Analyse eigentlich trivial sein. Gibt es die theoretische Möglichkeit, dass ein signifikantes Memory-Leak beim Starten von Child-Prozessen existiert und/oder im Zusammenhang mit PRESENCE existiert? Das ist eigentlich das einzige, was FHEM bei mir wirklich regelmässig tut.

Nachfolgend ein Beispiel der nächtlichen Auflösungserscheinungen aus dem Log und ein Top am frühen Morgen des darauf folgenden Tages (ca. 06.00). Ich verstehe leider zuwenig von Perl um die Bedeutung der PRESENCE warnings einzuschätzen.

015.10.28 23:40:16 3: Watchdog wd_mini_stdby triggered
2015.10.28 23:40:16 3: FS20 set mini off
2015.10.29 00:24:58 1: PERL WARNING: Use of uninitialized value in numeric gt (>) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 655.
2015.10.29 00:28:10 1: PERL WARNING: Use of uninitialized value in numeric gt (>) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 655.
2015.10.29 00:38:40 1: PERL WARNING: Use of uninitialized value in numeric gt (>) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 655.
2015.10.29 00:43:20 1: PERL WARNING: Use of uninitialized value in numeric gt (>) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 655.
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $status in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 707.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $status in string ne at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 709.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $status in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 717.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $status in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 719.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: Cannot fork: Cannot allocate memory
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:45:58 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:47:01 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: Cannot fork: Cannot allocate memory
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 707.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 707.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in string ne at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 709.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in string ne at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 709.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 717.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 719.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 717.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $status in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 719.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:47:04 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:47:08 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:47:25 1: PERL WARNING: Use of uninitialized value $temp in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 632.
2015.10.29 00:47:25 1: PERL WARNING: Use of uninitialized value $temp in string ne at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 633.
2015.10.29 00:48:05 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:48:05 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 700.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in string eq at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 703.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $cached_name in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 728.
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in scalar chomp at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 734.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in concatenation (.) or string at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 736.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:48:08 1: PERL WARNING: Use of uninitialized value $max in pattern match (m//) at /var/media/ftp/SanDisk-CruzerContour-01/fhem/FHEM/73_PRESENCE.pm line 738.
2015.10.29 00:48:38 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:48:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:13 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:39 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:44 1: Cannot fork: Cannot allocate memory
2015.10.29 00:49:44 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
2015.10.29 00:50:15 1: Cannot fork: Cannot allocate memory
usw.

top:

Mem: 96740K used, 12512K free, 0K shrd, 492K buff, 6988K cached
CPU:   8% usr   7% sys   0% nic   0% idle  79% io   2% irq   2% sirq
Load average: 2.67 0.98 0.37 1/103 22877
  PID  PPID USER     STAT   VSZ %VSZ %CPU COMMAND
13896     1 root     D    97272  89%   8% perl /var/media/ftp/SanDisk-CruzerContour-01/fhem/fhem.pl /var/media/ftp/SanDi
  923     2 root     RW<      0   0%   3% [usb-storage]
22877 22831 root     R     1312   1%   2% top
    3     2 root     SW<      0   0%   2% [ksoftirqd/0]
1008     1 root     S     8828   8%   1% /usr/bin/vdsld ats
22829  3900 root     S     5812   5%   0% sshd: root@pts/0
   12     2 root     SW<      0   0%   0% [kswapd0]
1337     1 root     S     6632   6%   0% upnpd
2008     1 root     S <   6040   6%   0% voipd
1011     1 root     S     3836   4%   0% /usr/sbin/dsl_monitor -d
1309     1 root     S     3132   3%   0% l2tpv3d
1316     1 root     S    15440  14%   0% /usr/bin/avm/ctlmgr
1932     1 root     S     6988   6%   0% telefon a127.0.0.1
1809     1 root     S     6480   6%   0% pbd
2586  1932 root     S     5216   5%   0% dect_manager
1660     1 root     S     5112   5%   0% ddnsd
3524     1 root     S     4832   4%   0% /bin/avmike
2772     1 root     S     4784   4%   0% /sbin/feedd

rudolfkoenig

Ich wuerde verbose auf 5 stellen (vorher pruefen, ob genug Platz da ist), und einen regelmaessigen at ausfuehren, um die aktuelle FHEM-Prozessgroesse(n) einzusammeln. Dazu hatten wir hier vor ei paar Monaten schon mal eine Diskussion. Wie man sieht, habe ich nicht wirklich eine Idee. :/

u302320

Hmm. Platz ist ein Problem und, bei der Fritzbox fast noch wichtiger, USB-Geschwindigkeit. Wenn da plötzlich mit verbose 5 in 20 Files geloggt wird, ist die Box schon deshalb fast unbenutzbar.
Ich hab noch eine andere Idee, der ich erstmal nachgehen will. Wenn das nichts wird muss ich wohl in den sauren Apfel beissen und mich mal damit befassen, ob bzw wie ich Module auf der Fritzbox nachinstallieren kann. Im Wiki gabs da einen Artikel, meine ich. Oder ich schalte erst um Mitternacht auf verbose 5 um.

Ich werde berichten.

ToM_ToM

Hallo Zusammen,

ich habe jetzt vor 2 Tagen auf Perl 5.28 Rev 1 umgeswitcht und das memory leak - Problem ist bei mir nun endlich Geschichte. :)

Vorher war der RAM pro Tag um ca. 100 MB angestiegen. Jetzt seit 2 Tagen keine Veränderung außer die gelegentlichen Schwankungen +-20 MB.

VG, Thomas
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

Hollo

Zitat von: ToM_ToM am 10 Juli 2019, 21:24:39
...ich habe jetzt vor 2 Tagen auf Perl 5.28 Rev 1 umgeswitcht und das memory leak - Problem ist bei mir nun endlich Geschichte. :)
...
Mal rein aus Interesse... wie hast Du das umgestellt?
Der Banana wird ja von Armbian nicht mehr supported, ergo gibt es dafür kein Buster.
Hast Du von stretch einfach ein dist-upgrade gemacht, oder nur Perl aus anderen Quellen genommen?

Frage nur, weil ich meinen Banana Pro gerne upgraden will, ohne mir das Armbian dafür selber "builden" zu müssen .
FHEM 6.x auf RPi 3B Buster
Protokolle: Homematic, Z-Wave, MQTT, Modbus
Temp/Feuchte: JeeLink-Clone und LGW mit LaCrosse/IT
sonstiges: Linux-Server, Dreambox, "RSS-Tablet"

ToM_ToM

ZitatDer Banana wird ja von Armbian nicht mehr supported, ergo gibt es dafür kein Buster.
Wer sagt denn sowas? Kannst es doch offiziell von der Armbian-Website downloaden:
https://www.armbian.com/bananapi/

Aber du redest vermutlich vom BananaPro...

Ich habe aber um nicht alles neu installieren zu müssen, ein Upgrade meines aktuellen Systems gemacht. Erst das Testsystem und dann das Livesystem.


apt-get update
apt-get -y dist-upgrade

sed -i 's/stretch/buster/g' /etc/apt/sources.list
apt-get update
apt-get -y dist-upgrade


Anschließend musst nur die einzelnen Perl-Module wieder nachinstallieren und fertig.

VG, Thomas
Hardware: BananaPi, Busmaster CUL, SanDisk 16GB Ultra SD, 16 GB USB-Stick | Software: Armbian, FHEM 5.8

CoolTux

Du kannst auch ohne Probleme die Debian Quellen angeben für Update auf Buster.
Bekommst halt nur nicht einen aktuellen Kernel und entsprechende Tools.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

towag

In meiner Konfiguration hat sich nach dem buster upgrade das Problem nicht gelöst. Ich brauche weiterhin 2 Restarts um einen Tag zu überleben. Anbei wieder die Memory-Kurve.

Ich habe im fhem.pl diese beide Zeilen eingebaut und einen Zyklus abgewartet:

use strict;
use warnings;
use lib '.';
#####
use Devel::Leak::Object qw{ GLOBAL_bless };
$Devel::Leak::Object::TRACKSOURCELINES = 1;
####
use IO::Socket;
use IO::Socket::INET;

Das Ergebnis brachte für mich auch keinen Aufschluss auf das Problem:

Tracked objects by class:
        Calendar::Event                          248
        Class::Struct::Tie_ISA                   1
        DBD::SQLite::_WriteOnceHash              1
        DBI::var                                 5
        Device::SerialPort                       3
        Encode::Guess                            1
        Encode::Internal                         1
        Encode::Unicode                          8
        Encode::utf8                             2
        Errno                                    1
        HTTP::Config                             1
        HTTP::Headers                            1
        IO::File                                 1
        IO::Handle                               3
        IO::Socket::INET                         4
        JSON::PP::Boolean                        2
        LWP::UserAgent                           1
        POSIX::SigRt                             1
        Types::Serialiser::Error                 1

Sources of leaks:
Calendar::Event
   248 from ./FHEM/57_Calendar.pm line: 1074
Class::Struct::Tie_ISA
     1 from /usr/share/perl/5.28/Class/Struct.pm line: 30
DBD::SQLite::_WriteOnceHash
     1 from /usr/lib/arm-linux-gnueabihf/perl5/5.28/DBD/SQLite.pm line: 987
DBI::var
     5 from /usr/lib/arm-linux-gnueabihf/perl5/5.28/DBI.pm line: 316
Device::SerialPort
     2 from ./FHEM/DevIo.pm line: 425
     1 from FHEM/DevIo.pm line: 425
Encode::Guess
     1 from /usr/lib/arm-linux-gnueabihf/perl/5.28/Encode/Guess.pm line: 10
Encode::Internal
     1 from /usr/lib/arm-linux-gnueabihf/perl/5.28/Encode.pm line: 335
Encode::Unicode
     8 from /usr/lib/arm-linux-gnueabihf/perl/5.28/Encode/Unicode.pm line: 36
Encode::utf8
     2 from /usr/lib/arm-linux-gnueabihf/perl/5.28/Encode.pm line: 360
Errno
     1 from /usr/lib/arm-linux-gnueabihf/perl/5.28/Errno.pm line: 192
HTTP::Config
     1 from /usr/share/perl5/LWP/UserAgent.pm line: 834
HTTP::Headers
     1 from /usr/share/perl5/LWP/UserAgent.pm line: 777
IO::File
     1 from /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Handle.pm line: 66
IO::Handle
     3 from /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Handle.pm line: 76
IO::Socket::INET
     4 from /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Handle.pm line: 66
JSON::PP::Boolean
     1 from /usr/share/perl5/Types/Serialiser.pm line: 124
     1 from /usr/share/perl5/Types/Serialiser.pm line: 125
LWP::UserAgent
     1 from /usr/share/perl5/LWP/Simple.pm line: 28
POSIX::SigRt
     1 from /usr/share/perl/5.28/Tie/Hash.pm line: 63
Types::Serialiser::Error
     1 from /usr/share/perl5/Types/Serialiser.pm line: 126