Hanging application on logout

Hi there,

during logout in our vaadin app we get the strange situation that the user gets a blank page/an error during logout.
Sometimes even the browser freezes (mostly in chrome).

The logout is implemented the following way:

  1. Application Logout
  2. closing Vaadin session
  3. closing http session
  4. redirect to login page

This is the code:

[code]
public void userLogoutRequest() {
// kick butt…
this.authService.logoutUser();

    // take sessions to the graveyard ...
    VaadinSession session = UI.getCurrent().getSession();
    WrappedSession httpSession = session.getSession();
    if (session != null) {
        logger.debug("Closing vaadin session " + session);
        session.close();
    }
    if (httpSession != null) {
        logger.debug("Closing HTTP session " + httpSession);
        httpSession.invalidate();
    }

    // redirect to base url, i.e. login screen
    // UI.getCurrent().getPage().getLocation().getPath()
    logger.info("Redirecting to " + this.configuration.getDmsAppUrl()); 
    UI.getCurrent().getPage().open(this.configuration.getDmsAppUrl(), "_self");
}

[/code]During logout (actually do not knwo when exactly) we see the following exception in catalina.out:

java.lang.IllegalArgumentException: Control character in cookie value or attribute. at org.apache.tomcat.util.http.LegacyCookieProcessor.isHttpSeparator(LegacyCookieProcessor.java:733) at org.apache.tomcat.util.http.LegacyCookieProcessor.getTokenEndPosition(LegacyCookieProcessor.java:716) at org.apache.tomcat.util.http.LegacyCookieProcessor.processCookieHeader(LegacyCookieProcessor.java:498) at org.apache.tomcat.util.http.LegacyCookieProcessor.parseCookieHeader(LegacyCookieProcessor.java:276) at org.apache.catalina.connector.Request.parseCookies(Request.java:3032) at org.apache.catalina.connector.Request.getServerCookies(Request.java:2048) at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:1212) at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:921) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:517) at org.apache.coyote.ajp.AbstractAjpProcessor.process(AbstractAjpProcessor.java:868) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:666) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Any hints?
We are using vaadin push in this project.
Current vaadin version with tomcat 8.0.32 on ubuntu.

Any solutions? We just started seeing this in a new build of our application. It sometimes happens on page refresh, also, and has been observed in both Chrome and Firefox.