public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch
@ 2021-04-03 16:20 ohaiziejohwahkeezuoz at xff dot cz
  2021-04-03 17:34 ` [Bug lto/99898] " ohaiziejohwahkeezuoz at xff dot cz
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: ohaiziejohwahkeezuoz at xff dot cz @ 2021-04-03 16:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99898
           Summary: Possible LTO object incompatibility on gcc-10 branch
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ohaiziejohwahkeezuoz at xff dot cz
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

I'm trying gcc (releases/gcc-10 branch with the last commit  Fri Oct 23
10:11:41 2020 +0200 - Fix up plugin header install)

And I'm seeing an ICE cross-compiling glib library when linking with 

i686-linux-musl-gcc  -o gio/gresource gio/gresource.p/gresource-tool.c.o
-L/workspace/megous.com/apps-c/static-deps/output/i686/sys/usr/lib
-Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group
gio/libgio-2.0.a glib/libglib-2.0.a gobject/libgobject-2.0.a
gmodule/libgmodule-2.0.a
/workspace/megous.com/apps-c/static-deps/output/i686/sys/usr/lib/libz.a
/workspace/megous.com/apps-c/static-deps/output/i686/sys/usr/lib/libmount.a
/workspace/megous.com/apps-c/static-deps/output/i686/sys/usr/lib/libblkid.a
-pthread -liconv -lm
/workspace/megous.com/apps-c/static-deps/output/i686/sys/usr/lib/libffi.a
-Wl,--end-group
lto1: internal compiler error: in lto_read_decls, at lto/lto-common.c:1956
Please submit a full bug report,
with preprocessed source if appropriate.

I'm compiling with fat LTO objects, and this only happens when mixing LTO
object files compiled with previous version of gcc on the tip of gcc-10 branch.
(and only with i686 target so far) Sorry I don't have precise version of the
previous compiler, but it was probably something close to 10.2 judging by the
dates on the object files.

Recompiling all dependencies with the same version of the compiler doesn't lead
to this ICE.

Maybe LTO version needs a bump prior to 10.3 release?

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
@ 2021-04-03 17:34 ` ohaiziejohwahkeezuoz at xff dot cz
  2021-04-04  5:10 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: ohaiziejohwahkeezuoz at xff dot cz @ 2021-04-03 17:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from ohaiziejohwahkeezuoz at xff dot cz ---
I figured object files contain the version of the compiler, so the previous
version was GCC: (GNU) 10.2.1 20201110 (built from releases/gcc-10 at that
date)

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
  2021-04-03 17:34 ` [Bug lto/99898] " ohaiziejohwahkeezuoz at xff dot cz
@ 2021-04-04  5:10 ` pinskia at gcc dot gnu.org
  2021-04-06  6:20 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-04-04  5:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is not the first time versioning of LTO objects have come up with respect
to the bug fix releases.

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
  2021-04-03 17:34 ` [Bug lto/99898] " ohaiziejohwahkeezuoz at xff dot cz
  2021-04-04  5:10 ` pinskia at gcc dot gnu.org
@ 2021-04-06  6:20 ` marxin at gcc dot gnu.org
  2021-04-06  6:59 ` rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-06  6:20 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-04-06
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
@honza, @richi: Do we know about any format breakage in between 10.2 release
and the current tip?

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (2 preceding siblings ...)
  2021-04-06  6:20 ` marxin at gcc dot gnu.org
@ 2021-04-06  6:59 ` rguenth at gcc dot gnu.org
  2021-04-06 10:03 ` hubicka at ucw dot cz
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-06  6:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The LTO minor saw a bump around Sep 10 last year already so the object files
must be younger or LTO should complain.

The specific assert that triggers isn't a sign of format divergence (it would
be a very odd one to trigger) but instead there's an unexpected out-of-band
tree object in the stream.

Can you maybe reproduce the issue without re-using old objects?

I'm not aware of any specific change where we forgot the bumping but there were
a lot of changes and since we did already bump bumping again shouldn't cause
any harm.  Still I'd like to be sure we're not seeing a genuine streaming bug
here.

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (3 preceding siblings ...)
  2021-04-06  6:59 ` rguenth at gcc dot gnu.org
@ 2021-04-06 10:03 ` hubicka at ucw dot cz
  2021-04-06 10:07 ` hubicka at ucw dot cz
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: hubicka at ucw dot cz @ 2021-04-06 10:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at ucw dot cz> ---
> The LTO minor saw a bump around Sep 10 last year already so the object files
> must be younger or LTO should complain.
> 
> I'm not aware of any specific change where we forgot the bumping but there were
> a lot of changes and since we did already bump bumping again shouldn't cause
> any harm.  Still I'd like to be sure we're not seeing a genuine streaming bug
> here.

I only reacall backporting the streaming fixes early in gcc10 timeframe
(August) that was reason for the September bump.
Didn't we backport some new command line options/params breaking
streaming of optimization nodes as usual?

honza

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (4 preceding siblings ...)
  2021-04-06 10:03 ` hubicka at ucw dot cz
@ 2021-04-06 10:07 ` hubicka at ucw dot cz
  2021-04-06 10:08 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: hubicka at ucw dot cz @ 2021-04-06 10:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at ucw dot cz> ---
> I only reacall backporting the streaming fixes early in gcc10 timeframe
> (August) that was reason for the September bump.
> Didn't we backport some new command line options/params breaking
> streaming of optimization nodes as usual?

We just few hours after the bump (in common.opt). So there is small
range of revisions where one can produce incompatible objects. But I did
not check lang specific/target specific options.

Honza

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (5 preceding siblings ...)
  2021-04-06 10:07 ` hubicka at ucw dot cz
@ 2021-04-06 10:08 ` jakub at gcc dot gnu.org
  2021-04-06 10:11   ` Jan Hubicka
  2021-04-06 10:11 ` hubicka at ucw dot cz
                   ` (4 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-06 10:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Any *.opt changes can break the streaming of optimization or target option
nodes.
And from experience with gcc plugins we have such changes ~ each month even on
release branches.

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

* Re: [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-06 10:08 ` jakub at gcc dot gnu.org
@ 2021-04-06 10:11   ` Jan Hubicka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Hubicka @ 2021-04-06 10:11 UTC (permalink / raw)
  To: jakub at gcc dot gnu.org; +Cc: gcc-bugs

> Any *.opt changes can break the streaming of optimization or target option
> nodes.
> And from experience with gcc plugins we have such changes ~ each month even on
> release branches.
It may make sense to add a simple test to our regular testers that
either the new revision can consume old object files or the version was
updated :)

Honza


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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (6 preceding siblings ...)
  2021-04-06 10:08 ` jakub at gcc dot gnu.org
@ 2021-04-06 10:11 ` hubicka at ucw dot cz
  2021-04-06 10:26 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: hubicka at ucw dot cz @ 2021-04-06 10:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Jan Hubicka <hubicka at ucw dot cz> ---
> Any *.opt changes can break the streaming of optimization or target option
> nodes.
> And from experience with gcc plugins we have such changes ~ each month even on
> release branches.
It may make sense to add a simple test to our regular testers that
either the new revision can consume old object files or the version was
updated :)

Honza

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (7 preceding siblings ...)
  2021-04-06 10:11 ` hubicka at ucw dot cz
@ 2021-04-06 10:26 ` jakub at gcc dot gnu.org
  2021-04-06 11:32 ` hubicka at ucw dot cz
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-06 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Many of the *.opt changes are target specific, so you'd need to test it also
across all targets, and furthermore it depends on what exactly is being
saved/restored, many options might be at the same spot.
So perhaps we want to compute some hash of the options stuff (e.g. compute it
by the awk scripts that emit options*.[ch]) and use that to determine LTO
compatibility in addition to the version?

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (8 preceding siblings ...)
  2021-04-06 10:26 ` jakub at gcc dot gnu.org
@ 2021-04-06 11:32 ` hubicka at ucw dot cz
  2021-04-08  8:58 ` cvs-commit at gcc dot gnu.org
  2021-04-08  8:58 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 14+ messages in thread
From: hubicka at ucw dot cz @ 2021-04-06 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> ---
> Many of the *.opt changes are target specific, so you'd need to test it also
> across all targets, and furthermore it depends on what exactly is being
> saved/restored, many options might be at the same spot.
> So perhaps we want to compute some hash of the options stuff (e.g. compute it
> by the awk scripts that emit options*.[ch]) and use that to determine LTO
> compatibility in addition to the version?

That would work.  One does not really do that in lto header, simply
stream the hash before streaming out the optimization_node decl.
Bit sad would be that w/o version info you have no indication if you
mixed new compiler with old objects or vice versa, but that is minor
anoyance I guess.  It would be good that compiler would just
sorryclaiming that it can not read object files created by different
version..

I believe we already safe a diff from default values rather than
streaming out all values. An option would be tom strea the option names
rather than indexes so adding/removing completely unrelated option does
not disturb the file format.

Honza
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (9 preceding siblings ...)
  2021-04-06 11:32 ` hubicka at ucw dot cz
@ 2021-04-08  8:58 ` cvs-commit at gcc dot gnu.org
  2021-04-08  8:58 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-08  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:3134e02305d00b358659d42400f45bdd49f4fbd3

commit r10-9663-g3134e02305d00b358659d42400f45bdd49f4fbd3
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Apr 8 10:56:53 2021 +0200

    lto/99898 - bump LTO_minor_version

    This bumps LTO_minor_version to address the observation in PR99898.

    2021-04-08  Richard Biener  <rguenther@suse.de>

            PR lto/99898
            * lto-streamer.h (LTO_minor_version): Bump.

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

* [Bug lto/99898] Possible LTO object incompatibility on gcc-10 branch
  2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
                   ` (10 preceding siblings ...)
  2021-04-08  8:58 ` cvs-commit at gcc dot gnu.org
@ 2021-04-08  8:58 ` rguenth at gcc dot gnu.org
  11 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08  8:58 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Just to make sure I bumped the minor version again, thus fixed.

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

end of thread, other threads:[~2021-04-08  8:58 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-03 16:20 [Bug lto/99898] New: Possible LTO object incompatibility on gcc-10 branch ohaiziejohwahkeezuoz at xff dot cz
2021-04-03 17:34 ` [Bug lto/99898] " ohaiziejohwahkeezuoz at xff dot cz
2021-04-04  5:10 ` pinskia at gcc dot gnu.org
2021-04-06  6:20 ` marxin at gcc dot gnu.org
2021-04-06  6:59 ` rguenth at gcc dot gnu.org
2021-04-06 10:03 ` hubicka at ucw dot cz
2021-04-06 10:07 ` hubicka at ucw dot cz
2021-04-06 10:08 ` jakub at gcc dot gnu.org
2021-04-06 10:11   ` Jan Hubicka
2021-04-06 10:11 ` hubicka at ucw dot cz
2021-04-06 10:26 ` jakub at gcc dot gnu.org
2021-04-06 11:32 ` hubicka at ucw dot cz
2021-04-08  8:58 ` cvs-commit at gcc dot gnu.org
2021-04-08  8:58 ` rguenth at gcc dot gnu.org

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).