You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const char* magic_ptr = input->data() + kEncodedLength - 8;
const uint32_t magic_lo = DecodeFixed32(magic_ptr);
const uint32_t magic_hi = DecodeFixed32(magic_ptr + 4);
const uint64_t magic = ((static_cast<uint64_t>(magic_hi) << 32) |. -> may crashed here as tombs saied.
(static_cast<uint64_t>(magic_lo)));
if (magic != kTableMagicNumber) {
return Status::Corruption("not an sstable (bad magic number)");
}
The background are on above, so the situation is so wierd that this problem only happened in old Android phone's like Redmi 3s, Meizu which use Android 7.1. The new Android phone not see this crashed at all.
And as I see the tombs and code(also obj code), I didn't see why this happened,
ldb info:
000335.ldb (BuildId: unknown. FileSize: 238650. LastModified: 2024-11-04T07:33:23.912+0800)
the mmap of the ldb file that lead to crash is
7f6a12a000-7f6a165000 r--s 00000000 00:1b 39201 /storage/emulated/0/Android/data/com.tencent.map/files/SOSOMap/data/nerd/cache/1_3_mergeBaseTileData/000335.ldb
which calculate the offset of fault address is >>> 0x7f6a164432 - 0x7f6a12a000 238642 which is inside the length 238650, also it is exactly the address offset to the magic number ptr --- 8Bytes before EOF.
I didn't see the exactly reason and possibility a memory access error would happened.. Can you guys help me understand why this problem happened and, how could we fix it up.
Thanks,
BTW, I can provide any infomations later that needed if it could help to resolve this.
The text was updated successfully, but these errors were encountered:
Hi leveldb,
First of all, I will paste the tombs here:
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x7f6a164432
x0 0000007f65071720 x1 0000007f65071750 x2 0000000000000030 x3 0000007f65071750
x4 0000007f65071778 x5 0000000000000001 x6 0000005595f09c0f x7 30302f6174614465
x8 0000007f65071760 x9 4c01e3a164ac5464 x10 db4775248b80fb57 x11 6e65742e6d6f632f
x12 70616d2e746e6563 x13 532f73656c69662f x14 642f70614d4f534f x15 0000007f9497cbb8
x16 0000007f6dcfdba8 x17 0000007f6daa7f70 x18 0000000000000020 x19 0000007f65071760
x20 0000007f65071828 x21 00000055953e1db0 x22 0000005597e84d10 x23 0000007f65073500
x24 0000007f6a16440a x25 0000007f65073500 x26 0000007f65073500 x27 0000000000000001
x28 0000000000000000 x29 0000007f650716f0
sp 0000007f65071680 lr 0000007f6daa8040 pc 0000007f6dab1534
And also the memory's around 0x7f6a164432
memory near x24:
0000007f6a1643e8 000000018a0ec0fb 0000480000002300 .........#...H..
0000007f6a1643f8 0000900000006c00 6975000000000500 .l............ui
0000007f6a164408 c6cc320ec6957a56 000000000001b90e Vz...2..........
0000007f6a164418 0000000000000000 0000000000000000 ................
0000007f6a164428 0000000000000000 75248b80fb570000 ..........W...$u
0000007f6a164438 000000000000db47 0000000000000000 G...............
0000007f6a164448 0000000000000000 0000000000000000 ................
0000007f6a164458 0000000000000000 0000000000000000 ................
0000007f6a164468 0000000000000000 0000000000000000 ................
0000007f6a164478 0000000000000000 0000000000000000 ................
0000007f6a164488 0000000000000000 0000000000000000 ................
0000007f6a164498 0000000000000000 0000000000000000 ................
for the obj code around crash:
00000000003cc4f8 <_ZN3mbe7leveldb6Footer10DecodeFromEPNS0_5SliceE>:
3cc4f8: d10203ff sub sp, sp, #128
3cc4fc: a9045ff8 stp x24, x23, [sp, #64]
3cc500: a90557f6 stp x22, x21, [sp, #80]
3cc504: a9064ff4 stp x20, x19, [sp, #96]
3cc508: a9077bfd stp x29, x30, [sp, #112]
3cc50c: 9101c3fd add x29, sp, #112
3cc510: d53bd057 mrs x23, TPIDR_EL0
3cc514: f94016e9 ldr x9, [x23, #40] ->. crashed Here
3cc518: d29f6aea mov x10, #64343
3cc51c: f2b1700a movk x10, #35712, lsl #16
3cc520: f2cea48a movk x10, #29988, lsl #32
3cc524: f9001fe9 str x9, [sp, #56]
3cc528: f9400038 ldr x24, [x1]
3cc52c: f2fb68ea movk x10, #56135, lsl #48
3cc530: aa0803f3 mov x19, x8
3cc534: f9401709 ldr x9, [x24, #40]
3cc538: eb0a013f cmp x9, x10
3cc53c: 540001e1 b.ne 0x3cc578 <_ZN3mbe7leveldb6Footer10DecodeFromEPNS0_5SliceE+0x80>
related source cpp code are:
const char* magic_ptr = input->data() + kEncodedLength - 8;
const uint32_t magic_lo = DecodeFixed32(magic_ptr);
const uint32_t magic_hi = DecodeFixed32(magic_ptr + 4);
const uint64_t magic = ((static_cast<uint64_t>(magic_hi) << 32) |. -> may crashed here as tombs saied.
(static_cast<uint64_t>(magic_lo)));
if (magic != kTableMagicNumber) {
return Status::Corruption("not an sstable (bad magic number)");
}
The background are on above, so the situation is so wierd that this problem only happened in old Android phone's like Redmi 3s, Meizu which use Android 7.1. The new Android phone not see this crashed at all.
And as I see the tombs and code(also obj code), I didn't see why this happened,
ldb info:
000335.ldb (BuildId: unknown. FileSize: 238650. LastModified: 2024-11-04T07:33:23.912+0800)
the mmap of the ldb file that lead to crash is
7f6a12a000-7f6a165000 r--s 00000000 00:1b 39201 /storage/emulated/0/Android/data/com.tencent.map/files/SOSOMap/data/nerd/cache/1_3_mergeBaseTileData/000335.ldb
which calculate the offset of fault address is >>> 0x7f6a164432 - 0x7f6a12a000 238642 which is inside the length 238650, also it is exactly the address offset to the magic number ptr --- 8Bytes before EOF.
I didn't see the exactly reason and possibility a memory access error would happened.. Can you guys help me understand why this problem happened and, how could we fix it up.
Thanks,
BTW, I can provide any infomations later that needed if it could help to resolve this.
The text was updated successfully, but these errors were encountered: