Example of manifold with geodesic having infinite exit time and finite negative exit time. Let M be compact Riemann manifold.
The unit sphere bundle $SM$ is given by
$$SM=\{(x, v)||v|_{g}=1,x \in M\}$$
where $g$ is the Riemannian metric in the tangent space at $x$.
Given $(x, v) \in S M$, let $\gamma_{x, v}$ denote the unique geodesic determined by $(x, v)$ so that $\gamma_{x, v}(0)=x$ and $\dot{\gamma}_{x, v}(0)=v$. For any $(x, v) \in S M$ the geodesic $\gamma_{x, v}$ is defined on a maximal interval of existence that we denote by $\left[-\tau_{-}(x, v), \tau_{+}(x, v)\right]$ where $\tau_{\pm}(x, v) \in[0, \infty]$, so that
$$
\gamma_{x, v}:\left[-\tau_{-}(x, v), \tau_{+}(x, v)\right] \rightarrow M
$$
is a smooth curve that cannot be extended to any larger interval as a smooth curve in $M$.
We let $$
\tau(x, v):=\tau_{+}(x, v)
$$
Thus $\tau(x, v)$ is the exit time when the geodesic $\gamma_{x, v}$ exits $M$.
I am interested in finding an example of manifold such that there exists geodesic at point $x$ and direction $v$ such that  $\tau_{-}(x, v)$ is finite but $\tau_{+}(x, v)=\infty$.
I thought Large spherical cap given by $\{x=(x_1,x_2,x_3)\in \mathbb{S}^2:x_3\ge -\epsilon\}$ for some $\epsilon>0$. The Equator is a geodesics here with $\tau =\infty$. But here $\tau_{-}$ is also $-\infty$.
Any Help or hint will be appreciated.
 A: Take $M = \mathbb{R}_+^*$ with the euclidean metric. Then $\tau_+(1,1) = +\infty$ but $\tau_-(1,1) = -1$, because $\gamma_{1,1}(t) = 1 + t$ is defined on $(-1,+\infty)$.
In you want $\tau_-$ to be included in the interval of definition, then take $M = [0,+\infty)$ with the euclidean metric and the same geodesic. Note that in that case, the geodesic has to hit a boundary point.
Edit
The question has been edited with an important modifitcation: now, the manifold is supposed compact. If $M$ has no boundary, the answer is no, because of Hopf-Rinow's theorem.
If one allows $M$ to have a boundary, the answer is yes. An example is the following.
Consider the one sheeted hyperboloid of revolution with the metric induced from $\mathbb{R}^3$. Consider a point that is not on the equator. Then there exists a geodesic coming from infinity that converges to the equator:
In this case, cutting this manifold with $-1\leqslant z \leqslant 1$ gives a compact Riemannian manifold with a geodesic that is defined for all $t \geqslant0$ but not for all $t < 0$.
