Fixed : 當準備query時若是發生error時的error handling有問題,cass_prepare_free不能傳入Null
之前沒事而現在有事是因為動到node0上的table所以prepare query會失敗
如果跑test時能夠顯示error log其實可以很快發現
從這篇的以下回應得到靈感
https://github.com/akheron/jansson/issues/451
This segmentation fault is occurring inside the libc malloc. I've only ever seen this happen after memory corruption. I'd suggest testing your program from valgrind to try finding the origin of this memory corruption.
Can reproduce in node0/node10. Passed in node1.
bazel test //tests:test_scylla
external/bazel_tools/tools/test/test-setup.sh: line 310: 14 Segmentation fault (core dumped) "${TEST_PATH}" "$@" 2>&1
run scylla_test with gdb
bazel build //tests:test_scylla -c dbg
gdb bazel-bin/tests/test_scylla
(gdb) r
Starting program: /home/yinghan/.cache/bazel/_bazel_yinghan/50d71f58acbd0cc0439ca7ef46f5648e/execroot/__main__/bazel-out/k8-dbg/bin/storage/main_storage
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5a3b700 (LWP 32356)]
[New Thread 0x7ffff520b700 (LWP 32357)]
[New Thread 0x7ffff4a0a700 (LWP 32358)]
[New Thread 0x7fffeffff700 (LWP 32359)]
[New Thread 0x7fffef7fe700 (LWP 32360)]
[New Thread 0x7fffee9c9700 (LWP 32361)]
Thread 1 "main_storage" received signal SIGSEGV, Segmentation fault.
cass_prepared_free (prepared=0x0) at ./src/prepared.cpp:29
29 ./src/prepared.cpp: No such file or directory.
(gdb) bt
#0 cass_prepared_free (prepared=0x0) at ./src/prepared.cpp:29
#1 0x0000555555558506 in insert_transaction_into_edgeTable (session=0x5555555b9e70, transaction=0x7fffffffdb40, trans_num=6)
at storage/scylla_api.c:373
#2 0x00005555555576c8 in main () at storage/scylla_main.c:43
(gdb) p cass_prepared_free
$1 = {void (const CassPrepared *)} 0x7ffff7143970 <cass_prepared_free(CassPrepared const*)>
(gdb) info symbol 0x7ffff7143970
cass_prepared_free in section .text of /usr/lib/x86_64-linux-gnu/libcassandra.so.2
lookup shared library
LD_DEBUG=libs bazel-bin/tests/test_scylla
calling init: /usr/lib/x86_64-linux-gnu/libcassandra.so.2
lookup symbol
nm -D /usr/lib/x86_64-linux-gnu/libcassandra.so.2
0000000000151ae0 T cass_prepared_bind
0000000000151970 T cass_prepared_free
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Do you want to remove this version name and description?
Syncing