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 181641 - [69cat] Code completion shows 'Scanning in progress' while CVS update is running
Summary: [69cat] Code completion shows 'Scanning in progress' while CVS update is running
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Parsing & Indexing (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal with 3 votes (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-08 13:29 UTC by Michel Graciano
Modified: 2010-11-08 13:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump (14.11 KB, application/octet-stream)
2010-03-08 13:30 UTC, Michel Graciano
Details
New thread dump (30.50 KB, application/octet-stream)
2010-03-09 12:54 UTC, Michel Graciano
Details
One more sample (7.99 KB, application/octet-stream)
2010-04-20 18:27 UTC, Michel Graciano
Details
One more sample (7.76 KB, application/octet-stream)
2010-07-27 14:13 UTC, Michel Graciano
Details
Thread dump updated (12.44 KB, application/octet-stream)
2010-11-03 11:35 UTC, Michel Graciano
Details
Picture about formatting/highlight issues (175.61 KB, image/png)
2010-11-03 11:37 UTC, Michel Graciano
Details
Screenshot of update (206.21 KB, image/png)
2010-11-03 18:11 UTC, Tomas Zezula
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2010-03-08 13:29:27 UTC
Code completion time after time show message 'Scanning in progress' but just CVS process are in progress and I need to restart the IDE to get it working again. I can't reproduce it with defined steps but I face it 2 or 3 times per day. I will attach thread dumps always it happens.
Comment 1 Michel Graciano 2010-03-08 13:30:46 UTC
Created attachment 94875 [details]
Thread dump
Comment 2 Michel Graciano 2010-03-09 12:54:10 UTC
Created attachment 94939 [details]
New thread dump

Well, the steps I use to reproduce it:
1.Starts an project CVS update;
2.Wait few seconds when the CVS operation starts and try to call CC or even Find Usages tools, and the message 'Scanning in progress...' is shown;

In process list I just can see the update action, the 'Scanning project' is just shown when the update finish. This new thread dump I started before starts CVS update action and stopped just after try to call CC.
Comment 3 Michel Graciano 2010-04-20 18:27:07 UTC
Created attachment 97744 [details]
One more sample

I take this report with daily build.
Comment 4 Michel Graciano 2010-04-20 18:29:57 UTC
The same behaviour could be seen for Find Usages and another IDE features too.
Comment 5 Michel Graciano 2010-07-27 14:13:14 UTC
Created attachment 101051 [details]
One more sample

This is a sample I've taken from 6.9.1 201007131557.
Comment 6 Michel Graciano 2010-07-27 14:17:08 UTC
I increased the priority because it just avoid me to keep working when I am doing a huge checkout which take hours.
Comment 7 Tomas Zezula 2010-10-25 15:47:46 UTC
From the nps file there is no scan running just the VCS update. But the VCS operation blocks the code completion.
Comment 8 Tomas Zezula 2010-11-02 14:24:18 UTC
Fixed jet-main 8e4091d6d215
Comment 9 Michel Graciano 2010-11-03 11:19:53 UTC
It is still valid. I will attach a new snapshot soon.

Product Version: NetBeans IDE Dev (Build 101103-10355c3c691f)
Java: 1.6.0_20; Java HotSpot(TM) Client VM 16.3-b01
System: Linux version 2.6.31-22-generic-pae running on i386; UTF-8; pt_BR (nb)
Comment 10 Michel Graciano 2010-11-03 11:35:15 UTC
Created attachment 102770 [details]
Thread dump updated

Another side effect I can see is that the code is not formatted too in this cases. For formatted, in this case I mean the code is not folded and some paintings are not performed. I will attach another picture about it soon.
Comment 11 Michel Graciano 2010-11-03 11:37:38 UTC
Created attachment 102771 [details]
Picture about formatting/highlight issues

I am not sure if this issue against formatting/highlight is related to this, so please evaluate and if possible I can file a new issue just about it, but I think all these things are related with the case that the IDE "thinks" the scanning is in progress.
Comment 12 Tomas Zezula 2010-11-03 12:58:20 UTC
According to your snapshot the IDE does real scan, so the code completion has to wait on it.
The VCS operation does not hold the scan lock.
If you have a snapshot where there is no scan active and code completion waits on scan please reopen this issue.
Comment 13 Michel Graciano 2010-11-03 13:16:05 UTC
First thing, if you can't reproduce this last comment, I think you should mark it as fixed as before instead worksforme.

About this issue, if you look at my last picture, you can see that just CVS update is running and it was still performing and no scanning is running (see that '1 more' is not present, so just 1 process is running). I am aware that when a cvs update operation finishes it runs the scanning but in this case it was still downloading a lot of jars. Could explain to me why the scanning is running, according to thread dump, and I can't see it in the process bar?
I have no idea what is starting the hidden scanning, but it looks like be always related with my CVS operations, usually update. Do you have any idea what kind of test could I do?

Thanks
Comment 14 Tomas Zezula 2010-11-03 13:25:17 UTC
OK, resolved fixed.
You can look into the attached nps file. You will find RepositoryUpdater$Task active. The scan is active and the CC cannot be started until it leaves the critical section.
I will add a logging which you can enable and let you know. You will need a newer build, I will add the logging later today. Now I have uncompleted changes in my repository.
Maybe the CVS operation does twice the protectedMode operation which starts the scan, we will se from the log.
Comment 15 Tomas Zezula 2010-11-03 18:10:41 UTC
Added logging jet-main 279ac679e44d
Comment 16 Tomas Zezula 2010-11-03 18:11:45 UTC
Created attachment 102785 [details]
Screenshot of update
Comment 17 Michel Graciano 2010-11-03 18:13:37 UTC
Thank you Tomas. I will test it soon :)
Comment 18 Tomas Zezula 2010-11-03 18:21:25 UTC
I've added logging and also attached a screenshot how the update looks like.
To use the logging you need to start the netbeans with the following option:
-J-Dorg.netbeans.modules.parsing.impl.indexing.RepositoryUpdater.level=FINE

It will generate tons of logging. To find something you will need to prepare the set up to minimize the output. Open the file you will try the code completion on it. Select the project to update. Do several empty lines in the console to find out from where the logging is important. Start the update. Again do several empty lines in console and invoke the cc.
Then attach the output from the first empty spaces to the end.
Thanks. It's really important to limit the logging as the logging is very intensive.
Comment 19 Tomas Zezula 2010-11-03 18:22:19 UTC
You will need to wait until it propagates from jet-main into main-silver. This can take several hours.
Comment 20 Michel Graciano 2010-11-08 13:19:52 UTC
I can't reproduce the problem today. I will keep looking for any kind of problem and I can report it later. Thanks for the help.

v. 101105-e5e1e4f1fe6d