Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE: (18 Items)
   
Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Under Windows XP Pro SP3, after a clean installation of QNX SDP v6.4.1 w/ IDE v4.6, a prospect tried to build the latest
 i.MX25 BSP and the IDE always locks up w/o any error messages or pop up window. IDE also freezes when building other 
BSPs (i.e. i.MX31) The user has to kill qde.exe from the Task Manager and manually restart the IDE. However, Building 
the same BSP using command line tools is always successfull. I attached .log file that shows several error messages. Can
 you please help in interpreting these errors? Any tips to fix the problem would really be appreciated. Thank you, Karim
 Mouline.
Attachment: Text ATT24928_log2.log 41.13 KB
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Hi, Karim,

The only messages in the log that seem relevant to your scenario are a
couple that indicate a dropped HTTP connection in attempting to download
the BSP in the first place (I assume that succeeded) and this one:

!ENTRY org.eclipse.cdt.core 1 0 2010-02-03 14:47:13.930
!MESSAGE Indexed 'bsp-freescale-i.mx25-3ds-src' (391 sources, 201
headers) in 7.16 sec: 22,954 declarations; 58,439 references; 252
unresolved inclusions; 389 syntax errors; 7,539 unresolved names (8.48%)

which indicates quite a badly malformed project.  There should not be so
many unresolved elements and syntax problems.  As the BSPs are delivered
as ZIP archives, I can't imagine that the BSP package was corrupted,
otherwise the extraction would have presented errors.  So, something
appears to be incorrectly set up in your IDE environment.

It looks like you're running IDE 4.6 on Windows.  Which SDP version are
you targeting?  What is your IDE's environment?

Unfortunately, the log file that you attached has no other hints about
what is happening.

Cheers,

Christian

Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Hi Chris, thanks for the quick reply.
I actually saw some other error messages in .log that I thought would be relevant like:

!ENTRY org.eclipse.ui.console 4 2 2010-02-03 14:55:51.518
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.console".
!STACK 0
org.eclipse.swt.SWTException: Device is disposed
	at org.eclipse.swt.SWT.error(SWT.java:3777)
	at org.eclipse.swt.SWT.error(SWT.java:3695)
	at org.eclipse.swt.SWT.error(SWT.java:3666)
	at org.eclipse.swt.widgets.Display.error(Display.java:1180)
	at org.eclipse.swt.widgets.Display.asyncExec(Display.java:648)

Using the same setup i.e. QNX SDP v6.4.1 w/ IDE v4.6 in Win XP Pro SP3 + i.MX25 BSP, I was able to build the whole 
project on my machine w/o any problems but the  customer is unable to do so on his machine, although both environments 
(his and mine) look identical. 

Do you think it could a Java related problem? The prospect is using J2SE Runtime Environment v5.0 Update 16 and Java SE 
v6 1.6.0 
I have older Java versions on my machine.

MORE INFO: 
1- I got him to successfully build the i.MX25 BSP on the command line, all binaries were built w/o a single error 
message so it's clearly not a Tools issue but strictly an IDE issue.

2- A Sample "Hello World" compile and links w/o any errors inside the IDE.

Thanks again for your help,
Karim Mouline.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
The SWT Exception is a known bug in Eclipse platform 3.4.2 - https://bugs.eclipse.org/bugs/show_bug.cgi?id=257970. It's 
a synchronization issue when the console view uses an already-deposed Display object. It's fixed in Eclipse platform 3.5
 which is included in IDE 4.7 release.

How did your customer import the BSP source? Did he import from the Foundry repository or from a local archive file? 
Looking at his log file, at the beginning he seemed to be importing from the Foundry repository but had problem locating
 the BSP source definition file (maybe due to network issue?). And after he imported his source project seemed to be 
corrupted having a large number of indexing errors and syntax errors.

Since you could successfully build the BSP, the BSP souce should not have any error otherwise you would have compile 
error.

Maybe you can find the zip archive of this BSP and ask your customer to import using the archive?

Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy,

