Bug 424334 - Views missing on fresh browser / InvocationTargetException by first visit
Summary: Views missing on fresh browser / InvocationTargetException by first visit
Status: ASSIGNED
Alias: None
Product: Hudson
Classification: Technology
Component: Core (show other bugs)
Version: 3.1.0   Edit
Hardware: All All
: P3 major with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Winston Prakash CLA
QA Contact: Geoff Waymark CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-18 08:42 EST by Marc Pompl CLA
Modified: 2013-12-23 02:23 EST (History)
5 users (show)

See Also:


Attachments
views are missing by fresh browser (69.92 KB, image/jpeg)
2013-12-18 08:42 EST, Marc Pompl CLA
no flags Details
InvocationTargetException occuring in the log (11.09 KB, text/plain)
2013-12-18 08:44 EST, Marc Pompl CLA
no flags Details
InvocationTargetException with deactivated audit plugin (11.09 KB, text/plain)
2013-12-19 04:04 EST, Marc Pompl CLA
no flags Details
list of installed plugins (23122013) (10.98 KB, text/plain)
2013-12-23 02:23 EST, Thomas Leufkes CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Pompl CLA 2013-12-18 08:42:50 EST
Created attachment 238436 [details]
views are missing by fresh browser

Hello,

we have installed 3.1.0-RC for an existing hudson farm. We are experiencing the following problem:

