4. Given that $A$ and $B$ are two fixed points on a circle $\odot O$ with radius 2, $A B \neq 4$, and $P$ is a moving point on $\odot O$. When $P$ moves around $\odot O$ once, the path traced by the orthocenter of $\triangle A B P$ is $\qquad$ (add two special points so that the orthocenter $H$ of $\triangle A B P$ traces a closed figure).
4. $4 \pi$.

When point $P$ is on the major arc $\overparen{A B}$, and $\triangle A B P$ is an acute triangle, $\angle A H B=180^{\circ}-\angle P$;
When $\triangle A B P$ is an obtuse triangle,
$$
\angle A H B=\angle P \text {; }
$$

When $\triangle A B P$ is a right triangle, the orthocenter is $A$ or $B$.
When point $P$ is on the minor arc $\overparen{A B}$,
$$
\angle A H B=180^{\circ}-\angle P \text {. }
$$

Therefore, the locus of $H$ is the circle $\odot O$ reflected over $A B$ (including two special points which are the reflections of $A$ and $B$ across the center of the circle).
Thus, the distance traveled by the orthocenter $H$ of $\triangle A B P$ is
$$
2 \pi \times 2=4 \pi \text {. }
$$