Procedure crashes and closes with ORA-04021: timeout period exceeded while waiting for

Hello

I am facing a problem in which calling a procedure in a package hangs in "EXECUTE IMMEDIATE" and after a long time out with ORA-04021: timeout period exceeded while waiting.
I faced the problem in an existing package. Then, I tried a little test and could reproduce the problem.
Test script is:
kallo:DZHLHFC1> cat test.sql

CREATE OR REPLACE PACKAGE BODY timeout_test AS
    PROCEDURE execute_immediate( p_cmd VARCHAR2 );

    PROCEDURE execute_immediate( p_cmd VARCHAR2 ) IS
    BEGIN
        EXECUTE IMMEDIATE p_cmd;
    EXCEPTION
        WHEN OTHERS THEN
            dbms_output.put_line( 'Command failed: '||p_cmd );
            dbms_output.put_line( 'SQL error message is: ' || SQLERRM );
    END;

    PROCEDURE revoke_priv(p_object_name VARCHAR2) IS
        l_cmd VARCHAR2(1000);
    BEGIN
        l_cmd := 'REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"';
        execute_immediate(l_cmd);
    END;

END timeout_test;
/
show err
TIMING START
REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"; -- Check if command is syntactically correct
TIMING SHOW

set serverout on size 100000
TIMING SHOW
exec timeout_test.revoke_priv('TIMEOUT_TEST');
TIMING SHOW
When it is running, I get after release:
Package created.

Package body created.

REVOKE EXECUTE ON timeout_test FROM "CSG_SUPP_LHOWNER_WRITE"
*
ERROR at line 1:
ORA-01927: cannot REVOKE privileges you did not grant

Elapsed: 00:00:00.01
Elapsed: 00:00:00.02
Command failed: REVOKE EXECUTE ON "TIMEOUT_TEST" FROM "CSG_SUPP_LHOWNER_WRITE"
SQL error message is: ORA-04021: timeout occurred while waiting to lock object
LHOWNER.TIMEOUT_TEST

PL/SQL procedure successfully completed.

Elapsed: 00:15:03.03
I did some analysis and conclusions next concluded that it hangs in "EXECUTE IMMEDIATE".
1 TOAD "browser session" shows the current statement for this session as a course of execution with "EXECUTE IMMEDIATE"
2. no lock appear in "browser"->"tab locks session."
3. If I comment "EXECUTE IMMEDIATE", it comes quickly.

Is - this problem with a programming or an oracle bug?

Thank you and best regards,
Hey

Hello

I think I found the reason.
I'm changing the grants on the same package (TIMEOUT_TEST) which I am running.
If I change object_name in order that it works.

Kind regards
Hey

Tags: Database

Similar Questions

  • Patch 9239090 - ORA-04021: timeout period exceeded while waiting to lock object


    Hello guys,.

    I need emergency aid to comlete an upgrade to ebs 12.1.1 to 12.1.3.

    We are to modernize ebs 11i to 12i will live this weekend. We met "ORA-04021: timeout exceeded while waiting to lock object" on patch 9239090 with two workers:

    In adctrl:

    1. run AutoPatch R120 AFUTLGRS.pls failed

    2. run AutoPatch R120 AFUTLOGS.pls failed

    sqlplus s APPS / * @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql

    Connected.

    create or replace package wf_bes_cleanup AUTHID CURRENT_USER as

    *

    ERROR on line 1:

    ORA-04021: timeout period exceeded while waiting to lock object

    I did everything imaginable, but can not get pass these 2 workers failed.

    (1) I checked there is no lock blocking on all objects:

    Select s1.username. '@' || S1.machine

    || ' (SID =' | s1.sid | block him ') '

    || S2. UserName | '@' || S2.machine | ' (SID =' | s2.sid |) ') ' AS blocking_status

    v $ lock l1, v$ session s1, v$ lock l2, s2 of v$ session

    where s1.sid = l1.sid and s2.sid = l2.sid

    and l1. BLOCK = 1 and l2.request > 0

    and l1.id1 = l2.id1

    and l2.id2 = l2.id2;

    (2) I also checked and there is space in the database.

    (3) adctrl, I tried to restart the positions one by one, but the worker 1 crashes at and fails finally on several attempts (12).

    4) the solution on Doc ID 1291064.1 is not the problem:

    SQL > select SUPPLEMENTAL_LOG_DATA_MIN, SUPPLEMENTAL_LOG_DATA_PK, SUPPLEMENTAL_LOG_DATA_UI, FORCE_LOGGING

    database of v$.

    SUP SUP SUBSECTIONS FOR

    -------- --- --- ---

    NO NO NO NO

    (5) enforcement of manual still gives ORA-04021:

    sqlplus s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql

    sqlplus s APPS/apps @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql

    (6) the alerts log has no related errors

    (7) I finally, after more than 6 hours of waiting, I could only get the patch to continue after using the adctrl option 8 to ignore these two workers.

    After the procedure, I struck still more than two errors and now stuck:

    I hit another error with the same patch:

    create or replace package FND_LOG as body

    / * $Header: AFUTLOGB.pls 120...

    AD worker error:

    ORA-04021: timeout period exceeded while waiting to lock object

    Unable to process the file in PACKET mode.

    Do not convert the file for the rights of the appellant because she seems to be a create package body script (based on the name of the file).

    File: /u02/applfinp/apps/apps_st/appl/fnd/12.0.0/patch/115/sql/AFUTLOGB.pls

    *********************************************

    Worker AD WARNING:

    Product data file

    /U02/applfinp/apps/apps_st/appl/Admin/xniprod.txt

    There is no product "number".

    This product is registered in the database, but the file above does not exist in APPL_TOP.  The product will be ignored without error

    **********************************************

    AD worker error:
    The following ORACLE error:

    ORA-04063: package body "APPS. FND_LOG"contains errors
    ORA-06508: PL/SQL: called program unit is not found: 'APPS. FND_LOG ".
    ORA-06512: at the 'APPS '. FND_FUNCTION', line 834
    ORA-06512: at the 'APPS '. FND_MENU_ENTRIES_C_DELTRG', line 4
    ORA-04088: error during execution of trigger ' APPS. FND_MENU_ENTRIES_C_DELTRG'

    Can I stop and restart it patch 9239090 ?

    Solved by running scripts workers failed manually at a later date. :

    sqlplus-s @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p001invok.sql APPS/apps

    sqlplus-s @/u02/applfinp/apps/apps_st/appl/admin/OFPROD/out/p002invok.sql APPS/apps

    Thank you

  • Create the error ORA-04021: timeout period exceeded while waiting to lock object

    Hello

    I get the following error when I try to deploy the mapping.
    Create the error ORA-04021: timeout period exceeded while waiting to lock object.
    I use OWB 10.2.0.4.36

    All the world is facing this problem? Kindly help me in this regard.

    Thank you
    Siva

    Hi Siva,

    It's probably a blocking problem.

    Select "alter system kill session"'"
    || TO_CHAR (l.session_id)
    || ','
    || to_char(s.Serial#)
    || '''; ' kill_session
    o.object_name
    l.oracle_username
    l.os_user_name
    || Chr (10)
    || '('
    || s.Terminal
    || ')' os_user_name
    v $ session s
    , v$ locked_object l
    dba_objects o
    where s.sid = l.session_id
    and l.object_id = o.object_id
    /

    The above should give you the session id

    Then use SYSTEM account to kill the session
    alter system kill session "";

    Thank you
    Fati

  • ORA-04021: timeout period exceeded while waiting to lock object

    Hello

    DB 10.2.0.4

    trying to compile a package get anything below error every time, there is no blocking.

    ORA-04021: timeout period exceeded while waiting to lock object

    Thank you

    The package was in use. There are two ways to find the person who uses a package at a given time.

    You can join v$ session to dba_ddl_locks or you can use v$ acess but you can see who is running the package. The code cannot be recompiled, while the code is running.

    HTH - Mark D Powell.

  • A timeout occurred while waiting for the host controller EHCI interrupt on answer Async ahead Bell.

    Whenever I put my adapter wireless netgear n150 under heavy load (download of World of Warcraft for example), it will go down to connection and until I restart the computer the adapter usb port is useless.  I dug into the event viewer and found that a timeout occurred while waiting for the EHCI host controller interrupt on the asynchronous response advance doorbell, source usbehci.  This seems to have been a problem with windows 8 I found other threads referencing but I can say that they are pre-release and some actually work solutions have been validated.  I already assured that all drivers, firmware and chipsets are up-to-date and compatible.  ANYONE please help?

    Quick fix I found:

    -try falling back to WiFi G rather than use N
    In my case, it works... is no longer a fall. But not the same bandwidth...
  • My computer crashes and restarts with windows xp but it does not occur with any other OS

    When I use windows XP, 2000, ME, 98 in my computer (Dell latitude D600) it crashes and restarts all of a sudden. But when I installed winodws vista, 7 or ubuntu it will never happen. I thought that the problem could be drivers, so I ran my computer only with windows XP, without installing any driver, but it happens again. I already send my computer to dell and they changed everything in the computer, but I still get the error. What can I do to identify and solve the problem?

    Hello cocodrilo,.

    Thank you for visiting the website of Microsoft Windows Vista Community. The question you have posted is related to Windows XP, 2000, ME, 98 multiboot and would be better suited to the TechNet community. Please visit the link below to find a community that will provide the support you want.

    http://social.technet.Microsoft.com/forums/en/categories/

    Thank you

    Jack

    Jack
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • CC crashes and closes at least once a day (usually several times) and I have to reinstall every time.

    Mac OS El Capitan

    10.11.4

    Help, please.  It keeps crashing and links to the top of my computer for about 30 to 60 minutes each time.  I'm beyond the point of frustration!

    you have, at least, 5 options:

    1. uninstall all cc, clean through the use of the Adobe Creative Cloud cleaning tool to solve installation problems, restart your computer, reinstall the cc https://creative.adobe.com/products/creative-cloud desktop app and use it to reinstall your programs of cc.

    2 uninstall all cc, clean through the use of the Adobe Creative Cloud cleaning tool to solve installation problems, restart your computer and install your programs of cc directly without using the application of office cc, Adobe CC 2015 Direct Download Links: Creative Cloud 2015 Release | ProDesignTools

    3. uncheck the option to start the application from the cc office whenever you start your computer.  you only need to run once all the 30 days (with monthly subscription) to 91 days (with annual subscription).

    4 run just enough long to check with adobe servers, then leave before it crashes and generates a problem

    5 3 and 4 can be combined.

  • crashes and close

    FK790AA HP PAVILION ELITE MODALE 9400f Yes for vista 64-bit window (disk space), accidents and shut down and restart the car

    No upgrade has been done for her

    Hello

    If you have found the drive disk on the recovery partition, then try this article.

    Not enough space on the recovery partition.

    Other suggestions are listed in this article.

  • A few days, I bought a mac mini which I transferred the data and programs with time machine: programs have been updated except for iMovie, and now it seems that I have to pay for the update: possible? What I am doing wrong?

    A few days ago, I bought a mac mini and I transferred all my data and programs with time machine: all programs have been updated but iMovie (7.1.4)... However, it seems that, to update to the latest version, I have to pay to download on Appstore: is it possible? what I am doing wrong?

    If it were a new mac mini, you need already installed 10.1 iMovie.  Otherwise, but you already have iMovie 9 registered version to your Apple ID, you can upgrade to version 10 for free, but if (as it appears) is an earlier version then you have to buy version 10.

    Geoff.

  • Interface user Loader causing Flash to crash and close

    Hello everyone, The Kraken here

    I have a problem and was hoping for a glimpse.

    In the prosess of the creation of a Web site I came across a question that left me speechless!

    I created a 'swf file "to load in one of my pages using the loading of the UI component. The "swf" file exists in the same directory as the index file that is the Web site.

    In the component settings, the only thing I changed was resizing to 'false' and the source that I entered "services.swf" which is the "swf" it takes to load.

    The Web site loads very well to the home page, but when I try to click on the services button to load th services Flash page stops every time.

    I did a new empty AS3 file to test the "swf" file using the charger of the user interface and it works very well, but not in my Web site.

    If anyone has any ideas where I can start to diagnose this problem it would be appreciated.

    Yours in FLASH
    The Kraken

    I noticed a flash document can be damaged at the strangest times and give more strange results. You said that you have tested with an empty file and it worked, but not with your Web site. Your main flash document is possibly corrupt. Try to copy all images on your timeline and paste it into a new document. Most probably, you will have to clean up some of the frameworks if all have not extended until the end of the timeline. Copy the timeline to a new doc has solved problems for me before when I had trouble-shooted everything.

    You get the same results of test on a web server?

  • Director of Media Centre - Media Player... we're trying to use it every time - it now crashes and closes the pc?

    Tried fixing adobe - apparently - there were some sort of problems, a bug or something - but have not been able to fix it

    Hi Elfie54,

    1. don't you make changes before the show?

    We recommend that you run the system restore and verify the result. To do this, try the following steps:
    a. Click Start, type system restore in the search programs and files.
    b. click on the system restore, click Run as administrator.
    (c) in the System Restore dialog box, click Next.
    d. Select a restore point from the list that is dated before the problem and then click Next.
    e. on her confirm your restore point window, click Finish.
    f. check if the problem persists.

    See What is system restore?

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Install and help with black screen / timeout

    I'm pretty new to the scene of the VM and try to configure the ability for my bosses to connect to a virtual desktop, while they travel.  I have setup a Viewserver, a vCenter and a main domain controller.  I send you all the traffic through our firewall through the DMZ in the Viewserver.

    When I test this connection locally from a PC on the same network through the Client view, it seems to work fine.  I have a beautiful office in Windows 7 can be used.  When I leave the office and go to any other Internet connection, I have a login name, provide connection information, and then a black screen and that's where he stays.  In the end (after 15-20 years or more) he told me that the remote connection has been completed.  Short version is it works on the inside, but not outside.

    I have reviewed this error a few messages found and have made several steps such as insurance there is no active internal firewall (will re-enable them and fix them after I understand this), checked the Viewserver can properly search the PDC, the vCenter and so on.

    I'm really stuck here and have tried different things for several days.  That's a lot of your time to test, because it works fine locally, so I have to leave the building and get an external Internet connection to test it out-> in.  I have the public IP address of the Ste of connection on its own domain.

    For the purposes of this question, it is publicip.mydomain.com

    Internally, the machines are set up as:

    PDC 192.168.11.202

    vCenter 192.168.11.203

    Viewsrv 192.168.11.204

    The firewall is DMZ had to 192.168.11.204.

    Any help would be appreciated in the sovereign.

    Thanks for the update.

    If you have double checked these three steps, then it is probably time to use Wireshark to see what is blocking PCoIP in your environment.

    Take a look at this post for more information on this. http://communities.VMware.com/message/1860992#1860992

    You can initially run wireshark on the Client from the view, and then if that does not indicate where the Eastern bloc, then run it on the Security server. Look at just the traffic PCoIP. (4172 TCP and UDP 4172).

    This is how some other people have fixed what you see.

    Select this option.

  • Someone knows the slow loading web pages with Microsoft 8.1 upgrade? Mine waiting for a minute or two and then load it, or expires and does not load.

    This problem did not exist with the original version of Microsoft 8 Pro that came with my Dell XPS new in February of this year. He has only started happening since I upgraded to 8.1 two days ago.

    You are using a pre-release version of the software.

    You can expect random inconsistencies and unexpected behavior.

    You should never install a beta prodcut on your hand, production of the computer

  • How to select, copy and paste (with translation into English) a Spanish PDF document, for example, Google Translate?

    I have a 64-bit Windows 8.1 PC and use Internet Explorer 11 or Windows Chrome. Can someone talk to me through selection, copy and paste a PDF document in general? As well as my occasional to translate Spanish Pdf document need, I also like to know how to select, copy and paste into Notepad or WordPad, an e-mail or a document. I tried everything I can think but cannot make it work.

    Just FYI: If you have PDF documents online (which contain 'real text' of course), you can also use Google Translate to translate the entire document.  Click 'translate a document' under the entry field.

  • ORA-19279: dynamic type mismatch query: wait for the singleton sequence

    Hello
    I have my xml stored in the table "xml_table".
    The content of the XML is:

    < COMPANY NAME = 'ABC' >
    Paris < DEPARTMENT_NAME > < / DEPARTMENT_NAME >
    < ADDRESS > Nevers Street < / ADDRESS >
    London < DEPARTMENT_NAME > < / DEPARTMENT_NAME >
    Northampton square < ADDRESS > < / ADDRESS >
    < / COMPANY >

    I would like to query the XML to get the result like this:

    COMPANY_NAME | DEPARTMENT_NAME | ADDRESS

    ABC | Paris | Street of nevers
    ABC | London | Northampton square

    However when I run the query:

    SELECT t.company_name, t.address, t.department_name
    Xml_table p,
    XMLTable ('/ COMPANY' ADOPTION p.OBJECT_VALUE)
    COLUMNS company_name PATH "@NAME."
    address PATH of VARCHAR2 (100) "/ COMPANY/ADDRESS.
    department_name PATH VARCHAR2 (100) "/ COMPANY/DEPARTMENT_NAME ') t

    I get the error message:
    ORA-19279: XPTY0004 - dynamic XQuery type mismatch: expected - singleton sequence got several sequence element

    What can be wrong with the query? Should Howe be modified to achieve the desired result?

    Thanks for the help

    Groxy

    Hello

    What can be wrong with the query?

    The XPath expression that you use to map DEPARTMENT_NAME and columns ADDRESS corresponds to a sequence of elements, not a single value.
    For example, "/ COMPANY/ADDRESS" means:

    Rue de nevers
    Northampton Square

    In fact, your XML structure is not very suitable for a relational presentation.
    IMO, it would be easier to deal with this form:

    
      
        Paris
        
    Rue de nevers
    London
    Northampton Square

    Like this, you can easily break SERVICE items in separate lines with a simple XPath.

    That being said, perhaps that you have no choice, so here's a query do you want:

    SELECT t.company_name, t.address, t.department_name
    FROM xml_table p,
         XMLTable(
          'for $i in /COMPANY/DEPARTMENT_NAME
           return 
           {
            $i/../@NAME,
            $i,
            $i/following-sibling::ADDRESS[1]
           }
           '
          PASSING p.OBJECT_VALUE
          COLUMNS company_name    VARCHAR2(30)  PATH '@NAME',
                  address         VARCHAR2(100) PATH 'ADDRESS',
                  department_name VARCHAR2(100) PATH 'DEPARTMENT_NAME'
         ) t
    ;
    

    Each 'virtual' line is built in the XQuery by searching for each DEPARTMENT_NAME and its first element following ADDRESS.

Maybe you are looking for