Open AmarOk1412 opened 3 years ago
Hi Sébastien,
The default behavior is set in configure.ac or CMakeLists.txt, but this is not currently a platform based choice.
Do you think that this a regression introduced by this commit? Are you able to compile and test with the commit immediately before (https://github.com/pupnp/pupnp/commit/cfbb7910445df185ca34601eabb039c12ec5474c)?
Would it be possible to test this behavior in a PC? Do you have a small test code that I can use to try to fix it?
Regards, Marcelo.
Yeah setting the default value in the configure is correct.
We observed this behaviour only on iPhone devices via the profiler directly on the whole app. So, no I don't think you will get it on a PC (macOS doesn't seems to be impacted and I can't really provide a minimal code). I don't own any iphone so it's from a distant investigation with a dev. I can ping her to come here.
If you need more details:
--disable-largefile --disable-samples --disable-device --disable-webserver --without-documentation
--disable-reuseaddr
, RunMiniServer
is taking 94.5% of the time of the CPU, I didn't patch to debug more, but basically sure the while (!stopSock) {
is just looping--disable-reuseaddr
, RunMiniServer
takes 0.5% of the time (on a run of 32 secs, which is ok)SO_REUSEADDR
on apple devices, that's why we tried this.Thank you for your prompt answer, Regards,
Hi, Issue is still present on iPhone and could be triggered by locking/unlocking the screen. Tested with pupnp 1.14.7 with --disable-reuseaddr and without. Also tested with pupnp 1.12.1. It caused by a while loop inside RunMiniServer. select() does not return an error but returns right away without blocking.
Hello, it should be fixed by https://github.com/pupnp/pupnp/pull/428 (I didn't know there was an issue)
Hi.
Since pupnp 1.14.0, default configuration is causing a huge CPU consumption located in runMiniServer. This is probably caused by https://github.com/pupnp/pupnp/commit/a3912b04653cdefd6f7b627d73eef6f234a9882c cause SO_REUSEADDR is weirdly handled by iphone devices.
Adding the
--disable-reuseaddr
option solves this issue. IMHO, SO_REUSEADDR should not be enabled by default on Apple devices