braice / MuMuDVB

A DVB IPTV streaming software
http://mumudvb.braice.net/
GNU General Public License v2.0
213 stars 133 forks source link

Infinite loop tuning on 10949 V on Hotbird (S13E0) #230

Closed malakudi closed 3 years ago

malakudi commented 5 years ago

Mumudvb enters in an infinite loop (cpu usage 100%) when starting with autoconfiguration on frequency 10949 V from Hotbird, 13 degrees east. It seems the problem is SID 7470 and 7471. If those are excluded (with autoconf_sid_list_ignore=7470 7471) then it works. Debug doesn't show something, it just enters an infinite loop. Any hint where to look to try debug it?

braice commented 5 years ago

Hello

Can you try to debug in very verbose -vvv ? Can you try to do a dump of the ts stream (there is a write to file option and you can do a catch all with the pid 8192)

thank you

Brice

Le mar. 23 oct. 2018 à 07:43, Panagiotis Malakoudis notifications@github.com a écrit :

Mumudvb enters in an infinite loop (cpu usage 100%) when starting with autoconfiguration on frequency 10949 V from Hotbird, 13 degrees east. It seems the problem is SID 7470 and 7471. If those are excluded (with autoconf_sid_list_ignore=7470 7471) then it works. Debug doesn't show something, it just enters an infinite loop. Any hint where to look to try debug it?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

malakudi commented 5 years ago

Debug -vvv just stops and cpu usage is at 100%. I run with gdb and infinite loop is inside this part of code in autoconf_pmt.c:

        while (descriptors_loop_len > 0)
        {
                unsigned char descriptor_tag = buf[0];
                unsigned char descriptor_len = buf[1] + 2;

                if (tag == descriptor_tag)
                        return 1;

                if(pos!=NULL)
                        *pos += descriptor_len;
                buf += descriptor_len;
                descriptors_loop_len -= descriptor_len;
        }

Want to put some debug print in there to find out?

malakudi commented 5 years ago

Adding the pmt tables (as decoded by dvblast) for the two services that make the infinite loop occur.

new PMT program=7470 version=1 pcrpid=7801
  * ES pid=7801 streamtype=0x02 streamtype_txt="13818-2 video (MPEG-2)"
    - desc 52 stream_identifier component_tag=1
  * ES pid=7811 streamtype=0x04 streamtype_txt="13818-3 audio (MPEG-2)"
    - desc 52 stream_identifier component_tag=2
    - desc 0a audio_language language=eng audiotype=0 audiotype_txt="undefined"
end PMT
new PMT program=7471 version=1 pcrpid=7901
  * ES pid=7901 streamtype=0x02 streamtype_txt="13818-2 video (MPEG-2)"
  * ES pid=7911 streamtype=0x03 streamtype_txt="11172-3 audio (MPEG-1)"
    - desc 0a audio_language language=far audiotype=0 audiotype_txt="undefined"
end PMT
malakudi commented 5 years ago

And here are the pmt tables as decoded by dvbsnoop

dvbsnoop -adapter 0 7898 
dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/ 

------------------------------------------------------------
SECT-Packet: 00000001   PID: 7898 (0x1eda), Length: 38 (0x0026)
Time received: Sun 2018-11-04  13:50:10.148
------------------------------------------------------------
  0000:  02 b0 23 1d 2e c3 00 00  fe 79 f0 00 02 fe 79 f0   ..#......y....y.
  0010:  03 52 01 01 04 fe 83 f0  09 52 01 02 0a 04 65 6e   .R.......R....en
  0020:  67 00 a4 92 95 43                                  g....C

PID:  7898 (0x1eda)

Guess table from table id...
PMT-decoding....
Table_ID: 2 (0x02)  [= Program Map Table (PMT)]
section_syntax_indicator: 1 (0x01)
(fixed '0'): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 35 (0x0023)
Program_number: 7470 (0x1d2e)
reserved_2: 3 (0x03)
Version_number: 1 (0x01)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 7801 (0x1e79)
reserved_4: 15 (0x0f)
Program_info_length: 0 (0x0000)

