When the system boots, the first invocation of ps will try to recreate /tmp/ps_data. To this end ps scans the /dev tree. Under some circumstances, a loop exists in /dev and ps will run forever. Most of the time this loop is caused by the symbolic link /dev/bd.off. While this link usually points to /dev/term/b, it sometimes get truncated and points to /dev instead.
Fix: rm -f /dev/bd.off; ln -s /dev/term/b /dev/bd.off
Use truss(1) to determine whether this is real the cause of your problem.