When you can't find a single positive value in the pivot column it means that the linear program is unbounded. In other words, you can increase the objective function indefinitely while maintaining a feasible solution. So, if this happens, your algorithm shouldn't backtrack and try to find another candidate for the entering variable; it should tell the program to stop and declare that the problem is unbounded. If you are getting this situation on a problem you know is bounded then there is a bug somewhere else in your code.
Let's look at an example to see why no positive values in the pivot column means the LP is unbounded.
$$
\begin{matrix}
\text{Basic Variable}& Z & x_1 & x_2 & x_3 & x_4 & x_5 & \text{Right-Hand Side}\\ \hline
Z & 1 & 1/2 & -2 & 0 & 3/2 & 0 & 3 \\ \hline
x_3 & 0 & 1/2 & 0 & 1 & 1/2 & 0 & 1 \\
x_5 & 0& -1 & -1 & 0 & -1 & 1 & 0 \\
\end{matrix}
$$
In this example, the only choice for leaving variable is $x_2$, and there are no positive values in its pivot column. If we rewrite the tableau in equation form, it becomes
$$Z = 3 - 1/2x_1 + 2x_2 - 3/2 x_3,$$
$$x_3 = 1 - 1/2x_1 - 1/2 x_4,$$
$$x_5 = 0 + x_1 + x_2 + x_4.$$
Letting $x_2$ enter the basis means increasing $x_2$. Normally, we increase the entering variable until doing so any more would make one of the current basic variables negative (and thus the current solution infeasible). However, the fact that there are no positive values in $x_2$'s column means that increasing $x_2$ does not cause any of the current basic variables to decrease: the value of $x_3$ remains at $1$, the value of $x_5$ actually increases with $x_2$, and the values of $x_1$ and $x_4$ remain $0$. Thus we can increase $x_2$ indefinitely without any other variable going negative, which means we can increase the objective function indefinitely in this direction without the current solution ever becoming infeasible. This means the problem is unbounded.
Indebted to zifyoip for clearing up a fundamental misunderstanding for me:
The rule is not that the test ratio must be positive, but that the
pivot entry must be positive. You can't pivot on a nonpositive entry
of the tableau.
There are several ways to prevent cycling. One is to break ties in the
test ratios randomly—this will eventually (almost surely) break
cycles. Another is to randomly perturb the entries of the initial
tableau slightly (add or subtract small random quantities from all of
them), or to add symbolic powers of ε to the entries (ε acts as an
infinitesimal: ε > 0, but ε < x for all positive real numbers x; and ε
≫ ε2 ≫ ε3 ≫ ...; this requires some symbolic manipulation to keep
track of powers of ε through the pivots). There are also deterministic
rules for avoiding cycling, such as Bland's rule.
Best Answer
Yes, a row with ratio 0 would be the pivot row. A zero ratio signals a condition called degeneracy. Google "degenerate solution linear programming" to find out more. In geometric terms, there are more constraints binding at the current vertex of the feasible region than the number needed to define a point. (You need one binding constraint for each decision variable, excluding slack and surplus variables.)
When the simplex method arrives at a degenerate corner, cycling can occur. There are a variety of adjustments you can make to the basic simplex algorithm to avoid being stuck in a cycle. See the relevant Wikipedia page for a brief discussion.