CESNET / UltraGrid

UltraGrid low-latency audio and video network transmission system
http://www.ultragrid.cz
Other
507 stars 53 forks source link

An improper locking bug(e.g., deadlock) on the lock server #183

Closed ycaibb closed 3 years ago

ycaibb commented 3 years ago

Hi, developers, thank you for your checking. It seems the lock server is not released correctly when !server->initialize in the function serverStop?

https://github.com/CESNET/UltraGrid/blob/e3c926c8ff67586bf74c4cc0763a78c83ede9cf6/src/EmbeddableWebServer.h#L1516-L1525

MartinPulec commented 3 years ago

Hi, the upstream for EmbeddableWebServer is this repository so if you wish, you can report it there. Anyways, I am not sure if this can be considered as a bug - there can be as well assert or abort, which could be perhaps better. But from my perspective, calling stop on non-running server is a logic error. It is true, that while it continues, it shall be unlocked, anyways.

ycaibb commented 3 years ago

@MartinPulec Thank you for your reply. Indeed, just looking at the code, the lock server should be released anyways. I would also report this to upstream.

MartinPulec commented 3 years ago

Fixed, thanks for reporting!