From: "Johann Klähn" <kljohann@gmail.com>
To: William Morgan <wmorgan@masanjin.net>
Cc: sup-talk <sup-talk@rubyforge.org>
Subject: Re: [sup-talk] [sup-devel] [heliotrope] crashes while importing
Date: Sun, 24 Jun 2012 14:00:39 +0200 [thread overview]
Message-ID: <CAE+8KM1J_Q-N+2Sopq7Ta0nebk85MfK9DzxnerKHgpLz68-Rzg@mail.gmail.com> (raw)
In-Reply-To: <CAE+8KM0SqqLfGKnTTAw6TDRdb0eTBftJdueBghGxnoXE+wN3hg@mail.gmail.com>
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 <Address 0x7ffff7e6a04a out of bounds>
(gdb) print dst_ + (n-2)
$2 = 0x7ffff7e6a049 <Address 0x7ffff7e6a049 out of bounds>
(gdb) print dst_ + 80
$16 = 0x7ffff7e6a005 <Address 0x7ffff7e6a005 out of bounds>
(gdb) print dst_ + 74
$22 = 0x7ffff7e69fff ""
(gdb) print dst_ + 75
$23 = 0x7ffff7e6a000 <Address 0x7ffff7e6a000 out of bounds>
(gdb) print limit_
$24 = 0x7ffff7e78000 "wp/labels"
(gdb) print limit_ + 1
$25 = 0x7ffff7e78001 "p/labels"
(gdb) print limit_ - 1
$26 = 0x7ffff7e77fff <Address 0x7ffff7e77fff out of bounds>
(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
prev parent reply other threads:[~2012-06-24 12:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120301151701.23555.84803@localhost>
[not found] ` <1330985181-sup-8598@typhon>
[not found] ` <CAE+8KM0gu1UD=gGXfiEwmceW82AxF02Y+=Y-AZTW3SR5hToXZg@mail.gmail.com>
[not found] ` <CAE+8KM3BeubqLWAZFYOYjEiVUYpQT3vhwhaf37r1BzVECngbJA@mail.gmail.com>
2012-04-20 20:52 ` [sup-talk] Fwd: " William Morgan
2012-04-21 17:36 ` [sup-talk] " Johann Klähn
2012-06-24 12:00 ` Johann Klähn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAE+8KM1J_Q-N+2Sopq7Ta0nebk85MfK9DzxnerKHgpLz68-Rzg@mail.gmail.com \
--to=kljohann@gmail.com \
--cc=sup-talk@rubyforge.org \
--cc=wmorgan@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox