public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
@ 2015-10-14 17:25 gong_su at hotmail dot com
  2015-10-15 14:06 ` [Bug go/67968] " vogt at linux dot vnet.ibm.com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: gong_su at hotmail dot com @ 2015-10-14 17:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

            Bug ID: 67968
           Summary: go1: internal compiler error: in
                    write_specific_type_functions, at
                    go/gofrontend/types.cc:1812
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: gong_su at hotmail dot com
                CC: cmang at google dot com
  Target Milestone: ---

Failure occurs when trying to compile Ethereum RPC API.

root@linux05:~/Downloads/go-ethereum# make geth
build/env.sh go install -v -ldflags '-X main.gitCommit
4813a39100dc8dc884b0a68ceae51c2c420f92af' ./cmd/geth
github.com/ethereum/go-ethereum/rpc/api
# github.com/ethereum/go-ethereum/rpc/api
go1: internal compiler error: in write_specific_type_functions, at
go/gofrontend/types.cc:1812
0x802473df Type::write_specific_type_functions(Gogo*, Named_type*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, Function_type*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, Function_type*)
        ../../src/gcc/go/gofrontend/types.cc:1812
0x80245b33 Type::specific_type_functions(Gogo*, Named_type*, Function_type*,
Function_type*, Named_object**, Named_object**)
        ../../src/gcc/go/gofrontend/types.cc:1791
0x8024639d Type::type_functions(Gogo*, Named_type*, Function_type*,
Function_type*, Named_object**, Named_object**)
        ../../src/gcc/go/gofrontend/types.cc:1668
0x8024eff7 Type::type_descriptor_constructor(Gogo*, int, Named_type*, Methods
const*, bool)
        ../../src/gcc/go/gofrontend/types.cc:2011
0x80250b1d Array_type::array_type_descriptor(Gogo*, Named_type*)
        ../../src/gcc/go/gofrontend/types.cc:6318
0x80248a33 Type::make_type_descriptor_var(Gogo*)
        ../../src/gcc/go/gofrontend/types.cc:1218
0x80248e05 Type::type_descriptor_pointer(Gogo*, Location)
        ../../src/gcc/go/gofrontend/types.cc:1156
0x801c8e6f Type_descriptor_expression::do_get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/expressions.cc:13400
0x801a8efd Interface_value_expression::do_get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/expressions.cc:14023
0x8021ef49 Temporary_statement::do_get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/statements.cc:470
0x801e8d27 Block::get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/gogo.cc:5811
0x8021ea51 Block_statement::do_get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/statements.cc:1802
0x801e8d27 Block::get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/gogo.cc:5811
0x8021ea51 Block_statement::do_get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/statements.cc:1802
0x801e8d27 Block::get_backend(Translate_context*)
        ../../src/gcc/go/gofrontend/gogo.cc:5811
0x801ea647 Function::build(Gogo*, Named_object*)
        ../../src/gcc/go/gofrontend/gogo.cc:5417
0x801ebd7d Named_object::get_backend(Gogo*, std::vector<Bexpression*,
std::allocator<Bexpression*> >&, std::vector<Btype*, std::allocator<Btype*> >&,
std::vector<Bfunction*, std::allocator<Bfunction*> >&)
        ../../src/gcc/go/gofrontend/gogo.cc:7136
0x801f514d Gogo::write_globals()
        ../../src/gcc/go/gofrontend/gogo.cc:1345
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-5/README.Bugs> for instructions.
Makefile:9: recipe for target 'geth' failed
make: *** [geth] Error 2


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
@ 2015-10-15 14:06 ` vogt at linux dot vnet.ibm.com
  2015-10-22  9:45 ` vogt at linux dot vnet.ibm.com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-15 14:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

Dominik Vogt <vogt at linux dot vnet.ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vogt at linux dot vnet.ibm.com

--- Comment #1 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Can you please attach the source file that caused the crash so I can try to
reproduce this?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
  2015-10-15 14:06 ` [Bug go/67968] " vogt at linux dot vnet.ibm.com
