hhvm icon indicating copy to clipboard operation
hhvm copied to clipboard

pcntl_waitpid dont work

Open GreenRover opened this issue 11 years ago • 7 comments

Here is a prove of concept. http://pastebin.com/c3QkbybJ

It dont work for:

HipHop VM 3.6.0-dev (rel)
Compiler: heads/master-0-g8fa595dcc71ba2de63fb73b15e61dc9fd50a0971
Repo schema: d8ec4ce9760f167994ab9f19161c09a7534ff14f
HipHop VM 3.5.0 (rel)
Compiler: tags/HHVM-3.5.0-0-ga90f4733cfa0d8fefdafc7433f758f78cdc75424
Repo schema: b88b6fee8ef78ab638506d212abcbefe74a276ac

But work on:

HipHop VM 3.3.0-dev (rel)
Compiler: heads/master-0-gc380b4972e48b708cd2844c7af501e0638ce0914
Repo schema: eb9b0cf9c5d24c8ccf53bee8098ef5d3665c85ce

Expected result

JOB 0 DONE
JOB 1 DONE
JOB 2 DONE
JOB 3 DONE
JOB 4 DONE
JOB 5 DONE
JOB 6 DONE
JOB 7 DONE
JOB 8 DONE
JOB 9 DONE
JOB 10 DONE
JOB 11 DONE
JOB 14 DONE
JOB 13 DONE
JOB 12 DONE
JOB 15 DONE
55 of 201. Running 40
JOB 16 DONE
JOB 17 DONE
JOB 18 DONE
JOB 19 DONE
JOB 20 DONE
JOB 21 DONE
JOB 22 DONE
JOB 23 DONE
JOB 24 DONE
JOB 25 DONE
55 of 201. Running 20
....

Result of broken hhvm version

JOB 0 DONE
JOB 1 DONE
JOB 2 DONE
JOB 3 DONE
JOB 4 DONE
JOB 5 DONE
JOB 6 DONE
JOB 7 DONE
JOB 8 DONE
JOB 9 DONE
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10
10 of 201. Running 10

GreenRover avatar Jan 21 '15 15:01 GreenRover

Hello, this is not only a php5 incompatibility.

Because HipHop VM 3.3.0 (rel) works fine. Can someone please fix this issue?

GreenRover avatar Feb 18 '15 11:02 GreenRover

Your repro-file and bug report aren't very clear. It would help if you could narrow down the problem and provided a clearer explanation of the expected/observed behavior.

paulbiss avatar Feb 18 '15 21:02 paulbiss

Ok i striped the prof of concept / testscript down to less lines: http://pastebin.com/ykSvGrZ9

Please just run this script with hhvm > 3.3

Or here some more debug informations of a child after php "exit 0" http://pastebin.com/q1nJ94wP

The hhvm childs after pcntl_fork dont finish on die() or exit();

They dont go to be zombies. They will be something half death with 100% cpu usages.

What information do you need else?

GreenRover avatar Feb 19 '15 08:02 GreenRover

@GreenRover: Thanks, I'll have a look!

paulbiss avatar Feb 19 '15 17:02 paulbiss

We're also seeing this with pcntl_wait. Minimal reproduction: https://gist.github.com/HRMsimon/61df27fad8fe1df8875b

HRMsimon avatar Feb 23 '15 03:02 HRMsimon

The signal mask in HHVM isn't quite what PHP5 does, see this bug and explanation, I wonder if that could be related here?

jwatzman avatar Mar 10 '15 21:03 jwatzman

Very out dated

GreenRover avatar Jan 22 '21 10:01 GreenRover