@masterkain Are you sure the error is from this commit, and not from Devise update or something like that? we are using this version on production in a fair big codebase and I didnt see this error yet.(which version of devise are you using?)

Yes, I'm fairly sure, the error begins with this commit, devise is unchanged, I'm using 2.2.7.

I immediately suspected rails was involved, so I reverted the bundle update commit (which updated just few gems) and started to try all the rails commits I was missing (about 8), and this is the one generating the infinite loop.

yeah I'm trying to see where the bug lies, the fact that the stacktrace flags the instrumentation and given I have callbacks using them I have some chance to assemble something for reproducing the behavior.