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 184966 - Ubuntu 10.04: Run fails very often
Summary: Ubuntu 10.04: Run fails very often
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: execution (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 normal (vote)
Assignee: Andrew Krasny
URL:
Keywords:
: 193669 199358 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-04-26 11:17 UTC by soldatov
Modified: 2012-10-17 11:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Program terminated with signal 4, Illegal instruction. (3.84 KB, text/plain)
2010-05-04 16:48 UTC, soldatov
Details
Program terminated with signal 4, Illegal instruction (5.66 KB, text/plain)
2010-05-04 16:52 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2010-04-26 11:17:04 UTC
I don't know it is a common problem or not. But on my home machine Run fails very often (in ~50% cases) on some of projects.

Ubuntu 10.04 (latest unstable build)
HelloQtProject
Profiler: C/C++ Simple Indicator
Console Type: Output Window

Run works stable If profiler is switched off or "C/C++ Oracle Solaris Studio Standard" tool is selected or program is started in external terminal
Comment 1 soldatov 2010-05-04 16:48:38 UTC
Created attachment 98450 [details]
Program terminated with signal 4, Illegal instruction.
Comment 2 soldatov 2010-05-04 16:52:45 UTC
Created attachment 98451 [details]
Program terminated with signal 4, Illegal instruction
Comment 3 Alexey Vladykin 2010-05-05 09:57:32 UTC
Quick googling gave this: https://bugzilla.redhat.com/show_bug.cgi?id=519081
What is the version of glibc and binutils on that machine?
Comment 4 soldatov 2010-05-05 10:10:24 UTC
http://en.wikipedia.org/wiki/Eglibc
Comment 5 soldatov 2010-05-05 10:19:21 UTC
eglibc-2.11.1
binutils-2.20.1
Comment 6 Alexey Vladykin 2010-05-05 11:00:36 UTC
A interesting bug mentioning race condition in dynamic loader: https://bugzilla.redhat.com/show_bug.cgi?id=222288

Valera, does setting LD_BIND_NOW=1 help?
Comment 7 soldatov 2010-05-05 17:23:36 UTC
nice!!! thanks
Comment 8 Alexey Vladykin 2010-05-11 15:07:07 UTC
Valera, I'd appreciate if you filed a bug against Ubuntu. It would be very interesting to see their evaluation of the problem.
Comment 9 soldatov 2010-05-11 15:35:02 UTC
ok
Comment 11 soldatov 2010-10-04 09:54:13 UTC
Ubuntu 10.10 is supported platform in next release (http://wiki.netbeans.org/NetBeans_610_Supported_Platforms)
At home I installed Ubuntu x64 10.10RC, but this problem is not disappeared (run fails very often). Before Ubuntu's release I mark this bug as P2.

P.S. Also this bug can be upgraded to P1 after Ubuntu 10.10 release.
Comment 12 Leonid Lenyashin 2010-10-14 15:25:23 UTC
Is there a core dump from Ubuntu 10.10 where the bug is fixed? The 10.04 core dumps are sort of useless as I see no traces of our profiler in it.
Comment 13 soldatov 2010-10-14 17:33:26 UTC
(gdb) where
#0  _dl_x86_64_restore_sse () at ../sysdeps/x86_64/dl-trampoline.S:222
#1  0x00007f87e3661c15 in _dl_fixup (l=<value optimized out>, 
    reloc_arg=<value optimized out>) at ../elf/dl-runtime.c:126
#2  0x00007f87e3668825 in _dl_runtime_resolve ()
    at ../sysdeps/x86_64/dl-trampoline.S:41
#3  0x00007f87e3450803 in check_control ()
   from /home/sova/.netbeans/6.9/tools/Linux-x86_64/bin/prof_agent.so
#4  0x00007f87e3450c14 in reporter ()
   from /home/sova/.netbeans/6.9/tools/Linux-x86_64/bin/prof_agent.so
#5  0x00007f87e2a1292d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#6  0x0000000000000000 in ?? ()
Comment 14 Egor Ushakov 2010-10-20 15:21:05 UTC
unable to reproduce on 10.10, but almost 100% on 10.04, Valeriy, please recheck
Comment 15 Tasic 2010-10-20 16:12:08 UTC
It seems to me, that this issue depends on number of processor cores.
1-2 - it's ok, >2 - run fails (Ubuntu 10.04 LTS).
Comment 16 soldatov 2010-10-21 06:47:59 UTC
Again I checked this issue on my Core 2 Quad (4 cores) and NetBeans fails in Ubuntu 10.10 also.
Comment 17 Leonid Lenyashin 2010-11-01 12:03:07 UTC
It looks as shared object initialization/binding bug in Ubuntu. The only thing we can try is to somehow postpone profiler thread creation in profiler init. This could prevent a call to not yet initialized system library. Honestly speaking I'm not sure it will work (we are already using clone() instead of pthread_craeate()) and if it is doable (as there could be no event we can intercept and use to create a thread).
Comment 18 Leonid Lenyashin 2010-11-18 14:05:55 UTC
Can we just disable simple profiler for Ubuntu 10.x for a time being? And downgrade the bug.
Comment 19 Egor Ushakov 2010-11-24 13:54:30 UTC
Andrew, please disable it on ubuntu
Comment 20 Andrew Krasny 2010-11-25 10:07:39 UTC
LL_TOOL is disabled on Ubuntu (by default).
Still -J-DDISABLE_LL_TOOL_ON_UBUNTU=false could be used to switch it on.

Changeset: cnd-main/183158:f29fdc45286e


Valera, could you, please try it and in case it makes things to be more stable (looks like it does), lower the priority of the issue.

Thanks, 
=Andrew
Comment 21 soldatov 2010-11-25 18:19:47 UTC
Yes.Run works stably with this fix
Comment 22 Andrew Krasny 2010-11-26 07:59:05 UTC
lowing the priority then... 
Thanks!
Comment 23 lytles 2010-12-11 17:12:29 UTC
i'm on ubuntu 10.10 and the profiler ("show profiling indicators during run") was enabled by default, and i was getting the 132 errors - C/C++ project with existing sources, using the automatic configuration mode

also, not sure disabling this setting by default is sufficient. maybe mention it in the release notes or a warning when a program is run with that box checked on ubuntu. in this case, 132 is a rare enough number that google finds this bug and the workaround quickly - but we really shouldn't be relying on that ...
Comment 24 Leonid Lenyashin 2010-12-13 12:51:35 UTC
Can you please tell us more about this "132 error"?
Frankly speaking we do not know what exactly is causing the issue. It either something that changed in Ubuntu dynamic loader or in system libraries. Somehow our library is triggering this bug while there is nothing violation standards and conventions in it.
So, some additional information can help a lot.
Comment 25 Andrew Krasny 2010-12-21 11:06:40 UTC
*** Bug 193669 has been marked as a duplicate of this bug. ***
Comment 26 mathias.anselmann 2011-06-11 20:55:51 UTC
*** Bug 199358 has been marked as a duplicate of this bug. ***
Comment 27 youarefunny 2011-06-18 19:06:26 UTC
I can verify that it is a race condition.  By modifying dorun.sh and putting in a one second delay it works almost all of the time.  A two second delay makes it always work.

I am on arch linux up-to-date with beans 7.0
Comment 28 Andrew Krasny 2012-10-17 11:48:45 UTC
Not valid anymore... 
Now profiling is disabled...