7 Followers
44 Following
44 Posts
I usually play with projects like this. https://github.com/reliforp/reli-prof
I’ve been working hard these days to release Reli 0.12.0, but it feels like it’ll never be finished. It’s that classic pattern where, just when I think I’m 90% done, the remaining 10% ends up taking up 90% of the total time.
Some days ago I came up with an exciting hack to get the address of _tsrm_ls_cache for running ZTS threads from outside the process without an unstripped PHP binary (via brute forcing), but I haven't had time to try it yet...
The combo of php-memprof and Reli is golden. I'd like to add the ability to dump the addresses of allocated areas to php-memprof. Then combining both pieces of information together would give us a picture of which data occupy memory areas and when those areas were allocated.
As always, diagnosing memory_limit violations is fun.
https://github.com/vimeo/psalm/issues/10522#issuecomment-1881729504 #php #psalm
Psalm validation crashes laptop due to memory issues · Issue #10522 · vimeo/psalm

When running psalm on microsoft/microsoft-graph it crashes due to spawnining multiple, ~10, PHP processes. Each process continuously increases it's memory footprint, beginning from 0,5GB to over 5G...

GitHub
A PoC for getting call traces and analyzing memory contents of scripts running on FrankenPHP by Reli is working on my end. But _tsrm_ls_cache works a bit differently than I imagined, so perhaps I don't understand ZTS or TLS handlings of ELF well enough.

Looking at GitHub projects, there are often #php projects with rapidly increasing stars mainly among Chinese-speaking people, so perhaps there is a place where they form an internet community, but where on earth is it?

For me, English and Chinese are equal in terms of being hard-to-read foreign languages anyway, so I would rather like to gather information from both.

https://github.com/swoole/phpy
My first laugh of the year is that reading and writing PyDict in PHP is faster than doing them in Python. An interesting project from the author of swoole. #php
GitHub - swoole/phpy: Connecting the Python and PHP ecosystems together

Connecting the Python and PHP ecosystems together. Contribute to swoole/phpy development by creating an account on GitHub.

GitHub
Allowed memory size of X bytes exhausted in PhpSpreadsheet\Worksheheet\Worksheet.php on line 3108 · Issue #3814 · PHPOffice/PhpSpreadsheet

This is: - [X] a bug report - [ ] a feature request - [ ] **not** a usage question (ask them on https://stackoverflow.com/questions/tagged/phpspreadsheet or https://gitter.im/PHPOffice/PhpSpreadshe...

GitHub

Thanks to a conversation with @alessandrolai , Reli 0.11.0 is now able to get the breakdown of the memory usage in the target #php process when memory_limit violations occurred, including the true call trace and its local variables. Thanks for spending the time to talk to a weirdo!

https://github.com/reliforp/reli-prof/releases/tag/0.11.0

Release 0.11.0 · reliforp/reli-prof

Release Notes for 0.11.0 The real stack trace on memory_limit violations The memory profiling mode now can capture the real stack trace on memory_limit violations See the documentation and #384 fo...

GitHub

https://github.com/reliforp/reli-prof/pull/384

This code will probably win the 'dumbest #php code of the year I've written this year' award.

Add an ability to get the real stack trace on memory_limit violations by sj-i · Pull Request #384 · reliforp/reli-prof

A memory_limit violation is a fatal error. It cannot be catched as an exception from user scripts. As the shutdown handlers are invoked even on fatal errors, we often use the combination of registe...

GitHub