This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 245808 - Welcome screen spawns excessive threads
Summary: Welcome screen spawns excessive threads
Status: REOPENED
Alias: None
Product: ide
Classification: Unclassified
Component: Welcome (show other bugs)
Version: 8.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Stanislav Aubrecht
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-18 18:17 UTC by matthias42
Modified: 2015-02-05 21:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
profiler snapshot (64.87 KB, application/octet-stream)
2014-07-18 18:17 UTC, matthias42
Details
messages log (203.56 KB, text/plain)
2015-02-05 21:02 UTC, matthias42
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matthias42 2014-07-18 18:17:15 UTC
Created attachment 148144 [details]
profiler snapshot

I'm testing netbeans from current core-main. While trying to get a clear profile result, I noticed, that the welcome module looks badly broken.

I get this on command line:

SEVERE [org.netbeans.modules.welcome.content.RSSFeed]: Error message:Vorzeitiges Dateiende.
SEVERE [org.netbeans.modules.welcome.content.RSSFeed]: Line number:1
SEVERE [org.netbeans.modules.welcome.content.RSSFeed]: Column number:1
SEVERE [org.netbeans.modules.welcome.content.RSSFeed]: Public ID:null
SEVERE [org.netbeans.modules.welcome.content.RSSFeed]: System ID:null

a lot!

And the compile snaphshot show not only a few threads spawned by the welcome screen. This noise doesn't make it easier to spot the real problems.
Comment 1 Stanislav Aubrecht 2014-07-22 10:07:30 UTC
Please provide steps to reproduce and reopen. 
Under normal circumstances there is at most one reload attempt for each RSS feed.
Comment 2 matthias42 2015-02-05 21:02:56 UTC
Created attachment 151842 [details]
messages log

This is what seems to happen:

1. The url is tried: http://www.netbeans.org/mtmo.xml?unique=01baf064f-eec8-4a96-9a10-4e8ba00c3891
2. This gets a http 302 to: https://netbeans.org/mtmo.xml?unique=01baf064f-eec8-4a96-9a10-4e8ba00c3891
3. The new request (httpCon, RSSFeed.java line 231 has these Request Properties:
If-Modified-Since => [Wed, 30 Jul 2014 14:01:59 GMT]
Accept-Encoding => [gzip, deflate]
4. The server returns an 304 (this looks sane from the stream contents)
5. Netbeans reads the input file -- I checked the file - it is empty!
6. InputSource is created from an empty file and returned
7. This is fed into the XMLReader in CombinationRSSFeed.java line 94
8. The exception handler around line 370 is called (isContentCached()...)

From there clearCache is called and this looks broken - url1 in CombinationRSSFeed.java uses the original URL url1 (that is the URL from step 1) to clean the cache, and in RSSFeed#findInputSource the cache file is created/calculated based on the redirected url (from step 2). 

9. The system now asumes the cache cleaned and issues a reload (line 371 in RSSFeed.java). From there the whole retrieval is started again (and directly creating a new Thread). => Boom
Comment 3 matthias42 2015-02-05 21:03:53 UTC
Reopening as problem is still present and an explanation was found.
Comment 4 matthias42 2015-02-05 21:08:08 UTC
To fix the situation for me, I manually recreated the file (deleting it does exactly nothing):

wget -O /home/matthias/.cache/netbeans/8.0/welcome/netbeans.org/mtmo.xmlunique=01baf064f-eec8-4a96-9a10-4e8ba00c3891  https://netbeans.org/mtmo.xml?unique=01baf064f-eec8-4a96-9a10-4e8ba00c3891