My Oracle Support Banner

Spinning dbms_xmlQuery.newcontext (Doc ID 1286954.1)

Last updated on FEBRUARY 19, 2019

Applies to:

Oracle XML SQL Utility (XSU) - Version to [Release 11.1 to 11.2]
Information in this document applies to any platform.
***Checked for relevance on 22-Jan-2013***


An application that calls DBMS_XMLQUERY.NEWCONTEXT spins and never completes.

Below is a simple PL/SQL block that reproduces the issue

connect user/password
set echo on
set serveroutput on;
set timing on;

  p_query VARCHAR2(1000);
  l_ctx DBMS_XMLQUERY.ctxtype;

  dbms_output.put_line('Start of DBMS_XMLQUERY -- select 1 from dual');
  p_query := 'SELECT 1 FROM DUAL ORDER BY 1';

  l_ctx := DBMS_XMLQUERY.newcontext(p_query);
  dbms_output.put_line('End of DBMS_XMLQUERY -- select 1 from dual');


The spinning process's short_stack shows

SQL> oradebug setospid <OSPID>
Oracle pid: 32, Unix process pid: 18324, image: (TNS V1-V3)
SQL> oradebug short_stack

A pstack of the same process shows

$ pstack <pid>
#0 0x0000000002dcb628 in joevm_invokevirtual ()
#1 0x0000000003113b7f in joe_run_vm ()
#2 0x0000000002db88dc in joe_run ()
#3 0x0000000002dd4a30 in joe_init_class ()
#4 0x0000000002dc5d37 in joe_getstatic ()
#5 0x00000000031102f6 in joe_run_vm ()
#6 0x0000000002db88dc in joe_run ()
#7 0x0000000002dd4a30 in joe_init_class ()
#8 0x0000000002dca147 in joevm_first_time_setup ()
#9 0x0000000002dccb77 in joevm_invokerecursive ()
#10 0x00000000031119d2 in joe_run_vm ()
#11 0x0000000002db88dc in joe_run ()
#12 0x0000000002dbbfb1 in joe_invoke ()
#13 0x0000000002de2014 in joet_aux_thread_main ()
#14 0x0000000002ce4658 in seoa_note_stack_outside ()
#15 0x0000000002de18ec in joet_thread_main ()
#16 0x0000000002ed1291 in sjontlo_initialize ()
#17 0x0000000002dba0a5 in joe_enter_vm ()
#18 0x0000000002ddb788 in ioei_call_java ()
#19 0x0000000002caef31 in ioesub_CALL_JAVA ()
#20 0x0000000002ce4658 in seoa_note_stack_outside ()
#21 0x0000000002caecae in ioe_call_java ()
#22 0x0000000006f51ecc in jox_invoke_java_ ()
#23 0x0000000004807b5f in jox_invoke_java ()
#24 0x00000000048072dc in kkxmjexe ()


The database was migrated from a 32-bit server to a 64-bit server.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.