Bug 3357 - Crash after configuring project in KDevelop (upstream glibc bug, dynamic loader on AVX enabled CPU)
Summary: Crash after configuring project in KDevelop (upstream glibc bug, dynamic load...
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 1
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 1362
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-16 11:18 CET by Arnaud Pharasyn
Modified: 2011-11-22 11:46 CET (History)
1 user (show)

See Also:
Source RPM: glibc-2.12.1-11.mga1
CVE:
Status comment:


Attachments

Description Arnaud Pharasyn 2011-11-16 11:18:56 CET
Description of problem:

Under Mageia 1, 64 bit version, on a computer with Intel "Sandy Bridge" processor, the application KDevelop crashes right after configuring an imported project.

I could check that this crash occurs on both an i5 and i7 processor, but not on an older CPU (in my case a Pentium D processor).

Procedure:
- On a clean configuration of KDevelop, i import my project by specifiying the top CMakeLists.txt file in my source directory.
- After the dialog asking for build path, install path, and extra arguments to CMake, the application starts to load the project and crashes.

Here is the trace i got:

Thread 2 (Thread 0x7f50477fe710 (LWP 10247)):
[KCrash Handler]
#6  _dl_x86_64_save_sse () at ../sysdeps/x86_64/dl-trampoline.S:189
#7  0x00007f508e591e9c in add_dependency (undef_name=0x7f505528a270 "_ZNSt10_List_baseIPN8KDevelop11DeclarationESaIS2_EE8_M_clearEv", undef_map=0x534af60, ref=0x7f50477e4878, symbol_scope=0x534b2b8, 
    version=0x0, type_class=1, flags=5, skip_map=0x0) at dl-lookup.c:628
#8  _dl_lookup_symbol_x (undef_name=0x7f505528a270 "_ZNSt10_List_baseIPN8KDevelop11DeclarationESaIS2_EE8_M_clearEv", undef_map=0x534af60, ref=0x7f50477e4878, symbol_scope=0x534b2b8, version=0x0, 
    type_class=1, flags=5, skip_map=0x0) at dl-lookup.c:831
#9  0x00007f508e594b40 in _dl_fixup (l=<value optimized out>, reloc_arg=<value optimized out>) at ../elf/dl-runtime.c:118
#10 0x00007f508e59b0b5 in _dl_runtime_resolve () at ../sysdeps/x86_64/dl-trampoline.S:41
#11 0x00007f50552dd78f in ~_List_base (this=0x7f50477e5190, identifier=..., position=...) at /usr/include/c++/4.5.2/bits/stl_list.h:360
#12 ~list (this=0x7f50477e5190, identifier=..., position=...) at /usr/include/c++/4.5.2/bits/stl_list.h:418
#13 DeclarationBuilder::resolveNamespaceIdentifier (this=0x7f50477e5190, identifier=..., position=...) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/declarationbuilder.cpp:1159
#14 0x00007f50552deda5 in DeclarationBuilder::visitUsingDirective (this=0x7f50477e5190, node=<value optimized out>)
    at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/declarationbuilder.cpp:1231
#15 0x00007f50550363be in visitNodes<DeclarationAST*> (v=0x7f50477e51f0, nodes=<value optimized out>) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/parser/visitor.h:129
#16 0x00007f50552c9bc2 in ContextBuilder::visitNamespace (this=0x7f50477e5190, node=0x7f503864e278) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/contextbuilder.cpp:472
#17 0x00007f50552df7b7 in DeclarationBuilder::visitNamespace (this=0x7f50477e5190, ast=0x7f503864e278) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/declarationbuilder.cpp:975
#18 0x00007f50550363be in visitNodes<DeclarationAST*> (v=0x7f50477e51f0, nodes=<value optimized out>) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/parser/visitor.h:129
#19 0x00007f50552ce771 in KDevelop::AbstractContextBuilder<AST, NameAST>::supportBuild (this=0x7f50477e5190, node=0x7f503864e160, context=<value optimized out>)
    at /usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:133
