arm64 multiple definition of `launchpad.net_juju_core_cmd._.0

Bug #1289067 reported by Curtis Hovey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Dave Cheney
gccgo-go (Ubuntu)
Fix Released
High
James Page
Trusty
Fix Released
High
James Page

Bug Description

This error was observed by Juju CI when it ran the juju-core unit tests on an arm64 image in ec2. The test run updated updated and installed the juju deps, unpacked a tarball of the 1.17.5 release canidate, and finally started the tests. The 1 test module that passed took 15 minutes, the output stalled for about 1 hour, then once something broken, all the tests were aborted. The attached log has the full details of the trace back. Here is the identify parts of the error:

+ cd /home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core
+ bzr whoami 'J. Random Hacker <email address hidden>'
+ make check
go test launchpad.net/juju-core/...
ok launchpad.net/juju-core 11.499s
go build launchpad.net/juju-core/state/apiserver/keymanager/testing: signal: Segmentation fault
go build launchpad.net/juju-core/utils/fslock: signal: Segmentation fault
go build launchpad.net/juju-core/worker/resumer: signal: Segmentation fault
go build launchpad.net/juju-core/log/syslog: signal: Segmentation fault
go build launchpad.net/juju-core/downloader: signal: Segmentation fault
go build launchpad.net/juju-core/worker/uniter/hook: signal: Segmentation fault
go build launchpad.net/juju-core/container/lxc/mock: signal: Segmentation fault
go build launchpad.net/juju-core/cmd/plugins/local: signal: Segmentation fault
# testmain
/tmp/go-build826229705/launchpad.net/juju-core/cmd/_test/launchpad.net/juju-core/libcmd.a(cmd.o): In function `launchpad.net_juju_core_cmd.Set.pN40_launchpad.net_juju_core_cmd.StringsValue':
/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:28: multiple definition of `launchpad.net_juju_core_cmd.Set.pN40_launchpad.net_juju_core_cmd.StringsValue'
/tmp/go-build826229705/launchpad.net/juju-core/libcmd.a(cmd.o):/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:28: first defined here
/tmp/go-build826229705/launchpad.net/juju-core/cmd/_test/launchpad.net/juju-core/libcmd.a(cmd.o): In function `launchpad.net_juju_core_cmd.String.pN40_launchpad.net_juju_core_cmd.StringsValue':
/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:34: multiple definition of `launchpad.net_juju_core_cmd.String.pN40_launchpad.net_juju_core_cmd.StringsValue'
/tmp/go-build826229705/launchpad.net/juju-core/libcmd.a(cmd.o):/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:34: first defined here
...
/tmp/go-build826229705/launchpad.net/juju-core/cmd/_test/launchpad.net/juju-core/libcmd.a(cmd.o): In function `launchpad.net_juju_core_cmd..import':
/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:4: multiple definition of `launchpad.net_juju_core_cmd..import'
/tmp/go-build826229705/launchpad.net/juju-core/libcmd.a(cmd.o):/home/ubuntu/juju-core_1.17.5/src/launchpad.net/juju-core/cmd/args.go:4: first defined here
/tmp/go-build826229705/launchpad.net/juju-core/cmd/_test/launchpad.net/juju-core/libcmd.a(cmd.o):(.data+0x1db0): multiple definition of `launchpad.net_juju_core_cmd._.0'
/tmp/go-build826229705/launchpad.net/juju-core/libcmd.a(cmd.o):(.data+0x1d00): first defined here
collect2: error: ld returned 1 exit status

Revision history for this message
Curtis Hovey (sinzui) wrote :
Revision history for this message
Dave Cheney (dave-cheney) wrote :

I'll take a crack. We backported a fix from the upstream dev branch but possibly it needs to be backported more forcefully.

Changed in juju-core:
assignee: nobody → Dave Cheney (dave-cheney)
tags: added: ppc64el
Revision history for this message
Dave Cheney (dave-cheney) wrote :

We need to backport

https://code.google.com/p/go/source/detail?r=017d82d5ef30c4035472c5bd40b2c00cceea5678

into the gccgo-go project, I cannot figure out how to link that project in the issue

Changed in juju-core:
assignee: Dave Cheney (dave-cheney) → nobody
milestone: 2.0 → 1.20.0
Revision history for this message
Curtis Hovey (sinzui) wrote :

@Dave

gccgo is not setup as a project. You probably don't mean it to since we want the fix in the distro.
"Also affects distribution" > ubuntu distro + gccgo-go package

Revision history for this message
Dave Cheney (dave-cheney) wrote :

This afternoon I confirmed that even with the latest cmd/go from the upstream trunk this error still occurs, and still occurs on all platforms, even amd64, not just gccgo only platforms.

The underlying cause is duplicate symbols being present, essentially the package under test is compiled twice, once normally, once with the test runner, then the linker tries to mash it all together.

I'm trying to distil a smaller test case for the upstream bug report

Revision history for this message
Dave Cheney (dave-cheney) wrote :

For those playing along at home, the issue is triggered by launchpad.net/juju-core/agent (to name one) using _external_ testing, not internal testing.

Revision history for this message
Dave Cheney (dave-cheney) wrote :

Apparently if I put this link

https://code.google.com/p/go/issues/detail?id=7627

in the bug report, magic gnomes spring into action.

Changed in juju-core:
milestone: 1.20.0 → 1.18.0
assignee: nobody → Dave Cheney (dave-cheney)
Revision history for this message
Dave Cheney (dave-cheney) wrote :

Hi James,

A fix for this issue has landed upstream.

Would you be able to respin gccgo-go to include that fix? To do so you'll need to remove debian/patches/ issue61970044_40001.diff and replace it with

https://codereview.appspot.com/download/issue61970044_80001.diff

as what landed upstream was later than the patch we applied

Then the patch for this issue

https://codereview.appspot.com/download/issue80300043_60001.diff

will apply cleanly.

Changed in gccgo-go (Ubuntu):
assignee: nobody → Dave Cheney (dave-cheney)
status: New → In Progress
James Page (james-page)
Changed in gccgo-go (Ubuntu Trusty):
importance: Undecided → High
assignee: Dave Cheney (dave-cheney) → James Page (james-page)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gccgo-go - 1.2.1-0ubuntu1

---------------
gccgo-go (1.2.1-0ubuntu1) trusty; urgency=medium

  * New upstream point release.
  * Fix error running unit tests due to duplicated symbols (LP: #1289067):
    - d/p/issue61970044_40001.diff: Replace with issue61970044_80001.diff,
      update to existing proposed fix upstream.
    - d/p/issue80300043_60001.diff: Cherry pick upstream trunk fix for
      cmd/go: go test -compiler gccgo produces duplicate symbol errors.
 -- James Page <email address hidden> Wed, 26 Mar 2014 10:50:18 +0000

Changed in gccgo-go (Ubuntu Trusty):
status: In Progress → Fix Released
Changed in juju-core:
status: Triaged → Fix Released
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.18.0 → 1.17.7
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.