On runUnrestricted the finaly statement may create a session by calling session.isStateSharedByAllThreadSessions(), this session is not traked by CoreSession but leak in the geronimo pool.
at org.nuxeo.ecm.core.api.local.LocalSession.createSession(LocalSession.java:116) at org.nuxeo.ecm.core.api.local.LocalSession.getSession(LocalSession.java:106) at org.nuxeo.ecm.core.api.local.LocalSession.isStateSharedByAllThreadSessions(LocalSession.java:182) at org.nuxeo.ecm.core.api.UnrestrictedSessionRunner.runUnrestricted(UnrestrictedSessionRunner.java:142)
So we must check if the session is alive before calling isStateSharedByAllThreadSessions.
This affect 7.10 to be checked on master.