From owner-freebsd-hackers@freebsd.org Wed Dec 7 17:51:34 2016 Return-Path: Delivered-To: freebsd-hackers@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 29C3FC6BC92 for ; Wed, 7 Dec 2016 17:51:34 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-qk0-x243.google.com (mail-qk0-x243.google.com [IPv6:2607:f8b0:400d:c09::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCEA0777 for ; Wed, 7 Dec 2016 17:51:33 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-qk0-x243.google.com with SMTP id h201so49284802qke.3 for ; Wed, 07 Dec 2016 09:51:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+b2j19NnanRCKA0B4sztUmi8DwWE20FR4c8gVOzgpFE=; b=vWhoqlDXrTCWuGLxlNA61d1Tjt+WBXZyh95MJ0TPNKtX+w68v7tg1wmUlDWdBNvHCY de9TspSsmZ7mpvYLwPmePdvJCO8BdW+5ei4Ly7GUtl7+XB/G1Bo+8KJFel+FSQtjqPSB xj0fiN7Rom9I36ybSxmLyeAbLZ/ScLi/IdHCrmEqQI6UXmuOmqROR1iCg+APQ2LrkQR7 Z/RPNJ2EOieoM0agoEI4CfqfZrT0y3zvJgTU63uvVcwy25rpwCH2IIzUjiJf8zDR7QVp kpiIcee+u9NcVTH4vcJrhbnzRd6BX0q4ea6sy2kefvK01tryui8zeZC6Jzp91KVJWtxk SuVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+b2j19NnanRCKA0B4sztUmi8DwWE20FR4c8gVOzgpFE=; b=l1y03X6VPxvewB2tc7nNtGkXmYZFgO22cl3POgGjmn7epANr2CGpU75qVQneC9NlJP S2BYZMosq7fXYm+89sJ20dr5TJ7+AWLi1wg+LnNhEFcY4uHxaA9bW3NoukVXhY9GyNG7 M+fUiOG6zvWF+sqAnRE/+jo+ufbvcvXcDDkXr/OWmzv+Lb4u74NhEJ4iWXNBJNNWGDE9 c0MdpUI6ntg8z3RIXlyJZLOlpKHu07eFKHH3a5UTCUKGGJc24qV6IxSGyGB9nqlSE89R sX05gaapUyaP6a928RX2tv/GpFjt19OIZ4f5TrYAY/PpuYfcyBBgcxvgEU+oLe+bGqAA +EbQ== X-Gm-Message-State: AKaTC03R86l/U0wk/TFPqmUldSUE4+9D9WWNREC7CXEJ3WTp9yh/rsbWhyMx0dlxBniZcv9VI6Nsq6pmhrZFjQ== X-Received: by 10.55.161.21 with SMTP id k21mr61786676qke.149.1481133093085; Wed, 07 Dec 2016 09:51:33 -0800 (PST) MIME-Version: 1.0 Sender: kmacybsd@gmail.com Received: by 10.140.91.33 with HTTP; Wed, 7 Dec 2016 09:51:32 -0800 (PST) In-Reply-To: References: <27e1a828-5cd9-0755-50ca-d7143e7df117@multiplay.co.uk> <20161206125919.GQ54029@kib.kiev.ua> <8b502580-4d2d-1e1f-9e05-61d46d5ac3b1@multiplay.co.uk> <20161206143532.GR54029@kib.kiev.ua> From: "K. Macy" Date: Wed, 7 Dec 2016 09:51:32 -0800 X-Google-Sender-Auth: xerPnhXOpbejXWW3-PcRJjLX4xw Message-ID: Subject: Re: Help needed to identify golang fork / memory corruption issue on FreeBSD To: Steven Hartland Cc: Konstantin Belousov , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Dec 2016 17:51:34 -0000 > No it doesn't, each built binary its totally standalone and uses asm for > core system calls. > > The runtime directly creates kernel threads with thr_new, which it then > manages internally. The thr and umtx syscalls are, in practice, an SPI (service private interface). They're not well documented, and using them directly is going to be brittle across releases. In general, using system calls directly is essentially static linking which is even out of vogue on Linux and not even permitted on OSX, Windows, or Solaris. You're creating a program that is only guaranteed to work for the duration of current ABI guarantees. I understand that this is one of the things that people *like* about go, but I just wanted to observe that YMWV. -M