[gelöst] PERL WARNING wegen Filehandle

Begonnen von Kristof, 27 Juni 2022, 16:51:50

Vorheriges Thema - Nächstes Thema

Kristof

Hallo Forum,

ich habe seit geraumer Zeit immer wieder viele Zeilen wie diese in meinem Log:
2022.06.25 07:45:19 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.25 07:45:19 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.25 07:45:19 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.25 07:45:19 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.25 07:45:19 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.


Leider finde ich nirgends einen Hinweis, wo das herkommt oder was ich zu tun habe. Kann mir einer von Euch helfen?

Gruß
Kristof

jhohmann

Deine Karte ist voll!
Wo das herkommt, ist dann eigentlich egal.
Raspberry Pi 4 - bookworm / EnOcean - Rollo+Licht, deCONZ - Licht+Sensoren, ZWave - CO Messung, HMCCU mit piVCCU - Heizung+Rollo
plus dovecot, minidlna

betateilchen

Zitat von: jhohmann am 27 Juni 2022, 18:47:22
Deine Karte ist voll!

Kann man glauben, muss man aber nicht. Bis jetzt wissen wir überhaupt nicht, um welche Art physischen Speicher es sich handelt.

Zitat von: jhohmann am 27 Juni 2022, 18:47:22
Wo das herkommt, ist dann eigentlich egal.

Nein. "wo das herkommt" ist genau die Frage, die man klären sollte, um vielleicht eine passende Lösung zu finden.

Aber im Moment gibt es in diesem Thread nicht genug sinnvolle Informationen, um wirklich weiterhelfen zu können.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Kristof

#3
Hallo zusammen,

das fhem läuft auf einem Raspberry Pi. Ein df -h ergibt folgendes:
pi@fhem:~ $ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.3G  2.9G  4.1G  42% /
devtmpfs        459M     0  459M   0% /dev
tmpfs           464M     0  464M   0% /dev/shm
tmpfs           464M   12M  452M   3% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           464M     0  464M   0% /sys/fs/cgroup
/dev/mmcblk0p1   41M   23M   19M  55% /boot
tmpfs            93M     0   93M   0% /run/user/1000


Datenträger ist eine SD-Karte.

top wirft in den ersten Zeilen folgendes aus:
top - 21:59:12 up 44 days, 23:24,  1 user,  load average: 0.00, 0.00, 0.00
Tasks: 104 total,   1 running,  53 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.6 us,  0.2 sy,  0.0 ni, 99.2 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem :   948308 total,   266444 free,    81684 used,   600180 buff/cache
KiB Swap:   102396 total,    59388 free,    43008 used.   807936 avail Mem


Was kann ich sonst noch an Befehlen absetzen, um der Ursache näher zu kommen?

Kristof

Wie man in untenstehendem Log sehen kann, kommt die Meldung sehr häufig am Stück, dann aber auch tageweise gar nicht?!

2022.06.27 12:24:11 3: Login denied via myMQTTServer
2022.06.27 12:24:11 3: Login denied via myMQTTServer_27.124.32.149_60040
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN163998 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN163999 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.27 16:06:38 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN163998 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN163999 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.27 16:33:44 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN163998 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN163999 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.27 16:34:02 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN163998 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN163999 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.27 16:34:04 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.
2022.06.27 17:07:47 3: Telefon number: xxxxxxx Anrufer: XXX Anrufer Nummer: xxxxxxx
2022.06.27 17:46:13 3: Telefon number: xxxxxxx Anrufer: XXX Anrufer Nummer: xxxxxxx
2022.06.27 17:57:04 2: WaschmaschineBetriebCheck: set WaschmaschineBetrieb off;  {DebianMailnbl('xxxxxxx.xxxxxxx@gmx.net','🏁 Waschmaschine ist fertig','Die Waschmaschine kann ausgeräumt werden.');;}: HASH(0x54661a0)
2022.06.27 17:57:06 3: Debianmail - sendemail returned: Jun 27 17:57:06 fhem sendemail[11962]: Email was sent successfully!
2022.06.27 19:53:34 2: TrocknerBetriebCheck: set TrocknerBetrieb off;  {DebianMailnbl('xxxxxxx.xxxxxxx@gmx.net','✅ Trockner ist fertig','Der Trockner kann ausgeräumt werden.');;}: HASH(0x5386a78)
2022.06.27 19:53:35 3: Debianmail - sendemail returned: Jun 27 19:53:35 fhem sendemail[13489]: Email was sent successfully!
2022.06.27 21:53:03 3: CUL_HM set Flur_Licht1 on-for-timer 60
2022.06.27 22:13:30 3: CUL_HM set EZ_Rollladen off noArg
2022.06.28 00:25:54 3: TelegramBot_Callback Telegram: Digest: Number of poll failures on 2022-06-27 is :40:
2022.06.28 06:00:00 3: CUL_HM set EZ_Rollladen on noArg
2022.06.28 09:10:20 3: Login denied via myMQTTServer
2022.06.28 11:05:12 3: Telefon number: 1743273 Anrufer: unknown Anrufer Nummer: xxxxxxx
2022.06.28 17:39:52 3: Login denied via myMQTTServer
2022.06.28 17:39:52 3: Login denied via myMQTTServer_65.49.20.68_53190
2022.06.28 19:39:04 3: Login denied via myMQTTServer
2022.06.28 19:39:04 3: Login denied via myMQTTServer_162.142.125.10_60542
2022.06.28 20:05:53 1: [Shelly_status] device ShellyKeller1 has error connect to http://xxxxxxx:80 timed out
2022.06.28 22:01:49 3: CUL_HM set Stecker1 toggle noArg
2022.06.28 22:13:23 3: CUL_HM set EZ_Rollladen off noArg
2022.06.28 22:34:10 3: CUL_HM set Stecker1 toggle noArg
2022.06.29 00:19:08 3: TelegramBot_Callback Telegram: Digest: Number of poll failures on 2022-06-28 is :39:
2022.06.29 06:00:00 3: CUL_HM set EZ_Rollladen on noArg


