Maybe I wasn't clear enough. You can kill this session from OS. But you cannot kill it with "alter system kill session..."

I created log table:

SQL> create table log (a number, msg varchar2(2000));

Table created.

I have now two sqlplus sessions with timing set on.
In first I run loop with exception when others handle...
Few seconds after i issue "alter system kill session" in second sqlplus.

-----First session:
SQL> declare
2 err varchar2(2000);
3 i number;
4 begin
5 for i in 1..100 loop
6 begin
7 dbms_lock.sleep(1);
8 insert into log values (i,'OK');
9 exception when others then
10 err:=sqlerrm;
11 insert into log values (-i,err);
12 end;
13 commit;
14 end loop;
15 end;
16 /

PL/SQL procedure successfully completed.

Elapsed: 00:01:52.05
-----
Notice that I haven't got no "your session is killed". Then, when I try to issue next statement I get "session is killed". So the session was killed after successful completion of procedure or anonymous pl/sql block in this example.

-----Second session:
SQL> alter system kill session '22,2545';
alter system kill session '22,2545'
*
ERROR at line 1:
ORA-00031: session marked for kill

Elapsed: 00:01:02.00
-----
It waits for a minute and then fails to kill session, but only marks it for kill. (On succesful kill we get "System altered.")

----- If we examine log table:

SQL> select count(*) from log;

COUNT(*)
----------
100

SQL> select * from log where a<0;

A
----------
MSG
-----------------------------------------
-1
ORA-00028: your session has been killed

-----
We can see here that altough I issued "alter system kill session" in first second of executing pl/sql (see field A equals -1), it continues to run through all 100 loops of which there are 99 successfull:
-----
SQL> select count(*) from log where msg='OK';

COUNT(*)
----------
99
-----

I think what happens is that on kill oracle pushes ORA-00028 exception to session. Since my 'when others' catches and handles the exception, session's default exception handler is not able to respond to 'kill' exception. So the session stays 'marked for kill' but running. After completion of the procedure (when my handler is no longer valid), PMON tries again and succeed.

I tried to put "commit; raise;" in my when others exception handler. After this the kill succeeds: ORA-00028 is the last line in my log.

Regards,
Tomaz