Search code examples
marklogicmarklogic-8

xdmp:document-filter issue in Marklogic 8


I was trying to use xdmp:document-filter to extract meta data from a "pptx" file.. and following is the code I ran in the query console..

xquery version "1.0-ml";
declare namespace html = "http://www.w3.org/1999/xhtml";

let $uri := "/documents/b46682e6b00156d98cb9ba26222c57ab8cbd60f1.pptx"
let $xxx := xdmp:document-filter(fn:doc($uri), ())
return $xxx

And nothing seems to work, and after while displays a message "query console lost connection, and trying to re-establish the connection".. So I looked into the server log files and saw segmentation fault.. following is some of the log file.. Am I doing anything wrong with the way I am trying to extract the metadata.

Segmentation fault in thread 140239321458432 addr 0x10
Thread 224 (Thread 0x7f8ccca01700 (LWP 6307)):
#0  0x00007f8cc8b7d9c0 in sem_wait () from /lib64/libpthread.so.0
#1  0x0000000004081327 in svc::Semaphore::wait(bool) const ()
#2  0x000000000409c22d in svc::StarterThread::run() ()
#3  0x000000000409cf8b in svc::Thread::top() ()
#4  0x000000000409e189 in runThread ()
#5  0x00007f8cc8b77f18 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f8cc7f78b2d in clone () from /lib64/libc.so.6
Thread 223 (Thread 0x7f8ccc9e2700 (LWP 6315)):
#0  0x00007f8cc8b7e9ad in accept () from /lib64/libpthread.so.0
#1  0x000000000408bd75 in svc::Socket::accept(sockaddr_in&) ()
#2  0x0000000003d546cf in xdmp::XDQPServerThread::run() ()
#3  0x000000000409cf8b in svc::Thread::top() ()
#4  0x000000000409e189 in runThread ()
#5  0x00007f8cc8b77f18 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f8cc7f78b2d in clone () from /lib64/libc.so.6
Thread 222 (Thread 0x7f8ccc9c3700 (LWP 6316)):
#0  0x00007f8cc8b7ee6d in nanosleep () from /lib64/libpthread.so.0
#1  0x000000000409bf1b in svc::Thread::sleep(unsigned int) ()
#2  0x000000000242b1c5 in xdmp::ClusterManager::clusterThread() ()
#3  0x000000000409cf8b in svc::Thread::top() ()
#4  0x000000000409e189 in runThread ()
#5  0x00007f8cc8b77f18 in start_thread () from /lib64/libpthread.so.0
#6  0x00007f8cc7f78b2d in clone () from /lib64/libc.so.6

Solution

  • I am able to reproduce this issue in ML 8.0-4.2 as well.

    It worked well when I changed the query to xdmp:document-filter(fn:doc($uri))