Welche Daten kann/muss ich noch bereitstellen, um der Ursache weiter auf die Schliche zu kommen?

betateilchen

Zitat von: Kristof am 29 Juni 2022, 10:33:05
Welche Daten kann/muss ich noch bereitstellen, um der Ursache weiter auf die Schliche zu kommen?

attr global stacktrace 1

und dann schauen, was im Umfeld so einer Meldung im Log steht.
-----------------------
Formuliere die Aufgabe möglichst einfach und
setze die Lösung richtig um - dann wird es auch funktionieren.
-----------------------
Lesen gefährdet die Unwissenheit!

Wernieman

#6
Und wie die Inodes aussehen, denn auch die können "vollaufen":
df -i

Edit:
Was mir noch so eingefallen ist:

Und wie viele Dateien hat eigentlich der User fhem offen?
lsof -u fhem | wc -l

Aber eigentlich am Wichtigsten:
Kannst Du uns etwas über Deine Plattform erzählen? Hardware/Betriebsystem(Version)/Umgebung etc ...
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Kristof

Ich danke für Eure Unterstützung!!

Den Stacktrace habe ich aktiviert und FHEM neu gestartet. Und hatte auch gleich wieder "meine" Meldungen:
2022.06.29 21:10:28 3: Login denied via myMQTTServer_167.94.138.63_49802
2022.06.29 21:32:05 0: Server shutdown
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN163998 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN163999 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN168017 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN164035 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN164000 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN168005 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:07 1: PERL WARNING: Warning: unable to close filehandle GEN164001 properly: No space left on device during global destruction.
2022.06.29 21:32:07 1: stacktrace:
2022.06.29 21:32:07 1:     main::__ANON__                      called by fhem.pl (0)
2022.06.29 21:32:10 1: Including fhem.cfg
2022.06.29 21:32:10 3: telnetPort: port 7072 opened


Ein "df -i" hat folgendes ergeben:
pi@fhem:~ $ sudo df -i
Filesystem     Inodes IUsed  IFree IUse% Mounted on
/dev/root      466336 56877 409459   13% /
devtmpfs       117386   366 117020    1% /dev
tmpfs          118538     1 118537    1% /dev/shm
tmpfs          118538   410 118128    1% /run
tmpfs          118538     3 118535    1% /run/lock
tmpfs          118538    12 118526    1% /sys/fs/cgroup
/dev/mmcblk0p1      0     0      0     - /boot
tmpfs          118538    10 118528    1% /run/user/1000


Das "lsof -u fhem | wc -l" ergab:
pi@fhem:~ $ lsof -u fhem | wc -l
5



FHEM läuft auf einem Raspberry Pi 2 Model B Rev 1.1
unter Raspbian GNU/Linux 9.13 (stretch), Kernel Version 4.19.66-v7+
Der Pi ist per LAN am Switch.
Die Homematic-Komponenten werden mit einem HM-MOD-RPI-PCB angesprochen.

Gruß
Kristof

Wernieman

Was mir bei solchen "Ungeklärten" Fehlern beim Pi immer einfällt: Wie alt ist die SD?
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Kristof

Zitat von: Wernieman am 30 Juni 2022, 07:59:06
Was mir bei solchen "Ungeklärten" Fehlern beim Pi immer einfällt: Wie alt ist die SD?
Ich habe lange gesucht nach einer Software, die den "Health Status" der SD-Karte auslesen kann. Aber offenbar ist sowas in der Spezifikation für SD-Karten gar nicht vorgesehen. Jedenfalls habe ich kein brauchbares Tool gefunden. Kennt ihr eines?

Immerhin konnte ich das Produktionsdatum auslesen:
pi@fhem:~ $ cat /sys/block/mmcblk0/device/date
10/2015

:o
Habe die Karte geklont und beobachte jetzt mal weiter das Log. Wenn die Meldung wieder auftritt, werde ich es hier posten. Wenn ich bis zum Sonntag keine neuen Fehlermeldungen habe, schreibe ich noch einen kurzen Kommentar und schließe den Thread.

Bis hierhin schonmal Danke für eure Anregungen!

Wernieman

Habe zu defekten SD-Card hier im Forum schon mal gepostet. Das Blöde: Wenn sie defekt, ist auch ein Clone der defekten SD nicht korrekt. Hatte auch eine definitiv defekte SD-Card, wo selbst ein fsck keine Fehler gefunden hatte.

Kurzgefasst:
Es gibt keine gute Möglichkeit zu prüfen, ob eine SD-Card noch O.K. ist (Außer komplett beschreiben). Und wenn Sie defekt, dann ist ein Dump dieser auch defekt.
- Bitte um Input für Output
- When there is a Shell, there is a Way
- Wann war Dein letztes Backup?

Wie man Fragen stellt: https://tty1.net/smart-questions_de.html

Kristof

#11
Tatsächlich: welcher Prozess auch immer warum genau sich im Log beschwert hat über fehlenden Platz - seit dem Klonen der SD-Karte ist Ruhe im Log :-)
Ich scheine also vielleicht Glück gehabt zu haben und der Fehler der alten SD-Karte wurde beim Kopieren nicht auf die neue dupliziert. Egal wie: Problem behoben - mein Dank an die Tippgeber!