Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F36ADD91C for ; Thu, 13 Sep 2012 06:29:14 +0000 (UTC) Received: (qmail 53691 invoked by uid 500); 13 Sep 2012 06:29:13 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 53337 invoked by uid 500); 13 Sep 2012 06:29:13 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 53169 invoked by uid 99); 13 Sep 2012 06:29:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 06:29:07 +0000 Date: Thu, 13 Sep 2012 17:29:07 +1100 (NCT) From: "Lucas Martin-King (JIRA)" To: dev@avro.apache.org Message-ID: <1200220941.73623.1347517747861.JavaMail.jiratomcat@arcas> In-Reply-To: <271032784.73622.1347517747713.JavaMail.jiratomcat@arcas> Subject: [jira] [Updated] (AVRO-1161) Avro-C: Memory Leak in avro_schema_record() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AVRO-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Lucas Martin-King updated AVRO-1161: ------------------------------------ Summary: Avro-C: Memory Leak in avro_schema_record() (was: Avro-C) > Avro-C: Memory Leak in avro_schema_record() > ------------------------------------------- > > Key: AVRO-1161 > URL: https://issues.apache.org/jira/browse/AVRO-1161 > Project: Avro > Issue Type: Bug > Components: c > Affects Versions: 1.7.1 > Reporter: Lucas Martin-King > Labels: memory_leak > > There seems to be a bug in the use of avro_schema_record() within the datafile reader. I'm currently investigating this myself, and can hopefully submit a patch soon, however I am wondering if there is anything I am forgetting to do when using the Avro API? > Our program is opening and closing lots of log files, and Valgrind gives me this message: > ==20151== 32,518 (48 direct, 32,470 indirect) bytes in 1 blocks are definitely lost in loss record 62 of 65 > ==20151== at 0x4C2BFCB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==20151== by 0x4C2C27F: realloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > ==20151== by 0x4E3D074: avro_default_allocator (allocation.c:36) > ==20151== by 0x4E60F8C: avro_schema_record (schema.c:558) > ==20151== by 0x4E61A5E: avro_schema_from_json_t (schema.c:856) > ==20151== by 0x4E622E9: avro_schema_from_json_root (schema.c:1083) > ==20151== by 0x4E624C9: avro_schema_from_json_length (schema.c:1127) > ==20151== by 0x4E3FE92: file_read_header (datafile.c:314) > ==20151== by 0x4E40796: avro_file_reader_fp (datafile.c:491) > ==20151== by 0x4082D3: LogReader::LogReader(_IO_FILE*, char const*) (LogReader.cpp:32) > ==20151== by 0x4066A3: main (main.cpp:206) -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira