Etwas frist Speicher VDR, Streamdev, SoftHdDevice, ffmpeg, VDPAU? VDR

  • Hallo Leute,


    ich habe es auf meinem VDR-Server auch mal getestet ... Interessanterweise scheint es bei mir damit zusammenzuhängen, ob bei softhddevice das VAAPI-Frontend attached ist oder nicht.
    Der RSS steigt permament an, bis ich um 9:32 das VAAPI-Frontend detached habe:


    Code
    220 playstation SVDRP VideoDiskRecorder 2.2.0; Mon Mar 16 09:31:56 2015; UTF-8
    900 SoftHdDevice is detached
    221 playstation closing connection


    RSS-Speicher Auslastung:



    Gruß,


    Space

  • Kann es Speicherfragmentation sein?


    Ich habe nun dummydevice http://phivdr.dyndns.org/vdr/v…vdr-dummydevice-2.0.0.tgz gebaut.
    Ich habe die Funktionen die ich normal nicht verwende auskommentiert.


    Code
    //virtual int PlayTsVideo(const uchar *Data, int Length) {return Length;}
        //virtual int PlayTsAudio(const uchar *Data, int Length) {return Length;}
        //virtual int PlayTsSubtitle(const uchar *Data, int Length) {return Length;}
    
    
        //virtual int PlayPes(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}
        //virtual int PlayTs(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}


    Code
    LANG="de_DE.UTF-8" /usr/bin/vdr -l 3 -u root -Pdummydevice -Pstreamdevclient


    Mmm vdr ist nicht plain, er enthält den mainmenuhooks Patch.


    Ich sehe einen leichten Speicheranstieg auf HD = H264.

    Code
    3581 root      20   0  424468  12288   7252 S   0.0  0.2   0:07.65 vdr
    ...
     3581 root      20   0  498200  12444   7252 S   0.0  0.2   0:11.68 vdr


    Nun läuft nicht sehr lang, könnte sich noch einpendeln.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Ein Anstieg am Anfang ist völlig normal, irgendwann muß das allerdings aufhören.


    Bei mir wächst der Speicherbedarf endlos weiter. Fragmentierung kommt als Ursache nicht in Frage, denn auch da ist irgendwann mal Schluß, da alte Blöcke schließlich wiederverwendet werden.


    Bisher habe ich nur irrelevante Leaks gefunden, da muß noch irgendwo ein größeres Problem stecken.


    Gibt es ein Tool, mit dem man Allokationen in Shared Libraries tracken kann und das vernünftige Symbolinformationen liefert?


    CU
    Oliver

  • Code
    3581 root      20   0  563736 102232   7252 S   0.0  1.3   1:19.53 vdr


    Nun ein paar Stunden später. Es wächst immer noch. (Edit: wer denkt es ist nun kleiner, es ist nun 6stellig)


    valgrind ist gut und macht es. Bei Gentoo kann ich alles mit Debuginformationen bauen.
    Dann zeigt valgrind auch alles mit schönen Namen an.


    Edit: es müsst mal noch jemand ohne streamdev testen, dann könnten wir dies auch ausschliessen.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Edit: es müsst mal noch jemand ohne streamdev testen, ...

    Hab es hier mal mit TV-Karte und auch mit SatIP getestet und es steigt auch da stetig an.

    Gruß MegaX


  • streamdev habe ich noch nie verwendet. Ich verwendet satip. Dort habe ich ein kleines Leak in Verbindung mit TinyXML gefunden. (Rolf hat es im GIT gefixt.)


    Funktioniert denn vdr mit valgrind auf dem Banana Pi noch so, dass vdr noch benutzbar ist?
    Ich experimentiere momentan mit gperftools,


    CU
    Oliver

  • Die obigen Tests waren aber auf Intel 64 Bit Archetektur.


    Wenn man softhddevice nimmt, ist die Ausgabe auch hier mit valgrind Einzelbilder und dadurch vielleicht der Leakcheck verfälscht.
    Und ich hoffe mal, ohne Ausgabedevice, daß dann dort die Rechenleistung reicht.


    Also im Moment scheint der Fehler doch irgendwo im VDR 2.x.x zuliegen.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Ich tippe momentan eher auf ffmpeg oder vdpau.


    Btw, welche ffmpeg-Version empfiehlst Du?


    CU
    Oliver

  • Ich tippe momentan eher auf ffmpeg oder vdpau.


    Ich wiederhole: VDR mit mainmenuhooks Patch und nur 2 (ZWEI) Plugins dummydevice und streamdevclient auf Intel 64 Bit Platform zeigt ein stetiges anwachsen des Speichers bei ARD HD. EPG Daten sind im streamdevclient deaktiviert.


    Also ffmpeg und VDPAU sind unschuldig, die könnten zwar auch Speicher verlieren, sind aber hier nicht beteiligt.



    Btw, welche ffmpeg-Version empfiehlst Du?


    1.2.12 oder 2.5.4.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Intel 64 BIT nun mit plain VDR ohne irgendwelche Patche und plain dummydevice (ohne meine obigen Änderungen).
    Und streamdev von 2 Devices auf 1 Device reduziert.


    Code
    4993 root      20   0  353500  12012   7288 S   0.0  0.1   0:00.04 vdr
     4993 root      20   0  352140  11704   7096 S   6.2  0.1   0:03.50 vdr
     4993 root      20   0  352140  11704   7096 S   0.0  0.1   0:07.00 vdr
     4993 root      20   0  352140  11700   7096 S   0.0  0.1   0:10.34 vdr
     4993 root      20   0  352140  11904   7096 S   0.0  0.1   0:13.57 vdr
    ...
     4993 root      20   0  352140  11904   7096 S   0.0  0.1   0:39.50 vdr


    Scheint nun konstanten Speicherbedarf zu haben.


    Eine der drei Änderungen scheint die Ursache beseitigt zuhaben.
    Da TT 6400 geht, ist meine Vermutung es liegt an PlayVideo bzw. den Weg dorthin.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Mein letzer Test:



    Wie immer Intel 64 BIT und nur zwei Plugins steamdevclient und dummydevice.


    Code
    //virtual int PlayTsVideo(const uchar *Data, int Length) {return Length;}
        //virtual int PlayTsAudio(const uchar *Data, int Length) {return Length;}
        //virtual int PlayTsSubtitle(const uchar *Data, int Length) {return Length;}
    
    
        //virtual int PlayPes(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}
        //virtual int PlayTs(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}


    Dummydevice abgeändert das diese Funktionen nicht verwendet werden und meiner Meinung nach dann PlayVideo und PlayAudio verwendet werden.


    Irgendwo dort liegt eine Ursache.


    Ich bin nun erstmal raus,
    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Yes we are searching memory leaks.
    One is in the vdr core, when the cDevice plugin function PlayVideo is used.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Scheint komplizierter:


    Wie immer Intel 64 bit, ARD HD, dummydevice patched. plain vdr.

    Code
    LANG="de_DE.UTF-8" valgrind --log-file=val.log --track-origins=yes /usr/bin/vdr -l 3 -u root -Pdummydevice -Pstreamdev-client



    Irgendein Puffer oder Liste wird immer größer.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Nachdem ich doch 10s in die Source geguckt habe.


    remux.c


    Der obige realloc ist schuld.


    Nach 1 Stunde am laufen.


    Intressant ist der Spung auf klein und dann wieder groß. Dies wiederholt sich monoton wachsend.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Hilf mir mal: was ist daran falsch?
    Sind die geloggten realloc-Aufrufe alle vom gleichen Objekt oder sind das verschiedene?


    Lars.

  • Code
    realloc(487120)
    realloc(487245)


    Inzwischen.


    P.S.: ist einfach ein printf unter dem realloc. Es wächst der Speicherbedarf unbegrenzt. Was falsch ist, muß man suchen.


    Johns

    Sag mir, wo die Developer sind. Wo sind sie geblieben? . . . . . . . . . . . . . . . . . . . . SoftHdDevice - A software and GPU emulated HD output device plugin.
    Sag mir, wo die Developer sind. Was ist geschehn?


    Client0: Crown CW02 MSI_C847MS-E33 Zotac_GT640_passiv Cine-S2 iMon-MCE / streamdev softhddevice
    Client1: Lian_Li_PC-Q09FB ASRock_H67M-ITX/HT I3-2100 ASUS_ENGT520_passiv / streamdev softhddevice
    Test: Lian_Li_PC-Q09R Asus C60M1-I / streamdev
    Server0: Dockstar TT-S2-3600-USB / streamdev
    Server2: Lian_Li_PC-Q07R Intel_DH61DL G620 WD20EARX 90W PicoPSU Cine-S2+DuoFlex-S2+DuoFlex-CT / streamdev / 22 Watt Verbrauch

  • Deinen printf zeigst du ja nicht. :) Ich vermute, dass du da NewSize protokollierst?
    Kannst du da noch "this" als %p davor ausgeben, damit man sieht, ob es unterschiedliche Objekte sind?


    Dort werden ja die TS-Pakete gesammelt, bis ein PES-Paket vollständig ist. Ich würde dann eher einen Fehler in GetPes vermuten, dass da vielleicht einige Längen, Offsets o.ä. nicht richtig zurückgesetzt werden. Vermutest du auch was in die Richtung?


    Lars.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!