If you start a fresh browser and visit the start page/overview of hudson (i.e. http://hudson.mycompany.com/hudson/) the right part with the views is missing (see attachement).
Additionally, an InvocationTargetException appears in the log (see attachement).


You can workaround the problem by following these step:
If you visit a link for a slave or a project the problem disappears within the sesssion. The overview shows the views at the right hand. seems the slave/project pages sets an JSESSIONID-Cookie which solves the problem. This matches the message of the stacktrace "Cannot create a session after the response has been committed".

The problem occurs every time a fresh browser has been started.
Comment 1 Marc Pompl CLA 2013-12-18 08:44:42 EST
Created attachment 238437 [details]
InvocationTargetException occuring in the log

Ahem, we installed 3.1.1-RC, not 3.1.0-RC ;-)
Comment 2 Bob Foster CLA 2013-12-18 17:11:18 EST
I don't reproduce this problem in Firefox, Chrome or Safari. What browser are you using?
Comment 3 Marc Pompl CLA 2013-12-18 17:18:30 EST
We see the phenomenon on Firefox, on Chrome, and on Internet Explorer.
Comment 4 Marc Pompl CLA 2013-12-18 17:28:19 EST
(In reply to Marc Pompl from comment #3)
> We see the phenomenon on Firefox, on Chrome, and on Internet Explorer.

To be clear, other browsers aren't tested by us until now.
Comment 5 Winston Prakash CLA 2013-12-19 01:47:37 EST
Marc, can you give some more details

- How do you run Hudson, as a standalone server or deploy to an appserver

I'm not sure if this is specific to 3.1.1

Generally this error occurs if the HTTP response buffer is not large to hold response created (too many jobs and columns in the table) and overflows,  then a forced flush happens (commit http://docs.oracle.com/javaee/5/api/javax/servlet/ServletResponse.html#flushBuffer%28%29).  However, if the user session is not yet created,  then the server throws this error.

I'm not sure which appserver you are using, but in tomcat you can set the buffer size in the HTTP connector in the server.xml
Comment 6 Winston Prakash CLA 2013-12-19 01:50:44 EST
Looking at the exception, this is specifically caused by audit_trail plugin. To test, can you disable that plugin and see if you still see the error.
Comment 7 Marc Pompl CLA 2013-12-19 03:15:06 EST
Hi Winston,

we have tried to deactivate audit_trail plugin, without any effect.

Additionally, we have put the following settings in server.xml according to your guidance and this article http://stackoverflow.com/questions/7271186/how-do-i-set-tomcat-response-buffer-size-trough-configuration

bufferSize="64000" 
maxHttpHeaderSize="64000"
socket.appWriteBufSize="64000"
socket.appReadBufSize="64000"

But these settings didn't help either. :-(

Our system is as follows
* Hudson 3.1.1-RC (previously 2.2.1 was installed) as WAR
* deployed on Tomcat 6.0.18
* audit_trail plugin has version 1.8-h-1
* Operating System fpr the master is Linux 2.6.18-371.1.2.el5 #1 SMP x86_64 x86_64 x86_64 GNU/Linux
* JDK 1.6.0_18
* round about 500 hudson jobs
* nearly 50 slaves
* overview has 26 tabs and defaults to a tab showing the failed jobs (16 at the moment)

Furthermore, we have tried to remove the cookie JSESSIONID in the browser after following the workaround. The problem reappears immediatly in the same browser session.
Comment 8 Marc Pompl CLA 2013-12-19 04:04:43 EST
Created attachment 238462 [details]
InvocationTargetException with deactivated audit plugin
Comment 9 Winston Prakash CLA 2013-12-19 14:12:05 EST
(In reply to Marc Pompl from comment #8)
Hi Marc, we are looking at the issue and trying to reproduce it on our side. 

One of the reason why we introduced Team Concept  http://wiki.eclipse.org/Hudson-ci/features/Team_Concept in Hudson 3.1.0 is to isolated Jobs per team. The jobs are isolated based on teams so that only jobs belong to the logged in users team is displayed. This solves the problem of too many jobs being displayed all the time and having to create too many tabs.
Comment 10 Winston Prakash CLA 2013-12-19 14:35:48 EST
(In reply to Winston Prakash from comment #9)

Just to double check I upgraded hudson-on-hudson (http://ci.hudson-ci.org/) to Hudson 3.1.1 and not seeing the issue.

It runs on a Linux VM

Linux  2.6.32-400.1.1.el5uek #1 SMP Mon Jun 25 20:25:08 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux

Main differences I see are

- Deployed on tomcat apache-tomcat-7.0.34
- java version "1.7.0_11" Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
- Number of jobs are less (about 100)
Comment 11 Winston Prakash CLA 2013-12-19 19:45:05 EST
(In reply to Winston Prakash from comment #10)

Out of curiosity, can you try Hudson 3.0.1 instead of Hudson 3.1.1
Comment 12 Thomas Leufkes CLA 2013-12-20 01:29:35 EST
(In reply to Winston Prakash from comment #11)
> (In reply to Winston Prakash from comment #10)
> 
> Out of curiosity, can you try Hudson 3.0.1 instead of Hudson 3.1.1

Sorry Winston, currently we only have a live system (unfortunately, no test) and I definitely want to avoid problems when downgrading to version 3.0.1 - so close to the Christmas holidays ;-)

A perhaps more important aspect is that we use the Servlet Container Security Realm with matrix-based security.

best regards,
Thomas
Comment 13 Winston Prakash CLA 2013-12-20 11:33:54 EST
(In reply to Thomas Leufkes from comment #12)

> Sorry Winston, currently we only have a live system 
> (unfortunately, no test) and I definitely want to avoid 
> problems when downgrading to version 3.0.1 - so close to the 
> Christmas holidays ;-)

You moved from 2.x to 3.x with out setting up a sandbox instance? I admire your courage or should I say faith in Hudson :)

Why I said to try with 3.0.1 was, in Hudson 3.1.0 we introduce a new data model to reduce memory footprint. I spoke to the engineer who implemented the new data model yesterday and clarified that in memory objects will be allowed to garbage collected only if the user is inactive for more than 1 minute and never with in the scope of the HTTP request. This data model change introduces slight delay in page load, but with enormous advantage in overall memory foot print reduction.

When I leave the browser inactive for more than 1 minute, I do see a slight delay in page load. Initially the page looks like your screenshot, but recovers with in few seconds.

I just wanted to make sure, the new data model is not the one causing phenomenon you see (though I doubt that).

Have a great Christmas Holidays and looking forward to work with you guys in the new year.
Comment 14 Winston Prakash CLA 2013-12-20 12:27:46 EST
(In reply to Winston Prakash from comment #13)
Can you send us the list of plugins you have installed. We will make sure those plugins are installed in our test environment.
Comment 15 Thomas Leufkes CLA 2013-12-23 02:23:14 EST
Created attachment 238536 [details]
list of installed plugins (23122013)

Merry Christmas and a Happy New Year,
 Thomas