Vaadin 8.4.1 works in single-thread mode while changing the views

If I open my Vaadin-based app in different tabs and try to navigate to a view that loads a lot of data on one tab I can’t navigate among the views in the others. They stuck while changing the view until long-running operation on the first tab is over.

And another example of the issue: if I open multiple tabs simultaneously they noticeable render one by one. So it looks like only one “Navigator” in one thread works at the same time.

I’m using Vaadin 8.4.1, vaadin-cdi 2.0.0, Java EE 7, GlassFish 4.1.1, Eclipselink 2.7.1.

Stuck threads looks like this:

 "http-listener-1(4)" - Thread t@36
    java.lang.Thread.State: WAITING
    at sun.misc.Unsafe.park(Native Method)
    - waiting to lock <8d265d2> (a java.util.concurrent.locks.ReentrantLock$NonfairSync) owned by "http-listener-1(3)" t@35
    at java.util.concurrent.locks.LockSupport.park(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(
    at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(
    at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(
    at java.util.concurrent.locks.ReentrantLock.lock(
    at com.vaadin.server.VaadinService.lockSession(
    at com.vaadin.server.VaadinService.findOrCreateVaadinSession(
    at com.vaadin.server.VaadinService.findVaadinSession(
    at com.vaadin.server.VaadinService.handleRequest(
    at com.vaadin.cdi.server.VaadinCDIServletService.handleRequest(
    at com.vaadin.server.VaadinServlet.service(
    at javax.servlet.http.HttpServlet.service(
    at org.apache.catalina.core.StandardWrapper.service(

Running thread:

 "http-listener-1(3)" - Thread t@35
    java.lang.Thread.State: RUNNABLE
    at Method)
    at org.postgresql.core.VisibleBufferedInputStream.readMore(
    at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(
    at org.postgresql.core.PGStream.receiveChar(
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(
    at org.postgresql.core.v3.QueryExecutorImpl.execute(
    - locked <237b368a> (a org.postgresql.core.v3.QueryExecutorImpl)
    at org.postgresql.jdbc.PgStatement.executeInternal(
    at org.postgresql.jdbc.PgStatement.execute(
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(
    at org.postgresql.jdbc.PgPreparedStatement.executeQuery(
    at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeSelect(
    at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(
    at com.sun.proxy.$Proxy190.fetchData(Unknown Source)
    at myCustomApp.vaadin.view.MyView.enter(
	at com.vaadin.navigator.Navigator.performNavigateTo(
    at com.vaadin.navigator.Navigator.lambda$navigateTo$9a874efd$1(
    at com.vaadin.navigator.Navigator$$Lambda$29/ Source)
    at com.vaadin.navigator.ViewBeforeLeaveEvent.navigate(
    at com.vaadin.navigator.View.beforeLeave(
    at com.vaadin.navigator.Navigator.runAfterLeaveConfirmation(
    at com.vaadin.navigator.Navigator.navigateTo(
    at com.vaadin.navigator.Navigator.navigateTo(


I have 100% uncoupled backend so along with Vaadin UI I have the spare old-good-servlet-based one that works perfectly. I can open couple of dozens tabs with servlets that invoke absolutely the same backend methods and they render simultaneously. So it’s hardly something with Java EE/EclipseLink.

Does anybody have any ideas where to start in solving this mystery? Maybe it’s related to CDI somehow? Is it bug or feature eventually :)?

It looks like it’s core limitation of the Vaadin framework. According to the stack-trace it stuck on obtaining a session. But session is shared among tabs so unavoidably any attempt to open a new tab or navigate to another view will lead to a lock. If it’s so it means that Vaadin can’t normally work in a different tabs what is a dramatic disadvantage :(.

If I open new tabs in an incognito mode (no cookies - different sessions) it works fine and tabs render simultaneously as expected.