pmwkaa / sophia

Modern transactional key-value/row storage library.
http://sophia.systems
Other
1.86k stars 154 forks source link

crash with multiple threads #54

Open hyc opened 10 years ago

hyc commented 10 years ago

Same software as #53

violino:/home/software/leveldb> ./db_bench_sophia --benchmarks=fillseqbatch Sophia: version 1.1 Date: Wed Jun 25 08:36:57 2014 CPU: 4 * Intel(R) Core(TM)2 Extreme CPU Q9300 @ 2.53GHz CPUCache: 6144 KB Keys: 16 bytes each Values: 100 bytes each (50 bytes after compression) Entries: 1000000 RawSize: 110.6 MB (estimated) FileSize: 62.9 MB (estimated) WARNING: Optimization is disabled: benchmarks unnecessarily slow

WARNING: Assertions are enabled; benchmarks unnecessarily slow

fillseqbatch : 2.285 micros/op 437600 ops/sec; 48.4 MB/s 130992 /tmp/test1/dbbench_sph-1 130992 /tmp/test1 violino:/home/software/leveldb> gdb --args ./db_bench_sophia --benchmarks=readwhilewriting --use_existing_db=1 --threads=4 GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/software/leveldb/db_bench_sophia...done. (gdb) run Starting program: /home/software/leveldb/db_bench_sophia --benchmarks=readwhilewriting --use_existing_db=1 --threads=4 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Sophia: version 1.1 Date: Wed Jun 25 08:37:15 2014 CPU: 4 * Intel(R) Core(TM)2 Extreme CPU Q9300 @ 2.53GHz CPUCache: 6144 KB Keys: 16 bytes each Values: 100 bytes each (50 bytes after compression) Entries: 1000000 RawSize: 110.6 MB (estimated) FileSize: 62.9 MB (estimated) WARNING: Optimization is disabled: benchmarks unnecessarily slow

WARNING: Assertions are enabled; benchmarks unnecessarily slow

[New Thread 0x7fffefb74700 (LWP 16237)] [New Thread 0x7fffef373700 (LWP 16238)] [New Thread 0x7fffeeb72700 (LWP 16239)] [New Thread 0x7fffee371700 (LWP 16240)] [New Thread 0x7fffedb70700 (LWP 16241)] [New Thread 0x7fffed36f700 (LWP 16242)] ... finished 100 ops
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffee371700 (LWP 16240)] 0x00000000004195f0 in sp_iminof (i=0x629200, p=0x7fffe0000980, rkey=0x7fffee370d40 "0000000000632053", size=16, idx=0x7fffee370b70) at i.c:103 103 p->i[mid]->size, rkey, size, i->cmparg); (gdb) info thr Id Target Id Frame 7 Thread 0x7fffed36f700 (LWP 16242) "db_bench_sophia" 0x00007ffff70978dd in nanosleep () at ../sysdeps/unix/syscall-template.S:81 6 Thread 0x7fffedb70700 (LWP 16241) "db_bench_sophia" 0x000000000041ab0d in cmpkey ( c=0x629248, p=0x1421070, rkey=0x7fffedb6fd40, size=16) at cat.c:116

Thread 7 (Thread 0x7fffed36f700 (LWP 16242)):

0 0x00007ffff70978dd in nanosleep () at ../sysdeps/unix/syscall-template.S:81

1 0x00007ffff70c9524 in usleep (useconds=)

at ../sysdeps/unix/sysv/linux/usleep.c:32

2 0x00000000004157c9 in sp_lock (l=0x62d346 "") at ./lock.h:41

3 0x00000000004174d5 in sp_match (s=0x629130, k=0x7fffed36ed40, ksize=16, v=0x7fffed36ece8,

vsize=0x7fffed36ecf0) at cursor.c:497

4 0x0000000000410091 in sp_get (o=0x629130, k=0x7fffed36ed40, ksize=16, v=0x7fffed36ece8,

vsize=0x7fffed36ecf0) at sp.c:720

5 0x0000000000404eba in leveldb::Benchmark::ReadRandom (this=0x7fffffffe4a0, thread=0x142ec80)

at doc/bench/db_bench_sophia.cc:835

6 0x0000000000404fd5 in leveldb::Benchmark::ReadWhileWriting (this=0x7fffffffe4a0,

thread=0x142ec80) at doc/bench/db_bench_sophia.cc:849

7 0x00000000004078bc in leveldb::Benchmark::ThreadBody (v=0x635850)

