From owner-freebsd-bugs@freebsd.org Sat Jan 13 14:02:37 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 36CE6E66F6A for ; Sat, 13 Jan 2018 14:02:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E36133EB for ; Sat, 13 Jan 2018 14:02:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 12E98227A3 for ; Sat, 13 Jan 2018 14:02:37 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w0DE2a30086125 for ; Sat, 13 Jan 2018 14:02:36 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w0DE2acv086124 for freebsd-bugs@FreeBSD.org; Sat, 13 Jan 2018 14:02:36 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 225105] Linux static golang binaries crash at startup Date: Sat, 13 Jan 2018 14:02:37 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: trasz@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jan 2018 14:02:37 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225105 --- Comment #5 from Edward Tomasz Napierala --- The first chunks (passing pointers to pointers) breaks the dynamically link= ed binary: % ./go cannot set up thread-local storage: cannot set %fs base address for thread-local storage; ktrace looks like this: 64990 go CALL linux_arch_prctl(0x1002,0x800ac31c0) 64990 go RET linux_arch_prctl -1 errno -14 Bad address 64990 go CALL writev(0x2,0x7fffffffc410,0x3) 64990 go GIO fd 2 wrote 89 bytes "cannot set up thread-local storage: cannot set %fs base address for thread-local storage " 64990 go RET writev 89/0x59 64990 go CALL linux_exit_group(0x7f) It also doesn't fix the statically linked binary, although it changes the w= ay it fails: (gdb) run Starting program: /usr/home/en322/aosp/prebuilts/go/linux-x86/bin/gofmt=20 Program received signal SIGSEGV, Segmentation fault. runtime.settls () at prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s:5= 24 524 prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s: No such file = or directory. (gdb) where #0 runtime.settls () at prebuilts/go/linux-x86/src/runtime/sys_linux_amd64.s:524 #1 0x0000000000453694 in runtime.rt0_go () at prebuilts/go/linux-x86/src/runtime/asm_amd64.s:145 #2 0x0000000000000000 in ?? () --=20 You are receiving this mail because: You are the assignee for the bug.=