#20 0x00007f50552cd9fd in ContextBuilder::buildContexts (this=0x7f50477e5190, file=..., node=0x7f503864e160, includes=<value optimized out>, updateContext=<value optimized out>, removeOldImports=
    false) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/contextbuilder.cpp:421
#21 0x00007f50552da1c1 in DeclarationBuilder::buildDeclarations (this=<value optimized out>, file=<value optimized out>, node=<value optimized out>, includes=<value optimized out>, 
    updateContext=<value optimized out>, removeOldImports=false) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppduchain/declarationbuilder.cpp:91
#22 0x00007f505582100d in CPPInternalParseJob::run (this=<value optimized out>) at /usr/src/debug/kdevelop-4.2.2/languages/cpp/cppparsejob.cpp:639
#23 0x00007f5055826d37 in PreprocessJob::sourceNeeded (this=0x7f50380ff8d0, _fileName=<value optimized out>, type=<value optimized out>, sourceLine=70, skipCurrentPath=<value optimized out>)
    at /usr/src/debug/kdevelop-4.2.2/languages/cpp/preprocessjob.cpp:593
(...)


After searching on internet, i suspect that this bug is due to a glibc bug in the dynamic loader on AVX enabled CPU, as described in the following bug report:
https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=720176
"Segmentation fault in dynamic loader on AVX enabled CPU"
Fixed In Version:	glibc-2.14.90-8

Note that i could reproduce this bug only on "Sandy Bridge" architecture with a direct install of Mageia, and not in a VirtualBox v4.0.14 as available in the repo (tested with both Mageia 1 and Cauldron virtual machines), as it seems the avx flag is not passed into the virtual machine (i have checked this with /proc/cpuinfo). As i installed Cauldron only in VirtualBox, i could not test if the bug is still present in a direct installation of current Cauldron.


I downloaded the test case attached into the redhat bug report, and i got the segmentation fault on i5 and i7, but not on pentium D, and not eitheir in a virtual box on the Sandy Bridge machines.

This bug could be related to bug 1362: https://bugs.mageia.org/show_bug.cgi?id=1362 , but as the upstream bug indicated there differs this would need verification.


My workaround is for now to run KDevelop in a virtualbox machine with Mageia 1, within my direct Mageia 1 install, but as this is an important component for my work, i would be really grateful for an update in Mageia 1 fixing this bug.


Version-Release number of selected component (if applicable):
glibc-2.12.1-11.mga1


How reproducible:
Always reproducible on a Sandy Bridge processor. I could not observe it on other processor or in a virtual box (the avx flag is not passed to the virtual machine).


Steps to Reproduce:
1. Configure a CMake based project in KDevelop on an Intel "Sandy Bridge" processor.
OR
2. Run the test case appended in the Red Hat bug report #720176.
Arnaud Pharasyn 2011-11-16 11:19:39 CET

CC: (none) => eonwir.ardamire+mageia

Comment 1 Arnaud Pharasyn 2011-11-16 16:10:15 CET
After spending more time on this problem, i've ended up installing the glibc-2.12.1-11.1.mga1 package made available by Thomas Backlund in Core Updates Testing, as described in bug #1362.

This has solved the crash i did report for KDevelop, and i could now set up my working environment as i had it on my older machine. The test case 
described in Red Hat bug report #720176 doesn't crash anymore and gives the expected result. I installed the update also on the old machine, and on all platforms tested, i could not see any regression.

As far as i can say, the problem is solved by the glibc update in Core Updates Testing, and all the applications i use work very satisfactorily now! Thanks!
Comment 2 Manuel Hiebel 2011-11-16 17:14:54 CET
(In reply to comment #1)
> 
> As far as i can say, the problem is solved by the glibc update in Core Updates
> Testing, and all the applications i use work very satisfactorily now! Thanks!

Ok nice :) . And thanks for the bug report.

Depends on: (none) => 1362

Comment 3 Manuel Hiebel 2011-11-22 11:46:37 CET
Glib was pushed, closing also this one.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.