[elephant-devel] Elephant/BDB problems on recent 64-bit Linux systems
Petter Gustad
elephant at gustad.com
Thu Dec 16 06:30:07 UTC 2010
Hi,
I'm experiencing problems when I try to run Elephant with the Berkeley
DB backend on certain recent 64-bit Gentoo systems. I've enclosed a
sample script which will download and build SBCL, Elephant, and then
run a small test.
System A: Core-2 Duo somewhat older Gentoo.
/usr/bin/db4.7_deadlock -V
Berkeley DB 4.7.25: (2010-08-25)
gcc 4.1.2
System B: Core-2 Duo recent Gentoo installation
/usr/bin/db4.7_deadlock -V
Berkeley DB 4.7.25: (2010-11-18)
gcc 4.4.4
System C: Atom recent Gentoo installation
/usr/bin/db4.7_deadlock -V
Berkeley DB 4.7.25: (2010-11-18)
gcc 4.4.4
System D: Core-2 Quad Gentoo (somewhere between A and B)
/usr/bin/db4.7_deadlock -V
Berkeley DB 4.7.25: (2010-12-14)
gcc 4.3.2
A: OK (*** GOT KEY ("Zappa rules!") IN SECOND INVOCATION)
B: Unhandled memory fault at #x7D0.
C: Unhandled memory fault at #x7D0.
D: *** GOT KEY ("Zappa rules!") IN SECOND INVOCATION
Then B gcc was downgraded to 4.1.2. The Berkeley db was then
recompiled, all .fasl files were deleted, and the result was still:
Unhandled memory fault at #x7D0.
This occurs at:
(open-store cl-user::+ele-storage+)
I'm also getting a similar failure with Clojoure so I don't think it's
releated to SBCL.
Have anybody else experienced these kinds of problems, or have any
clues as what the problem might be?
//Petter
P.S. The script will install QuickLisp if it's not installed
-------------- next part --------------
#!/bin/sh
# http://prdownloads.sourceforge.net/sbcl/sbcl-1.0.44-x86-64-linux-binary.tar.bz2
# http://prdownloads.sourceforge.net/sbcl/sbcl-1.0.44-x86-linux-binary.tar.bz2
# http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.44/sbcl-1.0.44-source.tar.bz2
unset SBCL_HOME
unset SBCL_SOURCE_ROOT
unset CDPATH
LC_CTYPE=en_US.UTF-8
export LC_CTYPE
TARGET_DIR=/tmp/ele-test-dir
mkdir -p ${TARGET_DIR}
cd ${TARGET_DIR}
wget http://prdownloads.sourceforge.net/sbcl/sbcl-1.0.44-x86-64-linux-binary.tar.bz2
tar xvfj sbcl-1.0.44-x86-64-linux-binary.tar.bz2
wget http://downloads.sourceforge.net/project/sbcl/sbcl/1.0.44/sbcl-1.0.44-source.tar.bz2
tar xvfj sbcl-1.0.44-source.tar.bz2
mkdir root
cd sbcl-1.0.44
OLD_PATH="$PATH"
PATH=${TARGET_DIR}/sbcl-1.0.44-x86-64-linux/src/runtime:$PATH
export PATH
SBCL_HOME=${TARGET_DIR}/sbcl-1.0.44-x86-64-linux/output
export SBCL_HOME
sh make.sh --prefix=${TARGET_DIR}/root
unset SBCL_HOME
INSTALL_ROOT=${TARGET_DIR}/root sh install.sh
PATH=${TARGET_DIR}/root/bin:${OLD_PATH}
export PATH
cd ${TARGET_DIR}
darcs get http://www.common-lisp.net/project/elephant/darcs/elephant-1.0
cat > elephant-1.0/my-config.sexp <<EOF
#+(and (or sbcl allegro openmcl lispworks) (not (or mswindows windows)) (not (or macosx darwin)))
((:compiler . :gcc)
(:berkeley-db-version . "4.7")
(:berkeley-db-include-dir . "/usr/include/")
(:berkeley-db-lib-dir . "/usr/lib/")
(:berkeley-db-lib . "/usr/lib/libdb-4.7.so")
(:berkeley-db-deadlock . "/usr/bin/db4.7_deadlock")
(:berkeley-db-cachesize . 20971520)
(:berkeley-db-map-degree2 . t)
(:clsql-lib-paths . nil)
(:prebuilt-libraries . nil))
EOF
echo "(defconstant +ele-storage+ '(:BDB \"${TARGET_DIR}/ele-storage\"))" > store-name.lisp
mkdir ele-storage
if test ! -e $HOME/quicklisp/setup.lisp
then
wget http://quickstart.quicklisp.org/quicklisp.lisp
sbcl --no-userinit --no-sysinit --load quicklisp.lisp \
--eval '(quicklisp-quickstart:install")' \
--eval '(sb-ext:quit)'
fi
sbcl --no-userinit --no-sysinit --load $HOME/quicklisp/setup.lisp --load store-name.lisp <<EOF
(in-package #:cl-user)
(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(ql:quickload "bordeaux-threads")
(ql:quickload "cl-base64")
(ql:quickload "uffi")
(push (make-pathname :directory '(:relative "elephant-1.0")) asdf:*central-registry*)
(asdf:oos 'asdf:load-op :elephant)
(in-package :elephant)
(open-store cl-user::+ele-storage+)
(add-to-root "somekey" "Zappa rules!")
(when (equal (get-from-root "somekey") "Zappa rules!")
(format t "*** GOT KEY (~s) AFTER IT WAS WRITTEN~%" (get-from-root "somekey")))
(sb-ext:quit)
EOF
sbcl --no-userinit --no-sysinit --load $HOME/quicklisp/setup.lisp --load store-name.lisp <<EOF
(in-package #:cl-user)
(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(ql:quickload "bordeaux-threads")
(ql:quickload "cl-base64")
(ql:quickload "uffi")
(push (make-pathname :directory '(:relative "elephant-1.0")) asdf:*central-registry*)
(asdf:oos 'asdf:load-op :elephant)
(in-package :elephant)
(open-store cl-user::+ele-storage+)
(when (equal (get-from-root "somekey") "Zappa rules!")
(format t "*** GOT KEY (~s) IN SECOND INVOCATION~%" (get-from-root "somekey")))
(sb-ext:quit)
EOF
More information about the elephant-devel
mailing list