at doc/bench/db_bench_sophia.cc:657

8 0x0000000000407eca in leveldb::(anonymous namespace)::StartThreadWrapper(void*) ()

9 0x00007ffff73a6f8e in start_thread (arg=0x7fffed36f700) at pthread_create.c:311

10 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 6 (Thread 0x7fffedb70700 (LWP 16241)):

0 0x000000000041ab0d in cmpkey (c=0x629248, p=0x1421070, rkey=0x7fffedb6fd40, size=16)

at cat.c:116

1 0x000000000041abda in sp_catfind (c=0x629248, rkey=0x7fffedb6fd40 "0000000000467841", size=16,

index=0x7fffedb6fc24) at cat.c:135

2 0x00000000004175dc in sp_match (s=0x629130, k=0x7fffedb6fd40, ksize=16, v=0x7fffedb6fce8,

vsize=0x7fffedb6fcf0) at cursor.c:517

3 0x0000000000410091 in sp_get (o=0x629130, k=0x7fffedb6fd40, ksize=16, v=0x7fffedb6fce8,

---Type to continue, or q to quit--- vsize=0x7fffedb6fcf0) at sp.c:720

4 0x0000000000404eba in leveldb::Benchmark::ReadRandom (this=0x7fffffffe4a0, thread=0x636c60)

at doc/bench/db_bench_sophia.cc:835

5 0x0000000000404fd5 in leveldb::Benchmark::ReadWhileWriting (this=0x7fffffffe4a0,

thread=0x636c60) at doc/bench/db_bench_sophia.cc:849

6 0x00000000004078bc in leveldb::Benchmark::ThreadBody (v=0x635828)

at doc/bench/db_bench_sophia.cc:657

7 0x0000000000407eca in leveldb::(anonymous namespace)::StartThreadWrapper(void*) ()

8 0x00007ffff73a6f8e in start_thread (arg=0x7fffedb70700) at pthread_create.c:311

9 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 5 (Thread 0x7fffee371700 (LWP 16240)):

0 0x00000000004195f0 in sp_iminof (i=0x629200, p=0x7fffe0000980,

rkey=0x7fffee370d40 "0000000000632053", size=16, idx=0x7fffee370b70) at i.c:103

1 0x000000000041a028 in sp_igetraw (i=0x629200, rkey=0x7fffee370d40 "0000000000632053", size=16)

at i.c:291

2 0x0000000000417368 in sp_matchi (s=0x629130, i=0x629200, key=0x7fffee370d40, size=16,

v=0x7fffee370ce8, vsize=0x7fffee370cf0) at cursor.c:467

3 0x00000000004174ac in sp_match (s=0x629130, k=0x7fffee370d40, ksize=16, v=0x7fffee370ce8,

vsize=0x7fffee370cf0) at cursor.c:492

4 0x0000000000410091 in sp_get (o=0x629130, k=0x7fffee370d40, ksize=16, v=0x7fffee370ce8,

vsize=0x7fffee370cf0) at sp.c:720

5 0x0000000000404eba in leveldb::Benchmark::ReadRandom (this=0x7fffffffe4a0, thread=0x6365c0)

at doc/bench/db_bench_sophia.cc:835

6 0x0000000000404fd5 in leveldb::Benchmark::ReadWhileWriting (this=0x7fffffffe4a0,

thread=0x6365c0) at doc/bench/db_bench_sophia.cc:849

7 0x00000000004078bc in leveldb::Benchmark::ThreadBody (v=0x635800)

at doc/bench/db_bench_sophia.cc:657

---Type to continue, or q to quit---

8 0x0000000000407eca in leveldb::(anonymous namespace)::StartThreadWrapper(void*) ()

9 0x00007ffff73a6f8e in start_thread (arg=0x7fffee371700) at pthread_create.c:311

10 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 4 (Thread 0x7fffeeb72700 (LWP 16239)):

0 0x00007ffff70978dd in nanosleep () at ../sysdeps/unix/syscall-template.S:81

1 0x00007ffff70c9524 in usleep (useconds=)

at ../sysdeps/unix/sysv/linux/usleep.c:32

2 0x00000000004157c9 in sp_lock (l=0x62d346 "") at ./lock.h:41

3 0x00000000004174d5 in sp_match (s=0x629130, k=0x7fffeeb71d40, ksize=16, v=0x7fffeeb71ce8,

vsize=0x7fffeeb71cf0) at cursor.c:497