Thanks for looking into the SWT Exception which is a known bug in Eclipse platform 3.4.2. I understand from your 
comments that it should not "break" building a BSP.
Regarding your question about "How the BSP was imported?", the customer actually downloaded the .zip file seperately i.e
. outside the IDE, and then did an Import of "QNX Source Package".
I followed your suggestion and sent him my .zip file, which I was able to successfully import and build inside the IDE 
on my machine, but it didn't help him much, as his IDE still freezes @ ~ %20 completion.

Any thoughts or tips I can ask him to try?
Thanks,
Karim.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Karim, could you ask your customer to do following two steps before running a build?

1) Close the console view
2) Go to Windows -> Preferences -> C/C++ -> Build Console page, un-check the "Open console when building" box

This is to verify that it's the console view causing the U.I. freezing.

And if it still freezes, can the customer take a snapshot of his Windows Task Manager processes list? I am interested to
 see which process (or processes) is eating the CPU cycle.

Thanks,
Andy
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy, 

I asked my customer to try your suggestions and I'll let you know once I hear back from him.
I also thought about asking him to index the project before a build launch because the IDE freezes during some 
dependencies check and other file parsing, even before gcc fires up. Any thoughts here?

Thanks,
Karim.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Hi, Karim,

That's a good idea.  This definitely is beginning to sound more like a
deadlock (in which the CPU will be idle) than like a CPU pegging
situation.

Is your customer running on a multi-core system?  Are you?  Perhaps
there is a race condition in the IDE that their system always loses,
resulting in deadlock.  In any case, it is critical to know whether the
IDE is deadlocked or not.

Can you ask your customer to launch the IDE in a console and then
request a heap dump that we can analyze?

  On windows:
    - launch "eclipsec.exe" in the %QNX_HOST%\usr\qde\eclipse folder
instead of qde.exe
    - when the IDE appears to have hung, press Ctrl+Break in the console
window

  On Linux:
    - launch the IDE as usual
    - when the IDE appears to have hung, send it the QUIT signal using:
        $ kill -QUIT <pid>

If it is a deadlock, then we should be able to see that in the resulting
dump of all active threads.

Cheers,

Christian


On Thu, 2010-02-04 at 17:04 -0500, Karim Mouline wrote:

> Andy, 
> 
> I asked my customer to try your suggestions and I'll let you know once I hear back from him.
> I also thought about asking him to index the project before a build launch because the IDE freezes during some 
dependencies check and other file parsing, even before gcc fires up. Any thoughts here?
> 
> Thanks,
> Karim.
> 
> 
> 
> _______________________________________________
> 
> General
> http://community.qnx.com/sf/go/post46604
> 


Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy,

Thanks again for your tip. I just received some feedback from the customer this morning and unfortunately, the IDE still
 locks up even when the console UI is not open. I attached a screen shot of his Task Manager. You can notice that qde.
exe doesn't consume any CPU cycles so as Chris mentioned on his post dated 02/05, maybe it's deadlock scenario where IDE
 just sits there, and waits for some "other" tasks to complete?
Chris also suggested to capture an eclipse dump so I'll ask my customer to provide it in the hopes that it'll contain 
some clues.

Thank you,
Karim.
Attachment: Bitmap TaskMan.bmp 1.88 MB
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Thanks for the task manager screen shot. From looking at it, there are at least 7 "make.exe" and 3 shells (ksh.exe, sh.
exe) are running at the same time. I can't see how could the build spawns that much.

Besides getting the dump, can the customer take a screen shot of the console view (he has to open it now since it's not 
the cause). We have to see what command line options he used to build and at which point when the build stops.

In the mean time, since he imported the BSP, the importer creates standard make project for the BSP source. Go to the 
project properties page, "C/C++ Build -> Builder Settings -> Build command" make sure he does not put any special option
 to the default make command. Also in the "Behaviour -> Use parallel build" make sure he uncheck the box to turn off 
parallel build.

Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Chris,
I'll ask my customer to run the Indexer first before "make" and also run eclipsec and gather a dump.

Andy,
I'll make sure "Parallel Build" is checked off.

Please stay tuned for the results, thank you,
Karim.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Chris, Andy,

Unfortunately, neither the Index, Parallel build, nor the other suggestions resolved the customer problem.
Please find attached a dump from eclipsec.exe and  a screenshot of Win Task Manager after the IDE was killed.
Any clues on which module does the IDE stalls? If you see a bug and think upgrading to IDE v4.7 will help, then I can 
ask the customer to upgrade.

