Return-Path: X-Original-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9B47A199AD for ; Mon, 21 Mar 2016 15:18:27 +0000 (UTC) Received: (qmail 91078 invoked by uid 500); 21 Mar 2016 15:18:26 -0000 Delivered-To: apmail-hadoop-hdfs-dev-archive@hadoop.apache.org Received: (qmail 90862 invoked by uid 500); 21 Mar 2016 15:18:26 -0000 Mailing-List: contact hdfs-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-dev@hadoop.apache.org Delivered-To: mailing list hdfs-dev@hadoop.apache.org Received: (qmail 90665 invoked by uid 99); 21 Mar 2016 15:18:25 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2016 15:18:25 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9FCE12C1F69 for ; Mon, 21 Mar 2016 15:18:25 +0000 (UTC) Date: Mon, 21 Mar 2016 15:18:25 +0000 (UTC) From: "James Clampffer (JIRA)" To: hdfs-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (HDFS-10188) libhdfs++: Implement debug allocators MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 James Clampffer created HDFS-10188: -------------------------------------- Summary: libhdfs++: Implement debug allocators Key: HDFS-10188 URL: https://issues.apache.org/jira/browse/HDFS-10188 Project: Hadoop HDFS Issue Type: Sub-task Reporter: James Clampffer Assignee: James Clampffer I propose implementing a set of memory new/delete pairs with additional checking to detect double deletes, read-after-delete, and write-after-deletes to help debug resource ownership issues and prevent new ones from entering the library. One of the most common issues we have is use-after-free issues. The continuation pattern makes these really tricky to debug because by the time a segsegv is raised the context of what has caused the error is long gone. The plan is to add allocators that can be turned on that can do the following, in order of runtime cost. 1: no-op, forward through to default new/delete 2: memset free'd memory to 0 3: implement operator new with mmap, lock that region of memory once it's been deleted; obviously this can't be left to run forever because the memory is never unmapped This should also put some groundwork in place for implementing specialized allocators for tiny objects that we churn through like std::string. -- This message was sent by Atlassian JIRA (v6.3.4#6332)