Based on @DavidCarlisle 's answer (which relies on roman page numbers being used) and his comment, I have created a document with arabic page numbers:
\documentclass[11pt]{article}
\usepackage[proportional]{libertine}
\begin{document}
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
There is nothing of interest on this page.\clearpage
\begin{figure}[!t]
\centering
\framebox(260,420){}
\caption{A figure to take up space}
\end{figure}
Here is some text referring to something in section \ref{mylabel} (which starts on page \pageref{mylabel}).
\section{A very interesting section\label{mylabel}}
The text of an interesting section.
\end{document}
The font used in this document is Linux Libertine with proportional figures. "proportional figures" means that the characters 0123456789 do not have the same width. For example, 0 is (slightly) wider than 1.
The sentence Here is some text referring to something in section \ref{mylabel} (which starts on page \pageref{mylabel}). on page 10 just fits in one line if \pageref{mylabel} is 11, but it occupies two lines if \pageref{mylabel} is 10. (This is because 0 is slightly wider than 1.)
Now the following happens: If the sentence refers to page 11, it fits in one line and the section fits on page 10. If the sentence refers to page 10, it occupies two lines, the section does not fit on page 10 and is moved to page 11...
amsbooktoc(which is sent out to ams authors only on request, so it's not in general distribution), but haven't had time to track down the source of the problem yet. however, after the number of runs normally required to get a good table of contents, the document is stable, so we just warn our authors about what they should check for. but i believe this is a different situation than you are describing. – barbara beeton Oct 06 '11 at 12:17footmisc, and contains pathologically many footnotes, which oscillate position (i know where this one is). i've also come across the problem with a couple of "real" documents, but would find it hard to retrieve them from archive. – wasteofspace Nov 08 '12 at 15:20