MakeDecision job stuck in "processed" state.

Hello,
recently was found that all makedecision jobs just stuck in processing state and nothing happens.
All other jobs successfuly executes and there is no isReset in dbqueue. Which means that object layer don't see any "contested" operations.
Meanwhile in database executing statements (makedecision) was blocked by one single statement, the head blocker always this one:
select 1 where exists (select 1 from PWOHelperPWO where ((UID_PersonWantsOrg = '[PWO UID here]') and (isnull(UID_PersonInsteadOf, '') = '') and ( Not isnull(UID_PersonInsteadOf, N'') = N'') and (LevelNumber = 7)))
This database session was fall into "sleeping" state and there is no further movement.
MS "caused by" according blocked sessions is:
* cancelled query was not rolled back;
* orphaned transaction;
* wrong locking;
* long time executing trn.
I don't think that this query could take to execute more than few seconds. So, my guess here is could be something in table locking.
Has anyone faced with something similar? Will be appreciate for any suggestions.

  • Hi,

    I might be reading this completely wrong but ....... you say it's a makedecision ...... I'm assuming that means it's a CD step created by you.

    The way the SQL reads to me it will only return a result if UID_PersonInsteadOf is both NULL and NOT NULL ...... which I think is impossible.

    Did you try extracting the UID_PersonWantsOrg and running the SQL in SSMS?

    HTH, Barry.

  • Hello Barry,

    >Did you try extracting the UID_PersonWantsOrg and running the SQL in SSMS?
    yes, this was the first step what we do.
    Query executed successfully and immediately returned nothing. Completly agreed with you that this query looks very strange and probably should always return nothing. We have no such CD step whith condition like this.
    According to "from PWOHelperPWO" I think this query something around "Approval can be delegated" flag. Can it be?
    In our code we are not "playing" with UID_PersonInsteadOf for delegation purpuses.

    Two more things:
    1. This is not repeatable problem, it happened two may be three times. In general this workflow works fine.
    2. This problem can be resovled without dropping the session and falling down jobs to FROZEN state, through restarting SQL instance. Jobs goes via MISSING state in this case, without problem executes successfully.

    Thank you.

  • I suggest contacting support as other things might come into play (SQL Server build, ....).