ICE when building appstream-generator

Bug #1620681 reported by Iain Lane
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-6 (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When building appstream-generator incrementally (i.e. with meson, see attached script which you can run in a chroot), gdc-6 crashes

FAILED: appstream-generator@exe/source_backends_archlinux_alpkg.d.o
gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_backends_archlinux_alpkg.d.o' -c ../source/backends/archlinux/alpkg.d
cc1d: ../../src/gcc/d/dfrontend/mangle.c:384: void Mangler::mangleFunc(FuncDeclaration*, bool): Assertion `0' failed.
[/usr/lib/gcc/x86_64-linux-gnu/6/include/d/std/range/package.d:795:6] chain (ByCodeUnitImpl _param_0, OnlyResult!(char, 1LU) _param_1, ByCodeUnitImpl _param_2)
../source/backends/archlinux/alpkg.d:28:8: internal compiler error: Aborted
 import backends.interfaces;
        ^
0xad169f crash_signal
 ../../src/gcc/toplev.c:333
0x6af86e Mangler::mangleFunc(FuncDeclaration*, bool)
 ../../src/gcc/d/dfrontend/mangle.c:384
0x6ae518 mangleExact(FuncDeclaration*)
 ../../src/gcc/d/dfrontend/mangle.c:877
0x71ea95 FuncDeclaration::toSymbol()
 ../../src/gcc/d/d-decls.cc:304
0x71feeb d_decl_context(Dsymbol*)
 ../../src/gcc/d/d-codegen.cc:313
0x74dc90 TypeVisitor::visit(TypeStruct*)
 ../../src/gcc/d/types.cc:275
0x74d95d build_ctype(Type*)
 ../../src/gcc/d/types.cc:503
0x71f432 AggregateDeclaration::toInitializer()
 ../../src/gcc/d/d-decls.cc:720
0x65ac7c CallExp::semantic(Scope*)
 ../../src/gcc/d/dfrontend/expression.c:8462
0x6f4e4f ReturnStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:3900
0x6f25d1 CompoundStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:1165
0x677b74 FuncDeclaration::semantic3(Scope*)
 ../../src/gcc/d/dfrontend/func.c:1559
0x6ffc83 TemplateInstance::semantic3(Scope*)
 ../../src/gcc/d/dfrontend/template.c:7618
0x7063b2 TemplateInstance::trySemantic3(Scope*)
 ../../src/gcc/d/dfrontend/template.c:5811
0x70c8ce TemplateInstance::semantic(Scope*, Array<Expression*>*)
 ../../src/gcc/d/dfrontend/template.c:6213
0x70cd09 functionResolve(Match*, Dsymbol*, Loc, Scope*, Array<RootObject*>*, Type*, Array<Expression*>*)
 ../../src/gcc/d/dfrontend/template.c:2578
0x671329 resolveFuncCall(Loc, Scope*, Dsymbol*, Array<RootObject*>*, Type*, Array<Expression*>*, int)
 ../../src/gcc/d/dfrontend/func.c:3320
0x658512 CallExp::semantic(Scope*)
 ../../src/gcc/d/dfrontend/expression.c:8853
0x6f4e4f ReturnStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:3900
0x6f25d1 CompoundStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:1165
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
[27/698] gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_image.d.o' -c ../source/image.d
[28/698] gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_handlers_desktopparser.d.o' -c ../source/handlers/desktopparser.d
[29/698] gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_backends_debian_package.d.o' -c ../source/backends/debian/package.d
[30/698] gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_backends_dummy_dummypkg.d.o' -c ../source/backends/dummy/dummypkg.d
[31/698] gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_backends_debian_debpkg.d.o' -c ../source/backends/debian/debpkg.d
FAILED: appstream-generator@exe/source_backends_debian_debpkg.d.o
gdc-6 '-Iappstream-generator@exe' '-fdiagnostics-color=always' '-I..' '-I.' '-Isource/' '-I../source/' '-Isource/bindings/auto' '-I../source/bindings/auto' '-I/usr/include/d/mustache-d/src' '-I/usr/include/d/mustache-d/src' '-Wall' '-Wdeprecated' '-Wl,--push-state,-no-as-needed -lcurl -Wl,--pop-state' '-g' '-O0' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/AppStream' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-pthread' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-pthread' '-I/usr/include/librsvg-2.0' '-I/usr/include/gdk-pixbuf-2.0' '-I/usr/include/libpng16' '-I/usr/include/cairo' '-I/usr/include/glib-2.0' '-I/usr/lib/x86_64-linux-gnu/glib-2.0/include' '-I/usr/include/pixman-1' '-I/usr/include/freetype2' '-I/usr/include/libpng16' '-I/usr/include/freetype2' -o 'appstream-generator@exe/source_backends_debian_debpkg.d.o' -c ../source/backends/debian/debpkg.d
cc1d: ../../src/gcc/d/dfrontend/mangle.c:384: void Mangler::mangleFunc(FuncDeclaration*, bool): Assertion `0' failed.
[/usr/lib/gcc/x86_64-linux-gnu/6/include/d/std/range/package.d:795:6] chain (ByCodeUnitImpl _param_0, OnlyResult!(char, 1LU) _param_1, ByCodeUnitImpl _param_2)
../source/backends/debian/debpkg.d:97:22: internal compiler error: Aborted
         desc[locale] = text;
                      ^
0xad169f crash_signal
 ../../src/gcc/toplev.c:333
0x6af86e Mangler::mangleFunc(FuncDeclaration*, bool)
 ../../src/gcc/d/dfrontend/mangle.c:384
0x6ae518 mangleExact(FuncDeclaration*)
 ../../src/gcc/d/dfrontend/mangle.c:877
0x71ea95 FuncDeclaration::toSymbol()
 ../../src/gcc/d/d-decls.cc:304
0x71feeb d_decl_context(Dsymbol*)
 ../../src/gcc/d/d-codegen.cc:313
0x74dc90 TypeVisitor::visit(TypeStruct*)
 ../../src/gcc/d/types.cc:275
0x74d95d build_ctype(Type*)
 ../../src/gcc/d/types.cc:503
0x71f432 AggregateDeclaration::toInitializer()
 ../../src/gcc/d/d-decls.cc:720
0x65ac7c CallExp::semantic(Scope*)
 ../../src/gcc/d/dfrontend/expression.c:8462
0x6f4e4f ReturnStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:3900
0x6f25d1 CompoundStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:1165
0x677b74 FuncDeclaration::semantic3(Scope*)
 ../../src/gcc/d/dfrontend/func.c:1559
0x6ffc83 TemplateInstance::semantic3(Scope*)
 ../../src/gcc/d/dfrontend/template.c:7618
0x7063b2 TemplateInstance::trySemantic3(Scope*)
 ../../src/gcc/d/dfrontend/template.c:5811
0x70c8ce TemplateInstance::semantic(Scope*, Array<Expression*>*)
 ../../src/gcc/d/dfrontend/template.c:6213
0x70cd09 functionResolve(Match*, Dsymbol*, Loc, Scope*, Array<RootObject*>*, Type*, Array<Expression*>*)
 ../../src/gcc/d/dfrontend/template.c:2578
0x671329 resolveFuncCall(Loc, Scope*, Dsymbol*, Array<RootObject*>*, Type*, Array<Expression*>*, int)
 ../../src/gcc/d/dfrontend/func.c:3320
0x658512 CallExp::semantic(Scope*)
 ../../src/gcc/d/dfrontend/expression.c:8853
0x6f4e4f ReturnStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:3900
0x6f25d1 CompoundStatement::semantic(Scope*)
 ../../src/gcc/d/dfrontend/statement.c:1165
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gdc-6 6.2.0-3ubuntu11
ProcVersionSignature: Ubuntu 4.4.0-9136.55-generic 4.4.16
Uname: Linux 4.4.0-9136-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Sep 6 16:29:51 2016
InstallationDate: Installed on 2015-06-05 (459 days ago)
InstallationMedia: Ubuntu 15.10 "Wily Werewolf" - Alpha amd64 (20150605)
SourcePackage: gcc-6
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :
Revision history for this message
Iain Lane (laney) wrote :

Here's a more minimal one - I couldn't eliminate the "import std.path" though.

build with: gdc alpkg.d

Revision history for this message
Matthias Klumpp (ximion) wrote :

After running Dustmite on it, I get pretty much the same result as Iain - he's a very good human Dustmite!

Revision history for this message
Matthias Klumpp (ximion) wrote :
Revision history for this message
Iain Buclaw (iainb) wrote :

Thanks, I also reported here just for completeness sake: https://bugzilla.gdcproject.org/show_bug.cgi?id=239

Looking at the minimal test now...

Revision history for this message
Iain Buclaw (iainb) wrote :

There's a small circle going on. Initial semantic analysis has completed, and compiler is now lowering to gcc, however certain spots may encounter symbols that haven't been analysed (won't be emitted, but benefits debugging if we pass their complete symbol information to gcc).

And so it stops to run the semantic passes, however these may call back into the code generator for some requests. And because the codegen stage thinks that it is in the middle of generating trees, it proceeds to compile the unfinished AST.

There are two places where this happens, in both cases, the current module being compiled should be stashed to let the code generator know that we've paused compiling for the moment.

(Tested on upstream master).

Iain.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Stash module decl" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Iain Buclaw (iainb) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gcc-6 - 6.2.0-3ubuntu14

---------------
gcc-6 (6.2.0-3ubuntu14) yakkety; urgency=medium

  * Update to SVN 20160910 (r240069, 6.2.1) from the gcc-6-branch.
    - Fix PR rtl-optimization/77452.
  * gcj: Depend on the ecj1 standalone binary.
  * Configure native builds using --with-program-prefix.
  * Fix ICE in gdc symbol mangling (Iain Buclaw). LP: #1620681.
  * Restore the AArch64 vulcan support for non Linaro builds.

 -- Matthias Klose <email address hidden> Sun, 11 Sep 2016 12:50:59 +0200

Changed in gcc-6 (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.