Bugs item #2864991, was opened at 2009-09-23 14:57 Message generated for change (Comment added) made by stmane You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2864991&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: PF general Group: Pathfinder "stable" Status: Open Resolution: None Priority: 5 Private: No Submitted By: Axel Belinfante (axelbel) Assigned to: Nobody/Anonymous (nobody) Summary: monetbd crash Initial Comment: MonetDB craashes after the following sequence of commands: echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/local/dbguest/ECV/xrpc/export/ecv.xq"; ecv:get-active-views("view-defs.xml")' | mclient -lx -p51012 echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/local/dbguest/ECV/xrpc/export/ecv.xq"; ecv:save-view("view-defs.xml", "feenstra", "axel", <view now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select allany="" inex="exclude"><cond cmp="contains" field="creators_family">feenstra</cond></select></view>)' | mclient -lx -p 51012 echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/local/dbguest/ECV/xrpc/export/ecv.xq"; ecv:get-active-views("view-defs.xml")' | mclient -lx -p51012 where the database is started as $MONET_PREFIX/bin/Mserver --config=$demodir/MonetDB.conf --set monet_daemon=yes \ --set mapi_port=51012 --set xrpc_port=51013 \ --dbinit="module(mapi);module(pathfinder);module(pftijah); xrpc_trusted.delete(); mil_start();" \ --dbname $FARM start-mxq.mil and start-mxq.mil contains: shred_doc("/local/dbguest/ECV/preload/updatable/view-defs.xml","view-defs.xml","ECVsave",lng(10)); I attach view-defs.xml and ecv.xq this is on linux: Linux ewi865 2.6.16.21-0.8-smp #1 SMP Mon Jul 3 18:25:39 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux a gdb stack trace follows below. (gdb) run --config=/local/dbguest/ECV/MonetDB.conf --set monet_daemon=yes --set mapi_port=51012 --set xrpc_port=51013 --dbinit="module(mapi);module(pathfinder);module(pftijah); xrpc_trusted.delete(); mil_start();" --dbname demo start-mxq.mil Starting program: /local/dbguest/Install/MonetDB-XQuery_Aug2009/bin/Mserver --config=/local/dbguest/ECV/MonetDB.conf --set monet_daemon=yes --set mapi_port=51012 --set xrpc_port=51013 --dbinit="module(mapi);module(pathfinder);module(pftijah); xrpc_trusted.delete(); mil_start();" --dbname demo start-mxq.mil [Thread debugging using libthread_db enabled] [New Thread 47689001507792 (LWP 8600)] [New Thread 1075841344 (LWP 8607)] # MonetDB Server v4.32.1 # based on GDK v1.32.1 # Copyright (c) 1993-July 2008, CWI. All rights reserved. # Copyright (c) August 2008-2009, MonetDB B.V.. All rights reserved. # Compiled for x86_64-suse-linux/64bit with 32bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. [New Thread 1077942592 (LWP 8608)] # PF/Tijah module v0.13.0 loaded. http://dbappl.cs.utwente.nl/pftijah # MonetDB/XQuery module v0.28.3 loaded (default back-end is 'algebra') # XRPC administrative console at http://127.0.0.1:51013/admin [New Thread 1080043840 (LWP 8609)] [New Thread 1082145088 (LWP 8610)] # DB group ECV demo server (Aug2009) started. !ERROR: shred_doc: document eprints-dummy.xml already exists in collection ECV (1 such errors)! [New Thread 1084246336 (LWP 8612)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1084246336 (LWP 8612)] 0x00002b5f744fddae in interpret_assignment (stk=2287, lt=0x17e8cf8, res=0x409fecf0) at monet_interpreter.mx:1842 1842 ATOMunfix(oldvalue.vtype, VALptr(&oldvalue)); (gdb) bt #0 0x00002b5f744fddae in interpret_assignment (stk=2287, lt=0x17e8cf8, res=0x409fecf0) at monet_interpreter.mx:1842 #1 0x00002b5f744f0fac in interpret (stk=2287, lt=0x17e8cf8, res=0x409fecf0) at monet_interpreter.mx:725 #2 0x00002b5f744fdf4e in interpret_seqblock (stk=2287, lt=0x17f1cc8, res=0x409fecf0, scope=0) at monet_interpreter.mx:1877 #3 0x00002b5f744f103d in interpret (stk=2287, lt=0x17f1cc8, res=0x409fecf0) at monet_interpreter.mx:732 #4 0x00002b5f744fdf4e in interpret_seqblock (stk=2287, lt=0x17f1c90, res=0x409fecf0, scope=1) at monet_interpreter.mx:1877 #5 0x00002b5f744f103d in interpret (stk=1050, lt=0x17f1c90, res=0x409fecf0) at monet_interpreter.mx:732 #6 0x00002b5f744fdf4e in interpret_seqblock (stk=1050, lt=0x1802dd8, res=0x409fecf0, scope=0) at monet_interpreter.mx:1877 #7 0x00002b5f744f103d in interpret (stk=1050, lt=0x1802dd8, res=0x409fecf0) at monet_interpreter.mx:732 #8 0x00002aaaadb886a5 in xquery_tree_exec (ctx=0x10357d8, t=0x1802dd8, repeat=1) at pathfinder.mx:4525 #9 0x00002aaaadb8bbba in xquery_function_call (ctx=0x10357d8, usec=28412951, ns=0x13a93bc "ecv", module=0x40a037d0 "http://www.cs.utwente.nl/~belinfan/ecv", method=0x13a93c0 "get-active-views", seqnr=0x0, qid=0x2aaaadd6504b "", caller=0x2aaaadd6504b "", timeout=0, mode=0x2aaaadd6504b "", argc=1, itercnt=1, argcnt=0x40a033c8, argtpe=0x40a03330, argval=0x40a03130, shredBAT=0x0) at pathfinder.mx:5147 #10 0x00002aaaadb8f540 in xquery_prepare (ctx=0x10357d8, usec=28412951, query=0x13a9349 "import module namespace ecv = \"http://www.cs.utwente.nl/~belinfan/ecv\" at \"/local/dbguest/ECV/xrpc/export/ecv.xq\"; ecv") at pathfinder.mx:6032 #11 0x00002aaaadb8fc89 in xquery_client_engine (mc=0x2aaaac501f88) at pathfinder.mx:6220 #12 0x00002aaaac3fe291 in mapi_client_engine (FC=0x2aaaac501f88) at mapi.mx:497 #13 0x00002b5f75770193 in start_thread () from /lib64/libpthread.so.0 #14 0x00002b5f75e7745d in clone () from /lib64/libc.so.6 #15 0x0000000000000000 in ?? () ---------------------------------------------------------------------- >Comment By: Stefan Manegold (stmane) Date: 2009-09-24 15:33 Message: I can reproduce the problem as follows: in shell 1: $ gdb --args Mserver --dbinit="module(pathfinder); mil_start();" --dbname ECV /tmp/start-mxq.mil GNU gdb Fedora (6.8-32.fc10) Copyright (C) 2008 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-redhat-linux-gnu"... (gdb) r Starting program: /net/rig.ins.cwi.nl/export/scratch0/manegold/Monet/Testing/Stable/prefix.--enable-strict_--disable-optimize_--enable-debug_--enable-assert/bin/Mserver --dbinit=module\(pathfinder\)\;\ mil_start\(\)\; --dbname ECV /tmp/start-mxq.mil [Thread debugging using libthread_db enabled] [New Thread 0x7ffff56df7b0 (LWP 22629)] [New Thread 0x7fffeb1f9950 (LWP 22682)] # MonetDB Server v4.32.1 # based on GDK v1.32.1 # Copyright (c) 1993-July 2008, CWI. All rights reserved. # Copyright (c) August 2008-2009, MonetDB B.V.. All rights reserved. # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs; dynamically linked. # Visit http://monetdb.cwi.nl/ for further information. # PF/Tijah module v0.13.0 loaded. http://dbappl.cs.utwente.nl/pftijah [New Thread 0x7fffe6377950 (LWP 22686)] # MonetDB/XQuery module v0.28.3 loaded (default back-end is 'algebra') # XRPC administrative console at http://127.0.0.1:50001/admin [New Thread 0x7fffe6176950 (LWP 22687)] [New Thread 0x7fffe5f75950 (LWP 22688)] # DB group ECV demo server (Aug2009) started. # shredding with holes: pagesize=16384, #fillsize=14746 # Elapsed time = 431us [043us/node] # Shredded 1 XML document (view-defs.xml), total time after commit=0.011s MonetDB>[New Thread 0x7fffe5d74950 (LWP 22706)] [New Thread 0x7fffe5b73950 (LWP 22770)] [Thread 0x7fffe5b73950 (LWP 22770) exited] [New Thread 0x7fffe5972950 (LWP 22776)] [Thread 0x7fffe5972950 (LWP 22776) exited] in shell 2: $ mclient -lx -s'doc("view-defs.xml")' <?xml version="1.0" encoding="utf-8"?> <views> <active> </active> <archive> </archive> </views> $ echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/tmp/ecv.xq"; ecv:get-active-views("view-defs.xml")' | mclient -lx <views/> $ echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/tmp/ecv.xq"; ecv:save-view("view-defs.xml", "feenstra", "axel", <view now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select allany="" inex="exclude"><cond cmp="contains" field="creators_family">feenstra</cond></select></view>)' | mclient -lx $ mclient -lx -s'doc("view-defs.xml")' <?xml version="1.0" encoding="utf-8"?> <views> <active> <view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view></active> <archive> </archive> </views> $ mclient -lx -s'doc("view-defs.xml")/views' <views> <active> <view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view></active> <archive> </archive> </views> $ mclient -lx -s'doc("view-defs.xml")/views/active' <active> <view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view></active> $ mclient -lx -s'doc("view-defs.xml")/views/active/view' <view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view> $ mclient -lx -s'for $v in doc("view-defs.xml")/views/active/view return $v' <view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view> $ mclient -lx -s'<view> { for $v in doc("view-defs.xml")/views/active/view return $v } </view>' <view><view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view></view> $ echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/tmp/ecv.xq"; ecv:get-active-views("view-defs.xml")' | pf | mclient -lmil <?xml version="1.0" encoding="utf-8"?> <XQueryResult><views><view seq="0" now="1253707155.50922" name="feenstra" prevname="untitled" prevseq="0" user="axel"><select inex="exclude" allany=""><cond field="creators_family" cmp="contains">feenstra</cond></select></view></views></XQueryResult> $ echo 'import module namespace ecv = "http://www.cs.utwente.nl/~belinfan/ecv" at "/tmp/ecv.xq"; ecv:get-active-views("view-defs.xml")' | mclient -lx [ Note that the second call of ecv:get-active-views("view-defs.xml") (i.e., after the update query) works fine when piped through `pf | mclient -lmil`, but crashes the server as reported when piped through `mclient -lx` ... ] in shell 1: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe5d74950 (LWP 22706)] 0x00007ffff6bf38aa in interpret_assignment (stk=1057, lt=0x19869d8, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:1842 1842 ATOMunfix(oldvalue.vtype, VALptr(&oldvalue)); Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.5-3.fc10.x86_64 e2fsprogs-libs-1.41.4-6.fc10.x86_64 glibc-2.9-3.x86_64 keyutils-libs-1.2-3.fc9.x86_64 krb5-libs-1.6.3-18.fc10.x86_64 libselinux-2.0.78-1.fc10.x86_64 libxml2-2.7.3-2.fc10.x86_64 openssl-0.9.8g-14.fc10.x86_64 pcre-7.8-1.fc10.x86_64 zlib-1.2.3-18.fc9.x86_64 (gdb) bt #0 0x00007ffff6bf38aa in interpret_assignment (stk=1057, lt=0x19869d8, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:1842 #1 0x00007ffff6be696e in interpret (stk=1057, lt=0x19869d8, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:725 #2 0x00007ffff6bf3a53 in interpret_seqblock (stk=1057, lt=0x1986988, res=0x7fffe5d6ebf0, scope=0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:1877 #3 0x00007ffff6be69ff in interpret (stk=1057, lt=0x1986988, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:732 #4 0x00007ffff6bf3a53 in interpret_seqblock (stk=1057, lt=0x1986950, res=0x7fffe5d6ebf0, scope=1) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:1877 #5 0x00007ffff6be69ff in interpret (stk=1056, lt=0x1986950, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:732 #6 0x00007ffff6bf3a53 in interpret_seqblock (stk=1056, lt=0x1986438, res=0x7fffe5d6ebf0, scope=0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:1877 #7 0x00007ffff6be69ff in interpret (stk=1056, lt=0x1986438, res=0x7fffe5d6ebf0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/monet/monet_interpreter.mx:732 #8 0x00007fffe70f8c5b in xquery_tree_exec (ctx=0x13c0e98, t=0x1986438, repeat=1) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/pathfinder/runtime/pathfinder.mx:4525 #9 0x00007fffe70fbd82 in xquery_function_call (ctx=0x13c0e98, usec=111580345, ns=0x163da32 "ecv", module=0x7fffe5d73670 "http://www.cs.utwente.nl/~belinfan/ecv", method=0x163da36 "get-active-views", seqnr=0x0, qid=0x7fffe72caf2b "", caller=0x7fffe72caf2b "", timeout=0, mode=0x7fffe72caf2b "", argc=1, itercnt=1, argcnt=0x7fffe5d73268, argtpe=0x7fffe5d731d0, argval=0x7fffe5d72fd0, shredBAT=0x0) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/pathfinder/runtime/pathfinder.mx:5147 #10 0x00007fffe70ff665 in xquery_prepare (ctx=0x13c0e98, usec=111580345, query=0x163d9d9 "import module namespace ecv = \"http://www.cs.utwente.nl/~belinfan/ecv\" at \"/tmp/ecv.xq\"; ecv") at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/pathfinder/runtime/pathfinder.mx:6032 #11 0x00007fffe70ffdb0 in xquery_client_engine (mc=0x7fffe707af88) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/pathfinder/runtime/pathfinder.mx:6223 #12 0x00007fffe6e770a6 in mapi_client_engine (FC=0x7fffe707af88) at /ufs/manegold/_/scratch0/Monet/Testing/Stable/source/MonetDB4/src/mapi/mapi.mx:497 #13 0x0000003675e073da in start_thread () from /lib64/libpthread.so.0 #14 0x00000036752e62bd in clone () from /lib64/libc.so.6 (gdb) print oldvalue.vtype $1 = -606348325 (gdb) print oldvalue $2 = {val = {ival = 28879488, oval = 28879488, shval = -21888, btval = -128 '\200', wval = 28879488, cval = "\200��\001", fval = 6.78355807e-38, pval = 0x1b8aa80, Bval = 0x1b8aa80, bval = 28879488, br = {id = 28879488, stamp = 0}, sval = 0x1b8aa80 " ", dval = 1.4268362890284529e-316, lval = 28879488}, len = -606348325, vtype = -606348325} (gdb) print value $3 = (ValRecord *) 0x198aa38 (gdb) print *value $4 = {val = {ival = 62, oval = 140733193388094, shval = 62, btval = 62 '>', wval = 140733193388094, cval = ">\000\000", fval = 8.68805048e-44, pval = 0x7fff0000003e, Bval = 0x7fff0000003e, bval = 62, br = {id = 62, stamp = 32767}, sval = 0x7fff0000003e <Address 0x7fff0000003e out of bounds>, dval = 6.953143608258971e-310, lval = 140733193388094}, len = 0, vtype = 5} (gdb) Apparently, "oldvalue" contains invalid/corrupted data --- I have no idea, yet, why ... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2864991&group_id=56967 ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
