From owner-freebsd-current@FreeBSD.ORG Fri Aug 30 13:30:12 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1F08CCC2 for ; Fri, 30 Aug 2013 13:30:12 +0000 (UTC) (envelope-from geo.liaskos@gmail.com) Received: from mail-ee0-x22c.google.com (mail-ee0-x22c.google.com [IPv6:2a00:1450:4013:c00::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ADA9624FC for ; Fri, 30 Aug 2013 13:30:11 +0000 (UTC) Received: by mail-ee0-f44.google.com with SMTP id b47so928139eek.3 for ; Fri, 30 Aug 2013 06:30:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2RynM5IfODeOnNTmDhsiPBl+MTwKNXM7HS+0YNH25Qg=; b=UZFr5LZe3CF1Qno/Q8o1EX6K4KjNorzwjnGNgw33ZmlWoHvQRrcCS6X7s8RsxqQaI/ yiJEE4whzXLdB55N9PcbmXt71CabAjhoiZkPCZzy30vw5SL4UjeCQAQcOg9Seew6IPt+ 4UTNIzyrZ4W62Cf3ExNjuobpmPm4ptnGdOmaQQfjKOXrn0PKeagGi4M2VQ2/toVVYyDr SS3Ev723wm5iWt6EMSo71vH6MyFXzlxEkCYAmmRJlhZEBRLlhq/O1R86E2kCZuS19PHs AXfCRS9qObFqwJufGk0hhE5B/EeydzKuZgcTZ1E4Vc1FGcWIPwX5a0kKJiBM2WaJTlZh 5cOw== MIME-Version: 1.0 X-Received: by 10.14.198.72 with SMTP id u48mr3804003een.55.1377869409408; Fri, 30 Aug 2013 06:30:09 -0700 (PDT) Received: by 10.223.72.5 with HTTP; Fri, 30 Aug 2013 06:30:09 -0700 (PDT) Date: Fri, 30 Aug 2013 16:30:09 +0300 Message-ID: Subject: Default kern.ipc.shm_allow_removed to 1 From: George Liaskos To: freebsd-current Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Aug 2013 13:30:12 -0000 Would it be feasible to change the default for 10? There is a lot of code that depends on the following behavior: void* address = shmat(shmkey, NULL /* desired address */, 0 /* flags */); // Here we mark the shared memory for deletion. Since we attached it in the // line above, it doesn't actually get deleted but, if we crash, this means // that the kernel will automatically clean it up for us. shmctl(shmkey, IPC_RMID, 0); if (address == kInvalidAddress) return NULL; The above snip is from Google Chrome, under FreeBSD with the current defaults that memory becomes unusable. If you don't follow that route it becomes extremely difficult to cleanup especially in a beast like Chrome. >From what I understand PC-BSD defaults to 1, OpenBSD and Linux also allow this behavior. Am I missing something obvious here? It seems to me that the pragmatic approach is to change this. Regards, George