Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deadlock on dual when executing a job

Christian PitetAug 4 2017 — edited Aug 7 2017

Hi,

I am using SQL Developer to create and execute a job. I am using the wizard. But when I apply the wizard, I get an error ORA-4020 "deadlock detected". My operation is very siùple it is "select sysdate from dual". I don't understand why I get a deadlock error because the object is "dual", not a table or so. Below is the output generated by the assistant.

BEGIN

DBMS_SCHEDULER.set_attribute( name => '"SIVOA"."TRUNCATE_EV_48H"', attribute => 'job_action', value => 'begin

select sysdate from dual;

end;');

        DBMS_SCHEDULER.set_attribute_null( name => '"SIVOA"."TRUNCATE_EV_48H"', attribute => 'start_date');

        DBMS_SCHEDULER.set_attribute_null( name => '"SIVOA"."TRUNCATE_EV_48H"', attribute => 'repeat_interval');

DBMS_SCHEDULER.REMOVE_JOB_EMAIL_NOTIFICATION (   

             job_name => '"SIVOA"."TRUNCATE_EV_48H"'

             );

DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION (   

             job_name => '"SIVOA"."TRUNCATE_EV_48H"',

             recipients => 'sombody@somecompany.fr',

             sender => '',

             subject => 'Oracle Scheduler Job Notification - %job_owner%.%job_name%.%job_subname% %event_type%',

             body => 'Job: %job_owner%.%job_name%.%job_subname%

Event: %event_type%

Date: %event_timestamp%

Log id: %log_id%

Job class: %job_class_name%

Run count: %run_count%

Failure count: %failure_count%

Retry count: %retry_count%

Error code: %error_code

%Error message: %error_message%

',

             events => 'JOB_STARTED, JOB_BROKEN, JOB_CHAIN_STALLED, JOB_FAILED, JOB_OVER_MAX_DUR, JOB_SCH_LIM_REACHED',

              filter_condition =>  ''

             );

DBMS_SCHEDULER.enable(name=>'"SIVOA"."TRUNCATE_EV_48H"');

END;

/

I am using SQL developer version 4.2.0.17.089. And DB is 12.1.

Regards.

This post has been answered by unknown-7404 on Aug 4 2017
Jump to Answer

Comments

One alternative could be that there is a bug in the JNI code.  The use of the option ends up allowing the bug to impact the application space in a way that the OS detects it - and thus the SEGV.

Michaelt-Oracle

While a user level bug is certainly a possibility what's strange about this case is there are no user level threads making JNI calls at the time of the crash. We've also determined the crash occurs on OEL but not on Solaris Sparc, other platforms to be tested soon. The question here is simply if there are any known issues. My queries of bugdb did not yield any.

> there are no user level threads making JNI calls at the time of the crash.

Irrelevant.

SEGV occurs because the OS detected that the application did something bad.  That can occur any time once the bug occurs.  It might be immediately or hundreds of lines later.  For example if the code corrupts the native heap then the fault might not occur until the native heap manager attempts to compress the heap which can occur much later.

> We've also determined the crash occurs on OEL but not on Solaris Sparc

Different execution paths which means the potential for different behavior.  So in one case it does something the OS sees in the other it doesn't.

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 1 2017
Added on Aug 4 2017
1 comment
239 views