Bug 974800 - unable to run go-5/go-6/go-7 on armv7
Summary: unable to run go-5/go-6/go-7 on armv7
Status: NEW
: 974799 (view as bug list)
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Current
Hardware: armv7 openSUSE Factory
: P3 - Medium : Normal (vote)
Target Milestone: ---
Assignee: Andreas Färber
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-10 21:06 UTC by Dirk Mueller
Modified: 2020-06-04 01:14 UTC (History)
8 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Mueller 2016-04-10 21:06:38 UTC
running go-5 on tumbleweed/armv7hl gives an endless hang, e.g. as seen on "go-5 version". 

gdb gives:

Program received signal SIGINT, Interrupt.
0xb639b750 in __pthread_mutex_unlock_usercnt (
    mutex=0xb6fff4dc <_rtld_local+1244>, decr=1) at pthread_mutex_unlock.c:73
73      pthread_mutex_unlock.c: No such file or directory.
(gdb) p i
No symbol "i" in current context.
(gdb) bt
#0  0xb639b750 in __pthread_mutex_unlock_usercnt (
    mutex=0xb6fff4dc <_rtld_local+1244>, decr=1) at pthread_mutex_unlock.c:73
#1  0xb64cb4ec in __GI___dl_iterate_phdr (
    callback=0xb64cb4ec <__GI___dl_iterate_phdr+436>, data=0x10415c54, 
    data@entry=0x10415c4c) at dl-iteratephdr.c:83
#2  0xb64cc3b0 in __gnu_Unwind_Find_exidx (pc=pc@entry=3057612094, 
    pcount=0x10415c74, pcount@entry=0x10415c6c)
    at ../sysdeps/arm/find_exidx.c:74
#3  0xb637c4f0 in get_eit_entry (ucbp=ucbp@entry=0x10415c88, 
    return_address=3057612094) at ../../../libgcc/unwind-arm-common.inc:210
#4  0xb637cc50 in __gnu_Unwind_Backtrace (trace=0xb6cef380 <unwind>, 
    trace_argument=0x10415f28, entry_vrs=<optimized out>)
    at ../../../libgcc/unwind-arm-common.inc:567
#5  0xb637d700 in _Unwind_Backtrace ()
    at ../../../libgcc/config/arm/libunwind.S:360
#6  0xb6cef440 in backtrace_full (state=<optimized out>, skip=skip@entry=0, 
    callback=<optimized out>, error_callback=<optimized out>, data=0x10415f54, 
    data@entry=0x10415f4c) at ../../../libbacktrace/backtrace.c:106
#7  0xb69d92d4 in runtime_callers (skip=skip@entry=1, 
    locbuf=locbuf@entry=0x10418074, m=m@entry=32, 
    keep_thunks=keep_thunks@entry=0 '\000')
    at ../../../libgo/runtime/go-callers.c:168
#8  0xb69e8adc in mcommoninit (mp=mp@entry=0x10418000)
---Type <return> to continue, or q <return> to quit---c
    at ../../../libgo/runtime/proc.c:808
#9  0xb69eb3d4 in runtime_allocm (p=p@entry=0x0, stacksize=stacksize@entry=-1, 
    ret_g0_stack=ret_g0_stack@entry=0x0, 
    ret_g0_stacksize=ret_g0_stacksize@entry=0x0)
    at ../../../libgo/runtime/proc.c:1146
#10 0xb69eb47c in newm (fn=0xb69ede60 <sysmon>, p=p@entry=0x0)
    at ../../../libgo/runtime/proc.c:1433
#11 0xb69ed3ec in runtime_main (dummy=<optimized out>)
    at ../../../libgo/runtime/proc.c:575
#12 0xb69eaf60 in kickoff () at ../../../libgo/runtime/proc.c:235
#13 0xb63f7540 in setcontext ()
    at ../sysdeps/unix/sysv/linux/arm/setcontext.S:82
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Comment 1 Andreas Schwab 2016-04-11 14:37:13 UTC
It loops in __gnu_Unwind_Backtrace.
Comment 2 Richard Biener 2016-04-12 09:11:45 UTC
If you managed to debug it that far you could have provided critical information
like on what frame it loops on and what personality is used.

Unwinding is not my primary expertise, nor is ARM, being GCC maintainer doesn't
automatically make me so.  armv7 is only a best effort thing, so this bug will
be very low priority for me.  Does it work with go-6?
Comment 3 Dirk Mueller 2016-04-12 14:02:05 UTC
Can you fix the _constraints so that the gcc6-go has a chance to build?
Comment 4 Richard Biener 2016-04-13 07:29:50 UTC
What's the issue with the _constraints that is not also present for gcc5-go?
(hint: _constraints are the same apart from package name changes)

How do you propose to fix them?

I'm missing sth like physicalmemory per processor, we need around 512MB per CPU / -j level.  If you can express that with the current file I'm all ears to a hint how to do that ...
Comment 5 Dirk Mueller 2016-04-17 15:47:24 UTC
For gcc5 we're deleting the constraints file as it can never be fulfilled. there is currently no way to create armv7 build workers with more than ~ 1GB of RAM (as the tota l guest including qemu needs to fit into the 32bit 2GB limit on the host). 

The gcc6 package builds just fine on armv7 without the constraints, as we only build with -j1 or -j2 depending on the worker hardware. just expressing a constraint of 700MB or so for armv7hl should always work (both gcc 5 and gcc 6)
Comment 6 Dirk Mueller 2016-04-17 15:48:49 UTC
it hangs also with gcc6-go
Comment 7 Richard Biener 2016-04-18 07:32:34 UTC
(In reply to Dirk Mueller from comment #5)
> For gcc5 we're deleting the constraints file as it can never be fulfilled.
> there is currently no way to create armv7 build workers with more than ~ 1GB
> of RAM (as the tota l guest including qemu needs to fit into the 32bit 2GB
> limit on the host). 
> 
> The gcc6 package builds just fine on armv7 without the constraints, as we
> only build with -j1 or -j2 depending on the worker hardware. just expressing
> a constraint of 700MB or so for armv7hl should always work (both gcc 5 and
> gcc 6)

Please show me a way to express this.
Comment 8 Bernhard Wiedemann 2016-08-09 12:00:39 UTC
This is an autogenerated message for OBS integration:
This bug (974800) was mentioned in
https://build.opensuse.org/request/show/417981 Factory / glibc
Comment 9 Matwey Kornilov 2017-03-31 19:13:08 UTC
Hello,

I am facing the same issue while tyring to build go1.7 using gcc as bootstrap.

gcc6-go-6.3.1+r245113-1.2.armv7hl
glibc-2.25-1.1.armv7hl
Comment 10 Matwey Kornilov 2017-04-01 19:31:36 UTC
*** Bug 974799 has been marked as a duplicate of this bug. ***
Comment 11 Richard Biener 2017-04-03 09:09:56 UTC
Andreas, should the new glibc have fixed this?
Comment 12 Andreas Schwab 2017-04-03 09:20:22 UTC
No, there are more bugs.
Comment 13 Matwey Kornilov 2017-04-07 19:22:28 UTC
(In reply to Andreas Schwab from comment #12)
> No, there are more bugs.

Do you know which ones?
Comment 14 Matwey Kornilov 2017-12-24 11:06:11 UTC
Has anybody tested gcc-7 already?
Comment 15 Dirk Mueller 2018-02-19 15:29:17 UTC
I'm trying with devel:ARM:Factory/go1.9 (gcc7) and it still hangs on initial go bootstrap via gcc-go
Comment 16 Matwey Kornilov 2018-05-09 07:31:13 UTC
Has somebody tried gcc8 already?
Comment 17 Matwey Kornilov 2019-01-01 08:36:11 UTC
I cannot reproduce the issue with gcc9
I build gcc version 9.0.0 20181230 (experimental) (GCC) as the following:

../gcc/configure --enable-languages=go --with-arch=armv7-a --with-tune=cortex-a15 --with-float=hard --with-abi=aapcs-linux --with-fpu=vfpv3-d16 --prefix=/opt/gcc/9

Then, build go1.11 as the following:

./make.bash
Building Go cmd/dist using /opt/gcc/9.
Building Go toolchain1 using /opt/gcc/9.
Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1.
Building Go toolchain2 using go_bootstrap and Go toolchain1.
Building Go toolchain3 using go_bootstrap and Go toolchain2.
Building packages and commands for linux/arm.
# os/user
cgo-gcc-prolog: In function '_cgo_a84f89c9c806_Cfunc_mygetgrgid_r':
cgo-gcc-prolog:59:42: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:59:78: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_a84f89c9c806_Cfunc_mygetgrnam_r':
cgo-gcc-prolog:81:42: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:81:78: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_a84f89c9c806_Cfunc_mygetpwnam_r':
cgo-gcc-prolog:103:42: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:103:78: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_a84f89c9c806_Cfunc_mygetpwuid_r':
cgo-gcc-prolog:125:42: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:125:78: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
# os/user
cgo-gcc-prolog: In function '_cgo_a84f89c9c806_Cfunc_mygetgrouplist':
cgo-gcc-prolog:46:56: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:46:68: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
# net
cgo-gcc-prolog: In function '_cgo_18049202ccd9_C2func_getnameinfo':
cgo-gcc-prolog:51:29: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_18049202ccd9_Cfunc_getnameinfo':
cgo-gcc-prolog:77:29: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
# net
cgo-gcc-prolog: In function '_cgo_18049202ccd9_C2func_getaddrinfo':
cgo-gcc-prolog:48:53: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:48:65: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_18049202ccd9_Cfunc_freeaddrinfo':
cgo-gcc-prolog:65:21: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_18049202ccd9_Cfunc_getaddrinfo':
cgo-gcc-prolog:101:53: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog:101:65: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
# plugin
cgo-gcc-prolog: In function '_cgo_463ee791a5ac_Cfunc_pluginLookup':
cgo-gcc-prolog:45:78: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
cgo-gcc-prolog: In function '_cgo_463ee791a5ac_Cfunc_pluginOpen':
cgo-gcc-prolog:64:40: warning: taking address of packed member of 'struct <anonymous>' may result in an unaligned pointer value [-Waddress-of-packed-member]
---
Installed Go for linux/arm in /home/matwey/lab/go
Installed commands in /home/matwey/lab/go/bin
Comment 19 Swamp Workflow Management 2019-05-03 19:09:17 UTC
SUSE-SU-2019:1149-1: An update that solves one vulnerability and has two fixes is now available.

Category: security (moderate)
Bug References: 1121397,1125768,974800
CVE References: CVE-2019-6486
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15 (src):    go1.10-1.10.8-1.8.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 22 Swamp Workflow Management 2020-05-19 16:19:38 UTC
SUSE-RU-2020:1341-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
SUSE Linux Enterprise Module for Open Buildservice Development Tools 15-SP1 (src):    go1.9-1.9.7-3.6.2

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 23 Swamp Workflow Management 2020-05-26 13:20:57 UTC
openSUSE-RU-2020:0718-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
openSUSE Leap 15.1 (src):    go1.9-1.9.7-lp151.2.3.1
Comment 24 Swamp Workflow Management 2020-06-04 01:14:28 UTC
openSUSE-RU-2020:0768-1: An update that has four recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1082409,1119634,1121397,974800
CVE References: 
Sources used:
openSUSE Backports SLE-15-SP1 (src):    go1.9-1.9.7-bp151.2.3.1