catalinii / minisatip

minisatip is an SATIP server for linux using local DVB-S2, DVB-C, DVB-T or ATSC cards
https://minisatip.org
325 stars 78 forks source link

BUG: PMT of channel continues after closing #1043

Closed lars18th closed 1 year ago

lars18th commented 1 year ago

Hi @catalinii ,

Please, reproduce this using three different clients:

Therefore a bug exists inside the PMT handling, because when a channel is opened multiple times, but after it will be closed, the PMT continues selected and not removed. Please check it.

Regards.

Jalle19 commented 1 year ago

Yeah, there's definitely something going on. It's also possible that a running PMT is not mentioned in the UI, especially for CI adapters.

lars18th commented 1 year ago

Yeah, there's definitely something going on. It's also possible that a running PMT is not mentioned in the UI, especially for CI adapters.

I agree. And because I have no proficiency with Unit Tests, maybe someone else could implement a test for PMTs. I feel that this test will expose this bug (and perhaps others too).

lars18th commented 1 year ago

Hi @catalinii ,

I've compiled the last commit, and this bugcontinues. See this capture:

minisatip-pmt-bug

This is after I open 3sat with one VLC, then Kika with another VLC, and finally 3sat another time with a third VLC. After I close first and third VLC instances (both playing 3sat). And while Kika continues playing, the PMTs processed continue to be "3sat HD, KiKa HD".

So please could you check this? Thank you.

catalinii commented 1 year ago

Hi @lars18th, thanks for the repro. Can you upload a log when this happens ? -l http

lars18th commented 1 year ago

Hi @lars18th, thanks for the repro. Can you upload a log when this happens ? -l http

Hi @catalinii ,

The log is not necessary at all. This is REPRODUCIBLE. You only need to execute the 5 steps commented at start. With any pair of FTA channels in the same transponder. Please, check it. The problem appears every time with any recent version of minisatip. I prefer that you see it and debug it in realtime.

lars18th commented 1 year ago

Hi @catalinii , only for curiosity: What you use to debug/test minisatip ?

lars18th commented 1 year ago

Hi @lars18th, thanks for the repro. Can you upload a log when this happens ? -l http

Hi @catalinii ,

The log is not necessary at all. This is REPRODUCIBLE. You only need to execute the 5 steps commented at start. With any pair of FTA channels in the same transponder. Please, check it. The problem appears every time with any recent version of minisatip. I prefer that you see it and debug it in realtime.

To indentify properly the problem, please see that the pid of the PMT of the stoped program is not in the pid list. Therefore the problem is inside the internal processing of the PMTs. And I repeat: the problem appears every time if a client opens a Channel A, another client a Channel B, and after a third the same Channel A. The error appears then if first client closes the session and then the third... until the second is playing the Channel B the PMT of the Channel A continues inside the list.

Please, check it and try to fix this bug.

lars18th commented 1 year ago

Hi @catalinii ,

You done the test?

lars18th commented 1 year ago

Hi @catalinii ,

With recent changes, the issue has gone. Thank you.