Thank you,
Karim.
Attachment: Text dump.txt 18.64 KB
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
a screenshot of Win Task Manager after the IDE froze.
Attachment: Bitmap TaskMan2.bmp 1.29 MB
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Karim,

Could you ask the customer to update his command line utility with the latest MSYS patch from this patch?

http://community.qnx.com/sf/discussion/do/listPosts/projects.toolchain/discussion.core_development_tools.topc11170

This patch solved the problem one of our users had with IDE freezing:

http://community.qnx.com/sf/discussion/do/listPosts/projects.ide/discussion.ide.topc7464

Thanks,
Andy
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy, I'll send him the patch instructions and will let you know how it goes.
Thanks,
Karim.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy, Chris,
The customer applied the msys patch and it actually broke the whole tools chain, i.e. he can not make or build anything.

How about the dump.txt file that I attached from running eclipsec.exe? Any clues there on where the IDE hangs?
Thanks for your ongoing support,
Karim.
Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Andy, Chris, 

The customer issue is now "fixed" or at least "can't be reproduced anymore":

It was actually a race condition where mutiple sh/ksh shell processes were deadlocked while scheduled on Intel's T9400 
multicore @ 2.53Ghz. The temp fix was to manually "kill" one of the shell processes to resume the build on the cmd line.
 The longer term "fix" was I had him configure Win XP to run on single core and he was able to build binaries+image 
every time both in cmd and IDE env.  The problem NEVER occured again.
 
Shall we file a PR internally in case Tech Support stumbles upon the same problem? We just didn't suspect the actual 
processor!  Have you guys seen this on a T9400 multicore machine? I'm running T2500 @ 2.0Ghz and have never seen it. 
However, the only "fix" was to run the customer's machine on a single core, so maybe it's an Intel bug on this 
particular core?

If it's a tools issue, then maybe we can provide an internal fix by scheduling make/sh/ksh on a single core, regardless 
of the user's machine. What do you guys think of all this?

Thank you,
Karim.
RE: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE  
Hi, Karim,

Good job following that up!  I was suspecting a multi-core concurrency issue when I thought the problem might be in the 
IDE (there are ways to make Java lock up in a truly concurrent environment), but didn't think of it again when it turned
 out not to be an IDE problem.

Bizarre that sh.exe would deadlock like this, but perhaps it's another symptom of the other problem that was fixed by 
the MSYS update (which unfortunately didn't work in your case).

It would be good to track this in a PR, as we ought to be able to rely on the third-party tools that we redistribute.

I haven't seen anything like this on my own dual-core test systems, but then, that's only two cores.

Thanks,

Christian


-----Original Message-----
From: Karim Mouline [mailto:community-noreply@qnx.com]
Sent: Fri 2/12/2010 11:38 AM
To: general-ide
Subject: Re: Momentics IDE v4.6 - Bulding i.MX25 BSP locks up the IDE
 
Andy, Chris, 

The customer issue is now "fixed" or at least "can't be reproduced anymore":

It was actually a race condition where mutiple sh/ksh shell processes were deadlocked while scheduled on Intel's T9400 
multicore @ 2.53Ghz. The temp fix was to manually "kill" one of the shell processes to resume the build on the cmd line.
 The longer term "fix" was I had him configure Win XP to run on single core and he was able to build binaries+image 
every time both in cmd and IDE env.  The problem NEVER occured again.
 
Shall we file a PR internally in case Tech Support stumbles upon the same problem? We just didn't suspect the actual 
processor!  Have you guys seen this on a T9400 multicore machine? I'm running T2500 @ 2.0Ghz and have never seen it. 
However, the only "fix" was to run the customer's machine on a single core, so maybe it's an Intel bug on this 
particular core?

If it's a tools issue, then maybe we can provide an internal fix by scheduling make/sh/ksh on a single core, regardless 
of the user's machine. What do you guys think of all this?

Thank you,
Karim.



_______________________________________________

General
http://community.qnx.com/sf/go/post47233


Attachment: Text winmail.dat 3.74 KB