Closed ramorrismorris closed 12 years ago
The recommended way to stop RedStore is to send it a INT or a TERM signal. It catches both of these and should then shut down cleanly.
Could you send me a stack trace from gdb to see where it is going wrong?
This is the behavior from the shell when the redstore is sent SIGINT from another shell. It's conceivable that the segfault announcement is bogus...
ram@milne:/usr/local/bin/redstore -s hashes -t "hash-type='bdb',dir='.'" redstore.db [INFO] Mon Dec 19 16:21:14 2011 Storage name: redstore.db [INFO] Mon Dec 19 16:21:14 2011 Storage type: hashes [INFO] Mon Dec 19 16:21:14 2011 Storage options: write='yes', hash-type='bdb', dir='.', contexts='yes' [INFO] Mon Dec 19 16:21:14 2011 Starting HTTP server on port 8080 [INFO] Mon Dec 19 16:21:51 2011 Got termination signal. Segmentation fault
As to gdb:
The last time I used gdb was around 1989, so I hope this is right and helpful. At the point the gdb claims to have received SIGTERM I had issued kill SIGINT 3907 from another shell, to the child redstore process 3907 of the gdb.
ram@milne:gdb --args /usr/local/bin/redstore -s hashes -t "hash-type='bdb',dir='.'" redstore.db GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2 Copyright (C) 2010 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 "i686-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/local/bin/redstore...done. (gdb) run Starting program: /usr/local/bin/redstore -s hashes -t hash-type=\'bdb\',dir=\'.\' redstore.db [Thread debugging using libthread_db enabled] [INFO] Mon Dec 19 16:08:32 2011 Storage name: redstore.db [INFO] Mon Dec 19 16:08:32 2011 Storage type: hashes [INFO] Mon Dec 19 16:08:32 2011 Storage options: write='yes', hash-type='bdb', dir='.', contexts='yes' [INFO] Mon Dec 19 16:08:32 2011 Starting HTTP server on port 8080
Program received signal SIGTERM, Terminated. 0xb7fe1424 in __kernel_vsyscall () (gdb) backtrace
at redstore.c:418
(gdb) continue Continuing. [INFO] Mon Dec 19 16:09:40 2011 Got termination signal.
Program received signal SIGSEGV, Segmentation fault. 0xdbdbdbdb in ?? () (gdb) backtrace
at rdf_hash_bdb.c:297
at rdf_storage_hashes.c:576
at rdf_model_storage.c:136
at redstore.c:432
(gdb)
FWIW, although the [INFO] output of redstore would normally be reassuring, the segfault, if real, makes one worry whether the database is closed properly in all possible scenarios.
Problem re-produced and fixed in 6d242ab67f697a3d31e0fc5aae4f6d9c12c7a880
In ubuntu linix 11.04 and 11.10, catchable kill signals seem to cause a segmentation fault.
What is the recommended way to stop a running redstore?
RedStore/0.5.4 librdf/1.0.15 raptor/2.0.6 rasqal/0.9.28