Hi
I think you can not use commit in the cursor loop for FOR UPDATE OF

Here is the Oracle Error message
/*
01002, 00000, "fetch out of sequence"
*Cause: 2) If the cursor has been opened with the FOR UPDATE clause,
fetching after a COMMIT has been issued will return the error.

Action: 2) Do not issue a COMMIT inside a fetch loop for a cursor
that has been opened FOR UPDATE.

*/

I have executed your proceedure after commenting the commit inside the loop. It's working fine.
But the problem is you are deleting a million records.