Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

High CPU usage after auto-complete/template expansion fail

User_TMTV7Feb 22 2022 — edited Feb 22 2022

The issue I see is that, when auto-complete fails, sqldeveloper hits high CPU usage (somewhere around 70%) as shown by 'top'. Once sqldevloper hits that state, it remains so; and the only way out is to restart the application. Obviously, I'm on Linux (CentOS) where I see this.
An example: I've a a template $tn that expands to ticket_number, a common column in our tables. Sometimes, I've to hit control+space multiple times to get that to expand. At times it won't expand at all ($tn then turns red), and that's when the CPU usage shoots up. And from that point onward, no auto-completion works. App restart is the only way out.
I'm currently on 21.4.2. I hit the issue multiple times on a good day, so it's not very exciting to restart the application multiple times. I'd like to know if this is a known issue, and/or where I can submit a bug report. Happy to offer any diagnosis I can.

Comments

User_TMTV7

The issue is reproducible if I were to attempt an auto complete in a following statement were the statement before it has a syntax error. The completion fails, the CPU usage shoots up as a result.
It'd be great if someone can reproduce this problem. Alternatively, is there somewhere I can raise a bug report?

thatJeffSmith-Oracle

My Oracle Support

User_TMTV7

Per this discussion (https://community.oracle.com/tech/developers/discussion/4051424/where-can-i-report-an-sqldeveloper-bug) I gather that's for paying customers. I, however, am not one. So I guess leave this post here and check back later.

thatJeffSmith-Oracle

correct, your company/org/customer needs a valid support contract for the database
i can take a look at your use case, but does the CPU issue happen even if i'm not using templates? or is it only when templates are involved? and if so, how many templates do you have?

User_TMTV7

FWIW, my employer does have an Oracle license - our production DB is Oracle. But I'm posting this on personal capacity; and I doubt the employer will be happy to associate my personal account to the official official one.
Since your last message, I tried to reproduce the issue on a fresh worksheet, but I wasn't able to get a completion to fail. I suspect sure the failed completion (when that happens) is only a trigger, and that the underlying reason ought have happened much before the completion fail, and that the completion failure only pushes it over the edge.
To answer your question: I think the CPU usage issue happens with any failed completion, not just template. I originally mentioned templates because I tend to use them often, but IIRC, I've encountered the issue even for other failed completions. Also, I have only a dozen or so templates configured, not more.
Is there any diagnosis I can pull out when I hit the issue next? I don't suppose 'top' showing 100% usage will do much help.

Java stack trace would pinpoint to the culprit.

User_TMTV7

Thanks; will grab one the next time I hit the issue.

User_TMTV7

It took a while for me to hit the issue again, but I'm attaching the stack dump of the process hitting high CPU usage.
sqldeveloper_jstack.txt (29.76 KB)

1 - 8

Post Details

Added on Feb 22 2022
8 comments
201 views