I'm getting the same problem in Emacs 22.2.1 in Ubuntu. Steps to reproduce.
1. start emacs without any resource file (.emacs or any other rc file) <--- this is avoid if there is some problem with user init file.
2. open file called 'test.c' 3. copy content of "http://www.rfc-editor.org/rfc/rfc2547.txt" into test.c and save it. 4. do C-k till section "3.1 Virtual Sites" in the current buffer.
5. Trying continuous C-/, emacs is **not** getting into beginning of the buffer. I get only few lines as undo. Just 5 lines i can do undo. Not more than that.
Without font-lock-mode (after disabling font-lock-mode), i tried same sequence, i can get some more lines in undo but not the whole buffer. So, as you pointed out font-lock-mode has some impact with undo.
Increased undo-limit,undo-strong-limit,undo-outer-limit to 100,000,000. I repeated the same steps from 1, 5. This time, I'm able to do full undo.. I dont mind setting this value in my .emacs because memory is not a problem for me. But, would this cause any other problem like performance or buffer loss ?.