Stream_type loop: 

    Stream_type: 2 (0x02)  [= ITU-T Rec. H.262 | ISO/IEC 13818-2 Video | ISO/IEC 11172-2 constr. parameter video stream]
    reserved_1: 7 (0x07)
    Elementary_PID: 7801 (0x1e79)
    reserved_2: 15 (0x0f)
    ES_info_length: 3 (0x0003)

            DVB-DescriptorTag: 82 (0x52)  [= stream_identifier_descriptor]
            descriptor_length: 1 (0x01)
            component_tag: 1 (0x01)

    Stream_type: 4 (0x04)  [= ISO/IEC 13818-3 Audio]
    reserved_1: 7 (0x07)
    Elementary_PID: 7811 (0x1e83)
    reserved_2: 15 (0x0f)
    ES_info_length: 9 (0x0009)

            DVB-DescriptorTag: 82 (0x52)  [= stream_identifier_descriptor]
            descriptor_length: 1 (0x01)
            component_tag: 2 (0x02)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  eng
               Audio_type: 0 (0x00)  [= undefined]

CRC: 2761069891 (0xa4929543)
==========================================================
dvbsnoop -adapter 0 7998 
dvbsnoop V1.4.50 -- http://dvbsnoop.sourceforge.net/ 

------------------------------------------------------------
SECT-Packet: 00000001   PID: 7998 (0x1f3e), Length: 32 (0x0020)
Time received: Sun 2018-11-04  13:50:44.387
------------------------------------------------------------
  0000:  02 b0 1d 1d 2f c3 00 00  fe dd f0 00 02 fe dd f0   ..../...........
  0010:  00 03 fe e7 f0 06 0a 04  66 61 72 00 de f2 61 87   ........far...a.

PID:  7998 (0x1f3e)

Guess table from table id...
PMT-decoding....
Table_ID: 2 (0x02)  [= Program Map Table (PMT)]
section_syntax_indicator: 1 (0x01)
(fixed '0'): 0 (0x00)
reserved_1: 3 (0x03)
Section_length: 29 (0x001d)
Program_number: 7471 (0x1d2f)
reserved_2: 3 (0x03)
Version_number: 1 (0x01)
current_next_indicator: 1 (0x01)  [= valid now]
Section_number: 0 (0x00)
Last_Section_number: 0 (0x00)
reserved_3: 7 (0x07)
PCR PID: 7901 (0x1edd)
reserved_4: 15 (0x0f)
Program_info_length: 0 (0x0000)

Stream_type loop: 

    Stream_type: 2 (0x02)  [= ITU-T Rec. H.262 | ISO/IEC 13818-2 Video | ISO/IEC 11172-2 constr. parameter video stream]
    reserved_1: 7 (0x07)
    Elementary_PID: 7901 (0x1edd)
    reserved_2: 15 (0x0f)
    ES_info_length: 0 (0x0000)

    Stream_type: 3 (0x03)  [= ISO/IEC 11172 Audio]
    reserved_1: 7 (0x07)
    Elementary_PID: 7911 (0x1ee7)
    reserved_2: 15 (0x0f)
    ES_info_length: 6 (0x0006)

            MPEG-DescriptorTag: 10 (0x0a)  [= ISO_639_language_descriptor]
            descriptor_length: 4 (0x04)
               ISO639_language_code:  far
               Audio_type: 0 (0x00)  [= undefined]

CRC: 3740426631 (0xdef26187)
==========================================================
malakudi commented 4 years ago

This issue continues to happen, and also happens in other transponders. Have the same issue on DVB-T2 London frequency 545.833 MHz (the mux that has BBC1 HD, BBC2 HD etc). It goes at 100% CPU utilization unless I ignore sid 20160 (TBN UK). We need a fix for this

braice commented 4 years ago

Ok, I will look into it. Thank you for reporting it

On Thu, Dec 5, 2019 at 1:52 PM Panagiotis Malakoudis < notifications@github.com> wrote:

This issue continues to happen, and also happens in other transponders. Have the same issue on DVB-T2 London frequency 545.833 MHz (the mux that has BBC1 HD, BBC2 HD etc). It goes at 100% CPU utilization unless I ignore sid 20160 (TBN UK). We need a fix for this

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/braice/MuMuDVB/issues/230?email_source=notifications&email_token=AACRID4IZRDKCCEAN7G3Z5TQXFEWRA5CNFSM4F6VP552YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGBXPJY#issuecomment-562263975, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACRID2L3HAA5X75U3D6PKTQXFEWRANCNFSM4F6VP55Q .

pszemus commented 1 year ago

This can be related with #305 which was recently fixed.