Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Eclipse Titan hangs due to waiting user operation(After modifiing and saving a file, eclipse hangs due to waiting user operation)
Eclipse Titan hangs due to waiting user operation [message #1746863] Sun, 06 November 2016 20:14 Go to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Hello,

I get the attached error message after changing some TTCN-files. I have reinstalled eclipse, cleaned the workspace, recreated the project. Started eclipse with -clean option in eclipse.ini file, removed the .lock file in the workspaces metadata and tried all other recommendations I have found. Nothing helped.

I am using eclipse under ubuntu 16.04. I noticed that after ecplise titan reinstalled the "Titanium feature" package did not install due to dependency problems.

Regards,
Michael

Re: Eclipse Titan hangs due to waiting user operation [message #1746871 is a reply to message #1746863] Mon, 07 November 2016 06:54 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
Hi Michael,

We will need some more information to help.

Please go to the Window / Preferences / TITAN Preferences and enable the "Display debug preferences" option, when you press the Apply button a new preference page with the name "Debug" will appear right below the TITAN Preferences page.
On this debug page you can enable "Enable debug console".

This will do 2 things that can help us proceed:
- the on-the-fly analyser running in the background will appear in the progress window.

- we will display some information on the Console View that can be used to debug, why these operations take too long.
Re: Eclipse Titan hangs due to waiting user operation [message #1746897 is a reply to message #1746871] Mon, 07 November 2016 13:03 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Hi Kristof,

looks like the analyzer stalls. Please find the make archive attached.
The error occurs when changing e.g. line 258 in SocketCANtest.ttcn the the word 'params' to 'connectu'.
Re: Eclipse Titan hangs due to waiting user operation [message #1746898 is a reply to message #1746897] Mon, 07 November 2016 13:24 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Please try entering the letters of 'connectu' letter by letter. It might be due connect being a keyword (and maybe 'param' without 's' also a keyword).

I've terminated Eclipse and changed the word with an other editor, made a similar change to 'bindu' in line 280 and reopened it with Titan again. Now the problem did not reappear.
Re: Eclipse Titan hangs due to waiting user operation [message #1746902 is a reply to message #1746898] Mon, 07 November 2016 13:43 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
Can you re-produce the problem consistently in some way?

On my machine the debug output looks like this (there is no difference if I stop at connect for a bit, or type in the connectu completely):
"
**Selection with Broken parts via references is ended at: 2016.11.07 02:27:14.705
**Selection time is: 0.003629559 seconds (3629559 nanoseconds).
**Nr. of broken modules: 1
**Broken modules name: [module: SocketCANtest]

** Had to start checking at 1 modules.
**On-the-fly semantic checking of projects (18 modules) took 0.016450368 seconds
The whole analysis block took 0.017276769 seconds to complete
"

I tried this with 0 seconds delay set and on-the-fly semantic checking not delayed till save.
So, I had 8 such checks according to the debug console (but as they all together were below 0.2 sec I could not notice any stopping)

Could it happen that you had some resource intensive application running in the background (creating higher load for the system)?

And other thing to check is the version of Java/JVM you have.
In the past we have run into issues with IcedTea's support of XML and performance ... that could also be an option to check here.

If you can consistently reproduce the issue and have some JavaSDK installed, you could connect with JVisualVM (part of the Java SDK) to the running process and export the stack trace of all processes at once.
This way we could see in which source lines the threads are waiting ... and what locks are in effect.
Re: Eclipse Titan hangs due to waiting user operation [message #1746908 is a reply to message #1746902] Mon, 07 November 2016 15:20 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
>Can you re-produce the problem consistently in some way?
Yes. I revered the change. The bug is there again.

>Could it happen that you had some resource intensive application running in the background (creating higher load for the system)?
No.

> And other thing to check is the version of Java/JVM you have.
java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

>If you can consistently reproduce the issue and have some JavaSDK installed, you could connect with JVisualVM (part of the Java SDK) to the running process and export the stack trace of all processes at once.
This way we could see in which source lines the threads are waiting ... and what locks are in effect.

It is attached.
Re: Eclipse Titan hangs due to waiting user operation [message #1746990 is a reply to message #1746908] Tue, 08 November 2016 11:44 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
This is very strange.

According to the thread dump you are using "OpenJDK 64-Bit Server VM (25.111-b14 mixed mode)", not "Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)".

It might happen that somehow your java versions got mixed up, and you are not really using the one you wished to use.

---

On the other hand, the thread dump itself is also strange.
Although the CountDownLatch is really used to wait until the parsing of files is finished, that thread is waiting for a lock that just does not appear anywhere else in the thread dump.

Could you please check the output on your debug console, to see what the Designer tries to re-analyze after these changes?
On my machine it only needs to re-check the file changed .. maybe we misscalculate something there.
Re: Eclipse Titan hangs due to waiting user operation [message #1746993 is a reply to message #1746990] Tue, 08 November 2016 12:09 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
+1 idea to check:
Could you check if you are running low on memory in eclipse?

To do this please go to Window / Preferences and on the first page that it opens up with (which is also the General) enable the "Show heap status" option.
When this option is enabled Eclipse displays a new control in the toolbar, on the bottom of the screen.
This control shows the actual memory usage and how much memory is the maximum allowed for eclipse to use.

Are we hitting some kind of upper limit when this issue appears?
Or could it happen that some of the locks are freed up in the background to save memory?
Re: Eclipse Titan hangs due to waiting user operation [message #1747026 is a reply to message #1746990] Tue, 08 November 2016 15:50 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
> Could you please check the output on your debug console, to see what the Designer tries to re-analyze after these changes?
On my machine it only needs to re-check the file changed .. maybe we misscalculate something there.

This is the console output. (I do not have any special debug console):
TTCN-3 and ASN.1 Compiler for the TTCN-3 Test Executor
Product number: CRL 113 200/5 R5A
Build date: Aug 1 2016 18:50:42
Compiled with: GCC 5.4.0

Copyright (c) 2000-2016 Ericsson Telecom AB

Operation finished successfully.

>Could you check if you are running low on memory in eclipse?
The memory usage grows from maybe 89 MB to 215 MB (of 256 MB).
Then it drops back to 89 MB and grows again ....

The text besides always tells 'Analyzing the source code (0%)'

[Updated on: Tue, 08 November 2016 15:56]

Report message to a moderator

Re: Eclipse Titan hangs due to waiting user operation [message #1747031 is a reply to message #1747026] Tue, 08 November 2016 16:43 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 60
Registered: July 2015
Member
If you have the debug output enabled you should have the debug console working ... but it is really not that obvious to find in eclipse for the first run.
In the toolbar of the console view there is an computer shaped icon, with a drop down option ... that is where you decide which console's output you wish to see in the console view window.
(fun fact: it is possible to create as many console views as you like, each displaying something different to observe several outputs at the same time).

---

While looking for this issue I found and fixed a consistency bug, that might be related to this issue.
Not so long ago we introduced a feature, where before running out of memory, the designer will free up all its semantic information. This way it looses all advanced functionality, but at least eclipse will not crash.
If the bug you found is related this it should disappear when you turn this feature off, by going to Window/Preferences/ TITAN Preferences/On-the-fly checker and disable the option "Warn and disable parsing before the system runs out of memory".
(I hope after the fix turning off this option will not be needed)

Could you please check if disabling this option has an effect on the problem?
Re: Eclipse Titan hangs due to waiting user operation [message #1747102 is a reply to message #1747031] Wed, 09 November 2016 13:17 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Michael,

I have the impression that you allocate too little memory for Eclipse;

please check par. 5.2 of the Eclipse install guide:


5.2 Configuring Java
You might need to modify your eclipse.ini file (usually located in the same directory as your eclipse executable.)
It is suggested to have at least 1GB and recommended 2 GB free memory per 1 million TTCN-3/ASN.1 source code lines (but it strongly depends on the code complexity). In Java it is controlled via the Xmx option.
For example, if Java 1.6 or 1.7 is applied and a project of 2 million TTCN-3 code lines is edited, the suggested settings in eclipse.ini are these:

-vmargs
-XX:MaxPermSize=2048M
-Dosgi.requiredJavaVersion=1.7
-Xms1024M
-Xmx4g


If Java 1.8 is used then MaxPermSize is ignored, its support is removed. Use these settings instead:

-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-Xms1024M
-Xmx4g


Notes:
If you cannot edit the eclipse.ini file, you can start eclipse with flags. For example
eclipse vmargs -Xmx4g
modifies the maximum memory allocation for the virtual machine.



Please try to increase allocated memory in eclipse.ini

You don't have a lot of code but 256M sounds insufficient.


BR

Elemer

Re: Eclipse Titan hangs due to waiting user operation [message #1747200 is a reply to message #1747102] Thu, 10 November 2016 16:44 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Ok. Here is the debug output:
On-the-fly analyzation of project titan.TestPorts.SocketCANasp started
  **It took 3.426012414 seconds till the files (23 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed

**Selection with Broken parts via references is started at: 2016.11.10 05:41:35.848
  ** Module SocketCAN__Templates can not be skipped as it was not yet analyzed.
  ** Module Isobus can not be skipped as it was not yet analyzed.
  ** Module Isotptest can not be skipped as it was not yet analyzed.
  ** Module IsobusMessageTypes can not be skipped as it was not yet analyzed.
  ** Module IsobusCMMessageTypes can not be skipped as it was not yet analyzed.
  ** Module Raw can not be skipped as it was not yet analyzed.
  ** Module Isobustest can not be skipped as it was not yet analyzed.
  ** Module SocketCAN__BCM__test can not be skipped as it was not yet analyzed.
  ** Module Bcm can not be skipped as it was not yet analyzed.
  ** Module SocketCAN__PortType can not be skipped as it was not yet analyzed.
  ** Module J1939 can not be skipped as it was not yet analyzed.
  ** Module Can can not be skipped as it was not yet analyzed.
  ** Module SocketCAN__RAW__test can not be skipped as it was not yet analyzed.
  ** Module test2 can not be skipped as it was not yet analyzed.
  ** Module test3 can not be skipped as it was not yet analyzed.
  ** Module SocketCANtest can not be skipped as it was not yet analyzed.
  ** Module IsobusNMMessageTypes can not be skipped as it was not yet analyzed.
  ** Module IsobusVTMessageTypes can not be skipped as it was not yet analyzed.
  ** Module CanError can not be skipped as it was not yet analyzed.
  ** Module Isotp can not be skipped as it was not yet analyzed.
  ** Module General__Types can not be skipped as it was not yet analyzed.
  ** Module SocketCAN__Types can not be skipped as it was not yet analyzed.
  ** Module Isobus__Templates can not be skipped as it was not yet analyzed.
**Selection with Broken parts via references is ended at:   2016.11.10 05:41:35.862
**Selection time is:     0.013229685000000001 seconds (13229685 nanoseconds).
**Nr. of broken modules: 23
**Broken modules name:   [module: SocketCAN__Templates, module: Isobus, module: Isotptest, module: IsobusMessageTypes, module: IsobusCMMessageTypes, module: Raw, module: Isobustest, module: SocketCAN__BCM__test, module: Bcm, module: SocketCAN__PortType, module: J1939, module: Can, module: SocketCAN__RAW__test, module: test2, module: test3, module: SocketCANtest, module: IsobusNMMessageTypes, module: IsobusVTMessageTypes, module: CanError, module: Isotp, module: General__Types, module: SocketCAN__Types, module: Isobus__Templates]

  ** Had to start checking at 23 modules. 
  **On-the-fly semantic checking of projects (23 modules) took 0.730165546 seconds
The whole analysis block took 4.261023067 seconds to complete
On-the-fly analyzation of project titan.TestPorts.SocketCANasp started
  ** Had to start checking at 0 modules. 
  **On-the-fly semantic checking of projects (23 modules) took 2.81321E-4 seconds
The whole analysis block took 0.0026314100000000003 seconds to complete
  **It took 0.045728091000000005 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.049333578 seconds to complete
  **It took 0.111342092 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.11174542500000001 seconds to complete
  **It took 0.102277881 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.102750357 seconds to complete
  **It took 0.054393090000000005 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.054744182 seconds to complete
  **It took 0.064461828 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.065253689 seconds to complete
  **It took 0.09879035600000001 seconds till the files (22 pieces) of project titan.TestPorts.SocketCANasp got syntactically analyzed
The whole analysis block took 0.099098984 seconds to complete



> Window/Preferences/ TITAN Preferences/On-the-fly checker and disable the option "Warn and disable parsing before the system runs out of memory".

There is no such preferences option in my Titan preferences tab. The option "Treat on-the -fly error as fatal for the build was not activated. See attachment.

When activation above option nothing changes. See attachment.

[Updated on: Thu, 10 November 2016 17:13]

Report message to a moderator

Re: Eclipse Titan hangs due to waiting user operation [message #1747205 is a reply to message #1747200] Thu, 10 November 2016 17:18 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Hello Elemer,

please find my (modified) eclipse.ini

-startup
plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
--launcher.library
/home/michael/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.400.v20160518-1444
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-8-openjdk-amd64/jre/bin
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms1024m
-Xmx4g
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/


Before I had the values:
 
-Xms256m
-Xmx1024m


The change has no impact on the error. The error still occurs.

Br,
Michael
Re: Eclipse Titan hangs due to waiting user operation [message #1747351 is a reply to message #1747200] Sun, 13 November 2016 10:57 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi Michael,

The "TITAN Preferences" can be expanded in the left hand panel, to provide you with more customization options.
When you expand it you will see the "On-the-fly checker" preference page among others.
There you can check out some of the performance affecting options:
- you can find here the out of memory related option, I mention earlier.
- you can delay the semantic checking until you save a file. This way while you are editing the load on your machine is smaller as only syntax checking is done ... but this also means that internal semantic information is becoming outdated.
- you can also set how much after your last change the code checking should start. If you have high load, or synchronization issues it might be a good idea to increase it to 2-3 seconds

This "On-the-fly checker" page can also be expended if you wish to configure the severity of how naming convention violations and some other issues should be reported.
Re: Eclipse Titan hangs due to waiting user operation [message #1747520 is a reply to message #1747351] Tue, 15 November 2016 15:43 Go to previous messageGo to next message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Hi Kristof,

I do not find such options. Please see screenshot.

Michael
Re: Eclipse Titan hangs due to waiting user operation [message #1747578 is a reply to message #1747520] Wed, 16 November 2016 08:38 Go to previous messageGo to next message
Kristof Szabados is currently offline Kristof SzabadosFriend
Messages: 82
Registered: July 2009
Member
Hi Michael,

As the memory configuration option is truly missing, If I'm not mistaken you are using an older version of the plugins.

One way to proceed forward could be to check if you can update your plugins to the newest (5.5.1) version, to see if the issue still persists.

On the other hand we are just a few days from release -ing a new version,
I have corrected an inconsistency issue with our handling of the CountDownLatch, which class is also present in the stack traces you have sent.
So it could very well be, that this version will already fix the issue you are experiencing.
And we just have to wait for this release and try it out.
Re: Eclipse Titan hangs due to waiting user operation [message #1747911 is a reply to message #1747578] Wed, 16 November 2016 17:23 Go to previous message
Michael Josenhans is currently offline Michael JosenhansFriend
Messages: 99
Registered: February 2016
Member
Hi Kristof,

>One way to proceed forward could be to check if you can update your plugins to the newest (5.5.1) version, to see if the issue still persists.
I regularly have problems to find the installation instructions for the latest release. Probably I took an old version of the install instructions in the documentation set.

I'll wait for the next release.

Michael

[Updated on: Wed, 16 November 2016 17:26]

Report message to a moderator

Previous Topic:Titan Architecture internals: On why index operators in the generated code have signed parameter
Next Topic:Open source contributions to the Eclipse Titan
Goto Forum:
  


Current Time: Thu Apr 25 19:03:40 GMT 2024

Powered by FUDForum. Page generated in 0.03434 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top