PHP: 8.0.5 (cli) (built: May 30 2021 12:02:37) ( ZTS Visual C++ 2019 x64 )
pthreads: 3.2.1dev
OS: Windows 64-bit
Introduction
The memory leak problem occurs when JIT is enabled for PocketMine-MP server especially for the PopulationTasks in one of the AsyncWorker. Unfortunately I am unable to reproduce this memory leak outside PopulationTask and this leak is producible without any plugins used in the server. The leak seems to start when the chunk is being generated(?)
This could either be PocketMine-MP issue but I do not think that this is the case since it is working just fine without JIT enabled.
Reproducing Code
It can be reproduced using my debug branch of PocketMine-MP 4.0 software. The only changes is that, there will be memory_get_usage() in certain parts where I believe the memory leaks begin.
opcache.jit will be set to 1205
Expected Output
This is what would happen if JIT is not enabled. No abnormal memory usage, everything is fine.
non-jit.txt
Environment
Introduction
The memory leak problem occurs when JIT is enabled for PocketMine-MP server especially for the PopulationTasks in one of the AsyncWorker. Unfortunately I am unable to reproduce this memory leak outside PopulationTask and this leak is producible without any plugins used in the server. The leak seems to start when the chunk is being generated(?)
This could either be PocketMine-MP issue but I do not think that this is the case since it is working just fine without JIT enabled.
Reproducing Code
It can be reproduced using my debug branch of PocketMine-MP 4.0 software. The only changes is that, there will be memory_get_usage() in certain parts where I believe the memory leaks begin.
opcache.jit
will be set to1205
Expected Output
This is what would happen if JIT is not enabled. No abnormal memory usage, everything is fine. non-jit.txt
Actual Output
This is when JIT is enabled, the memory usage gradually increased until the worker ran out of memory and died. jit.txt