upgrade icon indicating copy to clipboard operation
upgrade copied to clipboard

Process "xxxxx" not found

Open dan-comentis opened this issue 2 years ago • 4 comments

Hi - I am trying to upgrade from CakePHP 4.4 to 5, however as I'm running the migration code I get the following:

➜  upgrade git:(5.x) bin/cake upgrade rector --rules cakephp50 <path>/app/src
  56/131 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]  42%
In ProcessPool.php line 31:

  Process "z5zo7cwtj3" not found.

process [-n|--dry-run] [-a|--autoload-file AUTOLOAD-FILE] [--no-progress-bar] [--no-diffs] [--output-format OUTPUT-FORMAT] [--debug] [--memory-limit MEMORY-LIMIT] [--clear-cache] [--port PORT] [--identifier IDENTIFIER] [--] [<source>...]

It doesn't seem to consistently fail at the same place either.

I'm running this on a Macbook M3 Pro

dan-comentis avatar Jan 10 '24 10:01 dan-comentis

It looks like something wrong with subprocess manager in Rector itself.

Run bin/cake upgrade rector with --verbose to get command /path/vendor/bin/rector process .... Then run that Rector command with --debug to get more details from Rector.

garas avatar Jan 10 '24 11:01 garas

Hey @garas - thanks for that, although it hasn't shed much more light on the situation I don't think. I now can see the exception and the full stack trace, but it doesn't give me a lot to go on (with my limited knowledge):

PHP Fatal error:  Uncaught RectorPrefix202311\Symplify\EasyParallel\Exception\ParallelShouldNotHappenException: Process "idnwsqbylf" not found. in /Users/d/work/upgrade/vendor/rector/rector/vendor/symplify/easy-parallel/src/ValueObject/ProcessPool.php:31

I've uploaded the trace here in case thats of any use: trace.txt

dan-comentis avatar Jan 10 '24 15:01 dan-comentis

Report issue to https://github.com/rectorphp/rector. It is problem inside of Rector, they might know better how to debug and fix the problem.

garas avatar Jan 10 '24 17:01 garas

I am able to reproduce your problem, but only with "larger" codebases, not smaller plugins.

Looking at your error message it could only be caused by this exception

I am no expert in rector internals but it feels like something is wrong with the parallel file processing logic as it seems to quit a process which doesn't exist any more. Maybe something related to a timeout? 🤔

LordSimal avatar Jan 10 '24 18:01 LordSimal