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 201120 - Parsing of full remote project prevents IDE shut downing
Summary: Parsing of full remote project prevents IDE shut downing
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.0.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
: 199494 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-19 09:41 UTC by Alexander Simon
Modified: 2014-11-19 14:03 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
threads dump (47.13 KB, text/plain)
2011-08-19 09:49 UTC, Alexander Simon
Details
proposed patch (5.92 KB, patch)
2011-08-22 15:00 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Simon 2011-08-19 09:41:10 UTC
Steps to reproduce:
- open Freeway sample on remote host
- close IDE while parsing
Actual behavior:
- long waiting of finishing parsing (about 60 seconds on my environment)
Expected behavior:
- finishing parsing in couple seconds
- finishing model shut downing (count CRC) in couple seconds

Priority P2 because starting IDE again (after hiding IDE GUI and before finisinng previous) results in wild exceptions.
Comment 1 Alexander Simon 2011-08-19 09:49:26 UTC
Created attachment 110109 [details]
threads dump
Comment 2 Vladimir Kvashin 2011-08-19 10:51:08 UTC
As I understand, this can be reproduced with ordinary remote as well
in the case there are no caches for remote system headers.
Comment 3 Alexander Simon 2011-08-22 15:00:06 UTC
Created attachment 110134 [details]
proposed patch

Vladimir K. please take a look on patch.
Comment 4 Vladimir Kvashin 2011-08-24 07:04:08 UTC
I did. I agree with the changes.
I have a minor question though: wouldn you mind changing in FileImpl constructs like

if (<condition> || ModelImpl.instance().getState() == CsmModelState.CLOSING) {
    break; // or return

with a separate

if (CsmModelState.CLOSING) {
    break; // or return
}

which I believe will make reading and further modification more easy
Comment 5 Alexander Simon 2011-08-31 16:06:52 UTC
*** Bug 199494 has been marked as a duplicate of this bug. ***
Comment 6 Vladimir Voskresensky 2011-09-19 15:50:55 UTC
I´ve added some safe exit points, although there still could be delay, because i.e. if big file is transferred it takes time + jsch uses timeout and tries to recover if channel was closed.
Other places I find risky to be fixed and imho not more than P3

http://hg.netbeans.org/cnd-main/rev/0f1f35c7c10b
Comment 7 Alexander Simon 2011-09-20 07:24:24 UTC
Fix 0f1f35c7c10b does not fix problem because signal CsmModelState.CLOSING is blocked by code model tasks  waitModelTasks() and no real interrupting of onInlude().
It is a lines in first patch:
+        setState(CsmModelState.CLOSING);
         waitModelTasks();
-        setState(CsmModelState.CLOSING);
If you are concerned about swapping this lines you can introduce new intermediate state "START_CLOSING" (or flag) an use it state in onInclude().
Comment 8 Vladimir Voskresensky 2011-09-20 11:11:51 UTC
Proposed change is too risky in 7.0.1 context
Comment 9 Quality Engineering 2011-09-21 08:07:23 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/0f1f35c7c10b
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #201120  -  Parsing of full remote project prevents IDE shut downing
- interrupt inclusion loop on close
- interrupt parsing on close
- interrupt gothering file options on close
Comment 10 Vladimir Voskresensky 2011-09-28 10:56:52 UTC
extra fix
http://hg.netbeans.org/cnd-main/rev/f52c5d753214
Comment 11 Quality Engineering 2011-09-29 14:09:21 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f52c5d753214
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: extra fix for #201120  -  Parsing of full remote project prevents IDE shut downing