Skip to content

misc/dist: go1.2.freebsd/amd64 binary distribution segfaults on FreeBSD 9.2 x86-64 #7025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gopherbot opened this issue Dec 28, 2013 · 7 comments

Comments

@gopherbot
Copy link
Contributor

by astrange:

Running the binary distribution of go 1.2 (or any of its RCs) on our FreeBSD 9.2 servers
immediately crashes. The same applies for go_bootstrap to build it from source.

go 1.1 runs fine.

# uname -a
FreeBSD yyy 9.2-RELEASE FreeBSD 9.2-RELEASE #6: Sun Oct 13 05:14:05 EDT 2013    
xxx@yyy:/usr/obj/usr/src/sys/ZZZ  amd64
# setenv GOROOT `pwd`
# sysctl hw.ncpu
hw.ncpu: 16
# gdb761 ./bin/go
GNU gdb (GDB) 7.6.1 [GDB v7.6.1 for FreeBSD]
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd9.2".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>;...
Reading symbols from /usr/home/astrange/go/bin/go...done.
warning: Missing auto-load scripts referenced in section .debug_gdb_scripts
of file /usr/home/astrange/go/bin/go
Use `info auto-load python [REGEXP]' to list them.
(gdb) run
Starting program: /usr/home/astrange/go/./bin/go 
[New LWP 100295]
[New Thread 801407400 (LWP 100295)]

Program received signal SIGBUS, Bus error.
[Switching to Thread 801407400 (LWP 100295)]
0x0000000000476dc7 in runtime.sysctl () at
/usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s:289
289 /usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s: No such file or directory.
(gdb) bt
#0  0x0000000000476dc7 in runtime.sysctl () at
/usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s:289
#1  0x0000000000463847 in getncpu () at /usr/local/go/src/pkg/runtime/os_freebsd.c:35
#2  0x0000000000463b5a in runtime.osinit () at
/usr/local/go/src/pkg/runtime/os_freebsd.c:127
#3  0x0000000000474b00 in _rt0_go () at /usr/local/go/src/pkg/runtime/asm_amd64.s:86
#4  0x0000000000000001 in ?? ()
#5  0x00007fffffffda78 in ?? ()
#6  0x0000000000000001 in ?? ()
#7  0x00007fffffffda78 in ?? ()
#8  0x0000000800b71800 in ?? () from /libexec/ld-elf.so.1
#9  0x0000000800b83000 in ?? ()
#10 0x0000000000000000 in ?? ()
(gdb)
@davecheney
Copy link
Contributor

Comment 1:

@astrange how did you build go 1.2 ? Did you have a previous version on your system
previously ? Is it still in your path ? Is GOROOT set ? If so, unset it and try to build
go again.

@gopherbot
Copy link
Contributor Author

Comment 2 by astrange:

This is the build from https://go.googlecode.com/files/go1.2.freebsd-amd64.tar.gz.
I also built lang/go from ports.

@davecheney
Copy link
Contributor

Comment 3:

Ahh ok I understand now. 
Please make the following changes to your setup and try again
1. move the files from https://go.googlecode.com/files/go1.2.freebsd-amd64.tar.gz to
/usr/local/go as described in the install documentation
2. ensure that /usr/local/go/bin is in your PATH and no other versions of go are in your
path
3. ensure that GOROOT is not set.
If none of these steps resolves the problems, please reverse these steps and remove any
trace of Go from your system before attempting to build from source.
Specifically _do_not_set_ GOROOT.

Labels changed: added repo-main, os-freebsd.

@davecheney
Copy link
Contributor

Comment 4:

@astrange, I cannot reproduce this problem using the version of Go 1.2 from the download
site.
In addition to my comments in #3 please check that you have installed go from the
download site correctly, your original issue report included this line
0x0000000000476dc7 in runtime.sysctl () at
/usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s:289
289 /usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s: No such file or directory.
which suggested that /usr/local/go/src/pkg/runtime/sys_freebsd_amd64.s was missing. If
this were the case then you may not have installed the binary Go installation correctly.

@davecheney
Copy link
Contributor

Comment 5:

Status changed to WaitingForReply.

@gopherbot
Copy link
Contributor Author

Comment 6 by astrange:

This is https://golang.org/issue/7056.

@davecheney
Copy link
Contributor

Comment 7:

Status changed to Duplicate.

Merged into issue #7056.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants