From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.229.134.77 with SMTP id i13csp207074qct; Sun, 24 Jun 2012 05:05:13 -0700 (PDT) Received: by 10.182.197.65 with SMTP id is1mr8741690obc.27.1340539513106; Sun, 24 Jun 2012 05:05:13 -0700 (PDT) Return-Path: Received: from rubyforge.org (50-56-192-79.static.cloud-ips.com. [50.56.192.79]) by mx.google.com with ESMTP id ac9si7024198obc.169.2012.06.24.05.05.12; Sun, 24 Jun 2012 05:05:13 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org; dkim=neutral (body hash did not verify) header.i=@gmail.com Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 9E82F2E072; Sun, 24 Jun 2012 12:05:12 +0000 (UTC) Received: from mail-yx0-f178.google.com (mail-yx0-f178.google.com [209.85.213.178]) by rubyforge.org (Postfix) with ESMTP id AF9402E060 for ; Sun, 24 Jun 2012 12:00:59 +0000 (UTC) Received: by yenl6 with SMTP id l6so2831666yen.23 for ; Sun, 24 Jun 2012 05:00:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=XLvzi95v52Mbk9TaIxpNtaNL3kZQ1VUEpStPpRSWefE=; b=blUgdY5o1uplul/AaC7RlzzT0l+PB0FPdYQWn+/lLCDjhjaJ127RxEHKtxGSRqIlRe G04X7HpBCjC9ZinsdijeChUkUC60G8ZPDG5ZZ77i6vkkQV7fThFfsMj1B/g3ru3P7OKC Tnjq+eHKLlmH4wXqs/KaHHVdrL2xWgrjn2TJkM1p9VWGrAW2V67dDOTVb7OD+0r7g1zE tZC5NryFeLLuZcgMxAKUayrv2GnbqpfsgVXIiOtcdduUEVCexrlytTHyv+z2FJEq+W8/ wkZCLpBvpjuD33Z4sfye5sluAz5i1rAKq4HyTPEfDlnadBMYQbT2RwLreWKb7MWe50Ve UDog== Received: by 10.236.146.97 with SMTP id q61mr9381102yhj.113.1340539259401; Sun, 24 Jun 2012 05:00:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.147.9.7 with HTTP; Sun, 24 Jun 2012 05:00:39 -0700 (PDT) In-Reply-To: References: <20120301151701.23555.84803@localhost> <1330985181-sup-8598@typhon> <1334932275-turnsole-49140@terminus-est> From: =?UTF-8?Q?Johann_Kl=C3=A4hn?= Date: Sun, 24 Jun 2012 14:00:39 +0200 Message-ID: To: William Morgan Cc: sup-talk Subject: Re: [sup-talk] [sup-devel] [heliotrope] crashes while importing X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org I just tried this again and the source of this problem does not seem to be memcpy vs memmove but that Append tries to copy data to unallocated memory. Note below that limit_ points to a string "wp/labels". This may indicate a stack overflow, I guess (Though I'm not too proficient in debugging C++). My test machine is running x86_64 (intel), ruby 1.9.3p194 and leveldb-ruby built from git HEAD. Program received signal SIGBUS, Bus error. 0x00007ffff7753ceb in __memcpy_ssse3_back () from /lib/libc.so.6 (gdb) bt #0 0x00007ffff7753ceb in __memcpy_ssse3_back () from /lib/libc.so.6 #1 0x00007ffff3777181 in leveldb::(anonymous namespace)::PosixMmapFile::Append (this=0x107d760, data=...) at util/env_posix.cc:227 #2 0x00007ffff3757cbc in leveldb::log::Writer::EmitPhysicalRecord (this=0x1009af0, t=leveldb::log::kFullType, ptr=0x10065d8 "\264\n", n=150) at db/log_writer.cc:93 #3 0x00007ffff3757a9a in leveldb::log::Writer::AddRecord (this=0x1009af0, slice=...) at db/log_writer.cc:67 #4 0x00007ffff374980e in leveldb::DBImpl::Write (this=0x107aa40, options=..., my_batch=0x7fffffffdb00) at db/db_impl.cc:1140 #5 0x00007ffff374a90a in leveldb::DB::Put (this=0x107aa40, opt=..., key=..., value=...) at db/db_impl.cc:1369 #6 0x00007ffff3749573 in leveldb::DBImpl::Put (this=0x107aa40, o=..., key=..., val=...) at db/db_impl.cc:1103 (gdb) up #1 0x00007ffff3777181 in leveldb::(anonymous namespace)::PosixMmapFile::Append (this=0x107d760, data=...) at util/env_posix.cc:227 227 memcpy(dst_, src, n); (gdb) print dst_ $34 = 0x7ffff7e69fb5 "" (gdb) print n $11 = 150 (gdb) print dst_ + (n-1) $1 = 0x7ffff7e6a04a
(gdb) print dst_ + (n-2) $2 = 0x7ffff7e6a049
(gdb) print dst_ + 80 $16 = 0x7ffff7e6a005
(gdb) print dst_ + 74 $22 = 0x7ffff7e69fff "" (gdb) print dst_ + 75 $23 = 0x7ffff7e6a000
(gdb) print limit_ $24 = 0x7ffff7e78000 "wp/labels" (gdb) print limit_ + 1 $25 = 0x7ffff7e78001 "p/labels" (gdb) print limit_ - 1 $26 = 0x7ffff7e77fff
(gdb) print map_size_ $28 = 65536 (gdb) print page_size_ $29 = 4096 (gdb) print base_ $30 = 0x7ffff7e68000 "\247T\210\024\036" (gdb) print last_sync_ $31 = 0x7ffff7e68000 "\247T\210\024\036" (gdb) print file_offset_ $32 = 0 _______________________________________________ sup-talk mailing list sup-talk@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-talk