@ 2015-10-22  9:45 ` vogt at linux dot vnet.ibm.com
  2015-10-23 12:38 ` vogt at linux dot vnet.ibm.com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-22  9:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #3 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
To narrow down where the problem happens please try this:

1. Edit the first line of the file build/env.sh and append "-a":

#!/bin/sh -a

2. Locate the gccgo executable (whould be in the path GOBIN that is set in the
Makefile) and rename it:

$ mv gccgo gccgo.bin

3. Place this small script with the name "gccgo" into the directory with
gccgo.bin and make it executable:

#!/bin/sh 
exec "$GOBIN"/gccgo.bin -v $@ 

$ chmod 755 gccgo

Finally the GOBIN directory should look like this:

$ ls -l gccgo*
-rwxr-xr-x 1 ...  40 ... gccgo
-rwxr-xr-x 2 ... 13M ... gccgo.bin

4. Built ethereum als usual.  Gccgo now prints all commands it executes, and
hopefully the failing command last.

Please attach this output to the bug report.  Also, please make a tar archive
of only the source files listed in the failing "go1" command line, compress it
with "bzip2 -9" or 7zip and send it to me via email.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
  2015-10-15 14:06 ` [Bug go/67968] " vogt at linux dot vnet.ibm.com
  2015-10-22  9:45 ` vogt at linux dot vnet.ibm.com
@ 2015-10-23 12:38 ` vogt at linux dot vnet.ibm.com
  2015-10-23 12:39 ` vogt at linux dot vnet.ibm.com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-23 12:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #5 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Unfortunately I cannot reproduce this yet.  Please try to identify the "faulty"
source file and strip it down to the minimum.

1. Find out in which file the ICE occurs.

1.a Recompile GCC with debug information, e.g. with

$ make CXXFLAGS="-g3 -O2" CFLAGS="$CXXFLAGS" GOCFLAGS="$CXXFLAGS" -j 7 all

1.b Use the commands from comment 4 to run the gccgo-5 command line manually. 
This whould still generate an ICE.

1.c Run the go1 command in gdb.  Just add the option

  -wrapper gdb,--args

at the end of the gccgo-5 command line.  Then type "run" in the debugger.  Gdb
should automatically stop when the ICE occurs.  From there, check the available
information in the current stack frame and the higher ones and see if you can
find the name of the current source file or the function name and possibly the
line number in some structure.  I know nothing about the Go frontent, so
unfortunately you have to figure that out on your own.

2. Strip down the sources as much as possible.

Now that you know which file generates the ICE, try to strip down the api
module as much as possible.  The first step is to get rid of all the other
files in the package.  Next, remove the imports in the faulty file and finally
strip down the file as much as possible to make a standalone test case.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (2 preceding siblings ...)
  2015-10-23 12:38 ` vogt at linux dot vnet.ibm.com
@ 2015-10-23 12:39 ` vogt at linux dot vnet.ibm.com
  2015-10-23 16:59 ` ian at airs dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-23 12:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #6 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
@Ian: Any hints to help Gong isolating the problem?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (3 preceding siblings ...)
  2015-10-23 12:39 ` vogt at linux dot vnet.ibm.com
@ 2015-10-23 16:59 ` ian at airs dot com
  2015-10-23 17:08 ` vogt at linux dot vnet.ibm.com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2015-10-23 16:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #7 from Ian Lance Taylor <ian at airs dot com> ---
Dominik: Chris has committed a number of recent fixes for gccgo compiler
crashes.  Are you testing with current mainline or with the 5.2.1 release that
gong_su is using?  Or is the problem that you don't have the imported packages?

If that is the problem, then I wouldn't worry about shrinking the number or
size of the input files.  The only thing that matters is reducing the number of
imports.

