{"action":"created","issue":{"url":"https://api.github.com/repos/braice/MuMuDVB/issues/164","repository_url":"https://api.github.com/repos/braice/MuMuDVB","labels_url":"https://api.github.com/repos/braice/MuMuDVB/issues/164/labels{/name}","comments_url":"https://api.github.com/repos/braice/MuMuDVB/issues/164/comments","events_url":"https://api.github.com/repos/braice/MuMuDVB/issues/164/events","html_url":"https://github.com/braice/MuMuDVB/issues/164","id":213503777,"number":164,"title":"Segmentation fault @rewrite_eit.c","user":{"login":"anphsw","id":21102535,"avatar_url":"https://avatars2.githubusercontent.com/u/21102535?v=3","gravatar_id":"","url":"https://api.github.com/users/anphsw","html_url":"https://github.com/anphsw","followers_url":"https://api.github.com/users/anphsw/followers","following_url":"https://api.github.com/users/anphsw/following{/other_user}","gists_url":"https://api.github.com/users/anphsw/gists{/gist_id}","starred_url":"https://api.github.com/users/anphsw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anphsw/subscriptions","organizations_url":"https://api.github.com/users/anphsw/orgs","repos_url":"https://api.github.com/users/anphsw/repos","events_url":"https://api.github.com/users/anphsw/events{/privacy}","received_events_url":"https://api.github.com/users/anphsw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2017-03-11T04:10:06Z","updated_at":"2017-06-05T23:20:24Z","closed_at":null,"body":"I've got rare situation when mumudvb crashes at eit_find_by_tsid().\r\nHere is backtrace:\r\n\r\nUsing host libthread_db library \"/usr/lib/libthread_db.so.1\".\r\nCore was generated by `/tmp/mumudvb -c /etc/dvb/mumudvb5.conf'.\r\nProgram terminated with signal SIGSEGV, Segmentation fault.\r\n#0  0xb76c3c27 in eit_find_by_tsid (rewrite_vars=0xbfb85638, service_id=2080, table_id=80 'P') at rewrite_eit.c:171\r\n171                     if((actual_eit->service_id==service_id)&&(actual_eit->table_id==table_id))\r\n[Current thread is 1 (Thread 0xb7424700 (LWP 15088))]\r\n(gdb) bt\r\n#0  0xb76c3c27 in eit_find_by_tsid (rewrite_vars=0xbfb85638, service_id=2080, table_id=80 'P') at rewrite_eit.c:171\r\n#1  0xb76c3d48 in eit_need_update (rewrite_vars=0xbfb85638, buf=0xb772ca88 \"G@\\022\\036\", raw=1) at rewrite_eit.c:217\r\n#2  0xb76c3ef8 in eit_rewrite_new_global_packet (ts_packet=0xb772ca88 \"G@\\022\\036\", rewrite_vars=0xbfb85638) at rewrite_eit.c:254\r\n#3  0xb76bd2cb in main (argc=3, argv=0xbfc529d4) at mumudvb.c:1658\r\n(gdb) frame 0\r\n#0  0xb76c3c27 in eit_find_by_tsid (rewrite_vars=0xbfb85638, service_id=2080, table_id=80 'P') at rewrite_eit.c:171\r\n171                     if((actual_eit->service_id==service_id)&&(actual_eit->table_id==table_id))\r\n(gdb) print actual_eit->service_id\r\nCannot access memory at address 0xffffff23\r\n(gdb) print actual_eit->table_id\r\nCannot access memory at address 0xffffff27\r\n(gdb) print actual_eit\r\n$9 = (eit_packet_t *) 0xffffff23\r\n(gdb) print rewrite_vars->eit_packets\r\n$10 = (eit_packet_t *) 0xb772dda8\r\n(gdb)  print *rewrite_vars->eit_packets\r\n$1 = {service_id = 13568768, table_id = 0 '\\000', version = 1804933428, needs_update = -221, need_others = -1, last_section_number = -1, sections_stored = {-1 <repeats 39 times>, \r\n    453001287, 229638144, 13568768, -399243264, 1804933428, -221, -1 <repeats 41 times>, 469778503, 229638144, 13568768, -399243264, 1804933428, -221, -1 <repeats 41 times>, 486555719, \r\n    229638144, 13568768, -399243264, 1804933428, -221, -1 <repeats 41 times>, 503332935, 229638144, 13568768, -399243264, 1804933428, -221, -1 <repeats 41 times>, 520110151, 229638144, \r\n    13568768, -399243264, 1804933428, -221, -1 <repeats 23 times>}, full_eit_ok = -1, full_eit_sections = {0xffffffff <repeats 17 times>, 0x10004047, 0xdb00000, 0xcf0b00, 0xe8340800, \r\n    0x6b951934, 0xffffff23, 0xffffffff <repeats 41 times>, 0x11004047, 0xdb00000, 0xcf0b00, 0xe8340800, 0x6b951934, 0xffffff23, 0xffffffff <repeats 41 times>, 0x12004047, 0xdb00000, \r\n    0xcf0b00, 0xe8340800, 0x6b951934, 0xffffff23, 0xffffffff <repeats 41 times>, 0x13004047, 0xdb00000, 0xcf0b00, 0xe8340800, 0x6b951934, 0xffffff23, 0xffffffff <repeats 41 times>, \r\n    0x14004047, 0xdb00000, 0xcf0b00, 0xe8340800, 0x6b951934, 0xffffff23, 0xffffffff <repeats 41 times>, 0x15004047, 0xdb00000, 0xcf0b00, 0xe8340800}, continuity_counter = 1804933428, \r\n  next = 0xffffff23}\r\n\r\nI will try to investigate and fix it\r\nI can upload core file and debugged binary, if anyone interested.\r\n"},"comment":{"url":"https://api.github.com/repos/braice/MuMuDVB/issues/comments/306337565","html_url":"https://github.com/braice/MuMuDVB/issues/164#issuecomment-306337565","issue_url":"https://api.github.com/repos/braice/MuMuDVB/issues/164","id":306337565,"user":{"login":"braice","id":332815,"avatar_url":"https://avatars1.githubusercontent.com/u/332815?v=3","gravatar_id":"","url":"https://api.github.com/users/braice","html_url":"https://github.com/braice","followers_url":"https://api.github.com/users/braice/followers","following_url":"https://api.github.com/users/braice/following{/other_user}","gists_url":"https://api.github.com/users/braice/gists{/gist_id}","starred_url":"https://api.github.com/users/braice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/braice/subscriptions","organizations_url":"https://api.github.com/users/braice/orgs","repos_url":"https://api.github.com/users/braice/repos","events_url":"https://api.github.com/users/braice/events{/privacy}","received_events_url":"https://api.github.com/users/braice/received_events","type":"User","site_admin":false},"created_at":"2017-06-05T23:20:23Z","updated_at":"2017-06-05T23:20:23Z","body":"Hi\n\nYou are right, and it is indeed really easy to miss a +1 somewhere\n\nValgrind can check that but we can also put big FAT warnings on every\npossible overflow of the sections arrays.\n\nAs you prefer\n\nBrice\n\n\n\n2017-05-27 12:48 GMT-04:00 anphsw <notifications@github.com>:\n\n> Yes, DVB specifies 8-bit field (uint8_t), but all section counters in code\n> is int (32 or 64 bit depending on arch).\n> I think there can be miscaltulation with section numbers overflowing it\n> over 256 allowed.\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/braice/MuMuDVB/issues/164#issuecomment-304463410>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AAUUDzeRGLQmRShis6zBNIvTB6m2Lo6mks5r-FPjgaJpZM4MaFu_>\n> .\n>\n"}}
{"actor":{"display_login":"braice"}}