4 0x0000000000410091 in sp_get (o=0x629130, k=0x7fffeeb71d40, ksize=16, v=0x7fffeeb71ce8,

vsize=0x7fffeeb71cf0) at sp.c:720

5 0x0000000000404eba in leveldb::Benchmark::ReadRandom (this=0x7fffffffe4a0, thread=0x635f20)

at doc/bench/db_bench_sophia.cc:835

6 0x0000000000404fd5 in leveldb::Benchmark::ReadWhileWriting (this=0x7fffffffe4a0,

thread=0x635f20) at doc/bench/db_bench_sophia.cc:849

7 0x00000000004078bc in leveldb::Benchmark::ThreadBody (v=0x6357d8)

at doc/bench/db_bench_sophia.cc:657

8 0x0000000000407eca in leveldb::(anonymous namespace)::StartThreadWrapper(void*) ()

9 0x00007ffff73a6f8e in start_thread (arg=0x7fffeeb72700) at pthread_create.c:311

10 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 3 (Thread 0x7fffef373700 (LWP 16238)):

0 0x00007ffff70978dd in nanosleep () at ../sysdeps/unix/syscall-template.S:81

1 0x00007ffff70c9524 in usleep (useconds=)

at ../sysdeps/unix/sysv/linux/usleep.c:32

2 0x000000000040c9f3 in sp_lock (l=0x62d346 "") at ./lock.h:41

---Type to continue, or q to quit---

3 0x000000000040f341 in sp_commit (o=0x629130) at sp.c:489

4 0x00000000004053b5 in leveldb::Benchmark::BGWriter (this=0x7fffffffe4a0, thread=0x635880)

at doc/bench/db_bench_sophia.cc:903

5 0x0000000000404fea in leveldb::Benchmark::ReadWhileWriting (this=0x7fffffffe4a0,

thread=0x635880) at doc/bench/db_bench_sophia.cc:851

6 0x00000000004078bc in leveldb::Benchmark::ThreadBody (v=0x6357b0)

at doc/bench/db_bench_sophia.cc:657

7 0x0000000000407eca in leveldb::(anonymous namespace)::StartThreadWrapper(void*) ()

8 0x00007ffff73a6f8e in start_thread (arg=0x7fffef373700) at pthread_create.c:311

9 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 2 (Thread 0x7fffefb74700 (LWP 16237)):

0 pthread_cond_wait@@GLIBC_2.3.2 ()

at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

1 0x000000000040d599 in sp_taskwait (t=0x62d280) at ./task.h:58

2 0x000000000040e8f6 in merger (arg=0x62d280) at sp.c:287

3 0x00007ffff73a6f8e in start_thread (arg=0x7fffefb74700) at pthread_create.c:311

4 0x00007ffff70d0a0d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113

Thread 1 (Thread 0x7ffff7fc6740 (LWP 16231)):

0 pthread_cond_wait@@GLIBC_2.3.2 ()

at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185

1 0x000000000040bf0d in leveldb::port::CondVar::Wait() ()

2 0x0000000000404648 in leveldb::Benchmark::RunBenchmark (this=0x7fffffffe4a0, n=5, name=...,

method=
(void (leveldb::Benchmark::*)(leveldb::Benchmark * const, leveldb::(anonymous namespace)::ThreadState *)) 0x404fa8 <leveldb::Benchmark::ReadWhileWriting(leveldb::(anonymous namespace)::ThreadState*)>) at doc/bench/db_bench_sophia.cc:695

---Type to continue, or q to quit---

3 0x0000000000407653 in leveldb::Benchmark::Run (this=0x7fffffffe4a0)

at doc/bench/db_bench_sophia.cc:621

4 0x0000000000405b15 in main (argc=4, argv=0x7fffffffe5c8) at doc/bench/db_bench_sophia.cc:982

(gdb)

pmwkaa commented 10 years ago

Hi, just to make sure. Sophia v1.1 does not support multi-thread access. This feature will be available in the next release, sorry.

Can this problem be the cause of gh-53 too?

hyc commented 10 years ago

On Wed, Jun 25, 2014 at 10:40:33AM -0700, Dmitry Simonenko wrote:

Hi, just to make sure. Sophia v1.1 does not support multi-thread access. This feature will be available in the next release, sorry.

Can this problem be the cause of gh-53 too? No, gh-53 is single-threaded.


Reply to this email directly or view it on GitHub: https://github.com/pmwkaa/sophia/issues/54#issuecomment-47134237