From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.16]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q72AGLUA015807 for ; Thu, 2 Aug 2012 06:16:21 -0400 Received: from v041420.home.net.pl (v041420.home.net.pl [89.161.211.18]) by mx1.redhat.com (8.14.4/8.14.4) with SMTP id q72AGH9e026845 for ; Thu, 2 Aug 2012 06:16:18 -0400 From: Hubert Kario Date: Thu, 02 Aug 2012 12:16:08 +0200 Message-ID: <2897273.IW82gCqcCL@bursa22> In-Reply-To: <20120802015017.GH11876@agk-dp.fab.redhat.com> References: <1912398.2IYGSI2Xbi@bursa22> <2392219.d0OTJVWRfz@bursa22> <20120802015017.GH11876@agk-dp.fab.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1401249.4s8AGRzfjg"; micalg="pgp-sha1"; protocol="application/pgp-signature" Content-Transfer-Encoding: 7Bit Subject: Re: [linux-lvm] [lvm2cmd] Heap destruction by lvm2_exit()? Reply-To: LVM general discussion and development List-Id: LVM general discussion and development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , List-Id: To: Alasdair G Kergon Cc: linux-lvm@redhat.com --nextPart1401249.4s8AGRzfjg Content-Type: multipart/mixed; boundary="nextPart1966201.ALDtxO2xm5" Content-Transfer-Encoding: 7Bit --nextPart1966201.ALDtxO2xm5 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Thursday 02 of August 2012 02:50:17 Alasdair G Kergon wrote: > Another factor might be different contents in your lvm.conf file compared > with mine, or different devices present causing you to hit a problem code > path and me not to. As far as I know, I'm using standard lvm.conf (attached). I'm having the same error (in valgrind) when I run the test app as a regular user, so actual LVM config shouldn't have any effect (?): /dev/mapper/control: open failed: Permission denied Failure to communicate with kernel device-mapper driver. > > Or some other difference in the distribution/compiler/libraries etc. I don't think so, I've got a test app that reliably crashes with normal execution while works fine under valgrind: #define _GNU_SOURCE #include #include #include #include #include #include #include #include int keep_running = 1; void signal_handler(int dummy) { keep_running = 0; } int main(int argc, char **argv) { signal(SIGTERM, signal_handler); signal(SIGINT, signal_handler); const char dev[] = "string"; printf("Variable before: \"%s\"\n", dev); void *handle = lvm2_init(); lvm2_exit(handle); while (keep_running) { int arr_len = (random()%320+1) * 1024; char **table = malloc(sizeof(char *) * arr_len); assert(table); for (size_t i=0; i