Or, it's likely to be easier to just tar up the import files.  Once this kind
of problem can be reproduced, it's usually easy to fix.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (4 preceding siblings ...)
  2015-10-23 16:59 ` ian at airs dot com
@ 2015-10-23 17:08 ` vogt at linux dot vnet.ibm.com
  2015-10-23 17:42 ` ian at airs dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-23 17:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #8 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
I had been testing with the latest gcc-5-branch and didn't see any ICEs but a
lot of other problems with the ethereum package that may be the fault of the
code or cgo, I don't know.  I can see the ICE on Gong's machine.  The compiler
version is

gccgo (Debian 5.2.1-22) 5.2.1 20151010

Other than that there's still that problem with cgo that I've reported
separately (latest gccgo-5).

So, I now have a crashing gccgo without debuginfo running in gdb with the stack
trace from comment 4.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (5 preceding siblings ...)
  2015-10-23 17:08 ` vogt at linux dot vnet.ibm.com
@ 2015-10-23 17:42 ` ian at airs dot com
  2015-10-26 12:03 ` vogt at linux dot vnet.ibm.com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ian at airs dot com @ 2015-10-23 17:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #9 from Ian Lance Taylor <ian at airs dot com> ---
Does it crash on x86_64 or only on s390?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (6 preceding siblings ...)
  2015-10-23 17:42 ` ian at airs dot com
@ 2015-10-26 12:03 ` vogt at linux dot vnet.ibm.com
  2015-10-27 10:21 ` vogt at linux dot vnet.ibm.com
  2015-10-28 15:44 ` gong_su at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-26 12:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #10 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
We cannot reproduce the crash on x86_64.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (7 preceding siblings ...)
  2015-10-26 12:03 ` vogt at linux dot vnet.ibm.com
@ 2015-10-27 10:21 ` vogt at linux dot vnet.ibm.com
  2015-10-28 15:44 ` gong_su at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: vogt at linux dot vnet.ibm.com @ 2015-10-27 10:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #11 from Dominik Vogt <vogt at linux dot vnet.ibm.com> ---
Created attachment 36596
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36596&action=edit
Minimal test code

The attached test code causes the ICE on s390x and x86_64 using gccgo-5.2.0.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug go/67968] go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812
  2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
                   ` (8 preceding siblings ...)
  2015-10-27 10:21 ` vogt at linux dot vnet.ibm.com
@ 2015-10-28 15:44 ` gong_su at hotmail dot com
  9 siblings, 0 replies; 11+ messages in thread
From: gong_su at hotmail dot com @ 2015-10-28 15:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67968

--- Comment #13 from gong_su at hotmail dot com ---
Hi Dominik, with the patch you gave me for the gcc-6 development branch, the
cgo related bug is now fixed and ethash.go compiles fine without modification.
But the ICE still happens.

github.com/ethereum/go-ethereum/rpc/api
mkdir -p $WORK/github.com/ethereum/go-ethereum/rpc/api/_obj/
cd
/root/Downloads/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/api
/root/Downloads/gcc/install/bin/gccgo -I $WORK -I
/root/Downloads/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/Godeps/_workspace/pkg/gccgo_linux_s390x
-I /root/Downloads/go-ethereum/build/_workspace/pkg/gccgo_linux_s390x -c -g
-fgo-pkgpath=github.com/ethereum/go-ethereum/rpc/api
-fgo-relative-import-path=_/root/Downloads/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/rpc/api
-o $WORK/github.com/ethereum/go-ethereum/rpc/api/_obj/_go_.o ./admin.go
./admin_args.go ./admin_js.go ./api.go ./args.go ./db.go ./db_args.go
./db_js.go ./debug.go ./debug_args.go ./debug_js.go ./eth.go ./eth_args.go
./eth_js.go ./mergedapi.go ./miner.go ./miner_args.go ./miner_js.go ./net.go
./net_js.go ./parsing.go ./personal.go ./personal_args.go ./personal_js.go
./shh.go ./shh_args.go ./shh_js.go ./txpool.go ./txpool_js.go ./utils.go
./web3.go ./web3_args.go
# github.com/ethereum/go-ethereum/rpc/api
go1: internal compiler error: in write_specific_type_functions, at
go/gofrontend/types.cc:1812
0x802717cf Type::write_specific_type_functions(Gogo*, Named_type*,
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >
const&, Function_type*, std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&, Function_type*)
        ../../gcc/go/gofrontend/types.cc:1812
0x8026ff93 Type::specific_type_functions(Gogo*, Named_type*, Function_type*,
Function_type*, Named_object**, Named_object**)
        ../../gcc/go/gofrontend/types.cc:1791
0x802707fd Type::type_functions(Gogo*, Named_type*, Function_type*,
Function_type*, Named_object**, Named_object**)
        ../../gcc/go/gofrontend/types.cc:1668
0x80279427 Type::type_descriptor_constructor(Gogo*, int, Named_type*, Methods
const*, bool)
        ../../gcc/go/gofrontend/types.cc:2011
0x8027af4d Array_type::array_type_descriptor(Gogo*, Named_type*)
        ../../gcc/go/gofrontend/types.cc:6311
0x80272e23 Type::make_type_descriptor_var(Gogo*)
        ../../gcc/go/gofrontend/types.cc:1218
0x802731f5 Type::type_descriptor_pointer(Gogo*, Location)
        ../../gcc/go/gofrontend/types.cc:1156
0x801ee0df Type_descriptor_expression::do_get_backend(Translate_context*)
        ../../gcc/go/gofrontend/expressions.cc:13669
0x801cd91d Interface_value_expression::do_get_backend(Translate_context*)
        ../../gcc/go/gofrontend/expressions.cc:14297
0x8024cb0d Temporary_statement::do_get_backend(Translate_context*)
        ../../gcc/go/gofrontend/statements.cc:494
0x802121af Block::get_backend(Translate_context*)
        ../../gcc/go/gofrontend/gogo.cc:5891
0x802489c1 Block_statement::do_get_backend(Translate_context*)
        ../../gcc/go/gofrontend/statements.cc:1836
0x802121af Block::get_backend(Translate_context*)
        ../../gcc/go/gofrontend/gogo.cc:5891
0x802489c1 Block_statement::do_get_backend(Translate_context*)
        ../../gcc/go/gofrontend/statements.cc:1836
0x802121af Block::get_backend(Translate_context*)
        ../../gcc/go/gofrontend/gogo.cc:5891
0x80213a9f Function::build(Gogo*, Named_object*)
        ../../gcc/go/gofrontend/gogo.cc:5497
0x80215243 Named_object::get_backend(Gogo*, std::vector<Bexpression*,
std::allocator<Bexpression*> >&, std::vector<Btype*, std::allocator<Btype*> >&,
std::vector<Bfunction*, std::allocator<Bfunction*> >&)
        ../../gcc/go/gofrontend/gogo.cc:7217
0x8021e95d Gogo::write_globals()
        ../../gcc/go/gofrontend/gogo.cc:1346
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:9: recipe for target 'geth' failed
make: *** [geth] Error 2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-28 15:44 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-14 17:25 [Bug go/67968] New: go1: internal compiler error: in write_specific_type_functions, at go/gofrontend/types.cc:1812 gong_su at hotmail dot com
2015-10-15 14:06 ` [Bug go/67968] " vogt at linux dot vnet.ibm.com
2015-10-22  9:45 ` vogt at linux dot vnet.ibm.com
2015-10-23 12:38 ` vogt at linux dot vnet.ibm.com
2015-10-23 12:39 ` vogt at linux dot vnet.ibm.com
2015-10-23 16:59 ` ian at airs dot com
2015-10-23 17:08 ` vogt at linux dot vnet.ibm.com
2015-10-23 17:42 ` ian at airs dot com
2015-10-26 12:03 ` vogt at linux dot vnet.ibm.com
2015-10-27 10:21 ` vogt at linux dot vnet.ibm.com
2015-10-28 15:44 ` gong_su at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).