This repository was archived by the owner on Apr 22, 2023. It is now read-only.
This repository was archived by the owner on Apr 22, 2023. It is now read-only.
Non-deterministic hanging for setTimeout and other async operations when using --prof (v0.12.x, OS X 10.9.5) #14576
Closed
Description
setTimeout, fs.readFile and other async functions sometimes makes the entire node process hang permanently when the --prof
flag is used on OS X.
Environments where issue occurs:
- OS X 10.9.5 with node v0.12.0
- OS X 10.9.5 with node v0.12.1
- OS X 10.9.5 with node v0.12.2
Environments where issue does not occur:
- OS X 10.9.5 with node v0.10.38
- Ubuntu 14.04.2 with node v0.12.2
To reproduce, run this script with node v.0.12.x on the path:
#!/usr/bin/env bash
REPEAT=100;
echo "Running without --prof ${REPEAT} times"
for i in `seq ${REPEAT}`; do
echo -n "$i "
node -e "setTimeout('', 50)";
done
echo
echo "Running with --prof ${REPEAT} times"
for i in `seq ${REPEAT}`; do
echo -n "$i "
node --prof -e "setTimeout('', 50)";
done
Sample output, hanging after 9 iterations:
$ ./run.sh
Running without --prof 100 times
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
Running with --prof 100 times
1 2 3 4 5 6 7 8 9 C-c