This happens whenever any operation is done on a page which is identified by groupId, layoutId and privateLayout and the page does not exist. The reason is that those same parameters are used to find out the page which will be used to show the error about the page not existing. But that generates the error again and it gets into a loop.
Example steps to test it out:
1. Create a user group with pages
2. Create a user who belongs to the user group
3. Impersonate the user and go the his pages. Try to delete a page (note that the UI might not show that option, because in reality it should not be allowed. I've tricked it by editing bottom_js.jspf and setting hasPermission to true around line 143)
After doing that you will see a huge stacktrace in the logs ending with an stack over flow error.