Operating System - OpenVMS
1748204 Members
4142 Online
108759 Solutions
New Discussion юеВ

Re: Process dump error meaning - BR R31,#X000228

 
SOLVED
Go to solution
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

Sathya,

you need to find out the caller of this piece of code and figure out, HOW R3 is getting loaded with this value.

If you can reproduce this, you might want to set a breakpoint at the failing instruction and look at the value of R3, when you hit that breakpoint. You may be getting to this code with correct values of R3 as well.

Once you hit this breakpoint and R3 looks bad or unexpected, issue a DBG> SHOW CALL to find out where this call has been called from.

Volker.
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

Sathya,

can you find out, which data structures are at address 140C9F0 ? The data at that address range is readable, but not writeable from USER mode.

You could try a couple of EXAMINE commands at that address range. If it would be ASCII data, maybe you can guess where it's being used from.

Volker.
sathya prabu
Advisor

Re: Process dump error meaning - BR R31,#X000228

Hi Volker,

Thanks a lot.

But i got u some more info.. The process behaves very wierd. Please shed some light on it. This is still dragging. Wanna get some hold on it..

at the start of the debugging
exa/ps 140C9F0
ACM$READ_SERVER+0A0:
SP_ALIGN IPL VMM CM IP SW
0 25 0 KRNL 0 0

after entering the module :-
exa/ps 140C9F0
ACM$READ_SERVER+0A0:
SP_ALIGN IPL VMM CM IP SW
0 25 0 KRNL 0 0

R3 content when entering into the specific module
INIT_PPVM\INIT_PPVM\%R3: 000000000140C9F0

ascii content at 140C9F0
ACM$READ_SERVER+0A0: "`├Г ......"

hex content at 140c9f0
ACM$READ_SERVER+0A0: 000103180008D960

Actual exception:
stepped to INIT_PPVM\INIT_PPVM\%LINE 305
INIT_PPVM\INIT_PPVM\%R3: 000000000140C9F0
INIT_PPVM\INIT_PPVM\%R24: 2020202020000000
%SYSTEM-F-ACCVIO, access violation, reason mask=04, virtual address=000000000140C9F3, PC=0000000000F6FD6C, PS=0000001B
break on unhandled exception at INIT_PPVM\INIT_PPVM\%LINE 305+10

examine after exception:
ACM$READ_SERVER+0A0: 000103180008D960

ps after exception:
ACM$READ_SERVER+0A8:
SP_ALIGN IPL VMM CM IP SW
0 9 0 SUPR 0 0
ACM$READ_SERVER+0A0:
SP_ALIGN IPL VMM CM IP SW
0 25 0 KRNL 0 0

exa/ps 140C9F3
ACM$READ_SERVER+0A3:
SP_ALIGN IPL VMM CM IP SW
1 24 0 KRNL 0 0

after ASCII deposit on address(process allowed to deposit) 140C9F3
ACM$READ_SERVER+0A3: 0109415948544153
ACM$READ_SERVER+0A3: "SATHYA.."

-sathya
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

Sathya,

to prove that memory at virtual address 140C9F3 is NOT writeable by user mode do this:

- start your application with the debugger
- DBG> SET BR INIT_PPVM\INIT_PPVM\%LINE 305
- DBG> GO

Once you've hit the breakpoint, login as a privileged user (need CMKRNL privs), then invoke SDA with ANAL/SYS. In SDA, set process context to the process being debugged:

SDA> SET PROC/ID=
SDA> SHOW PROC/PAGE 140C9F3;10

then look at the data in columns 'Read' and 'Writ' and post this data here

SDA> EXIT

- in your debug session, issue a SHOW CALLS - this will tell you from which routine INIT_PPVM has been called. Consider to set a breakpoint at the call to INIT_PPVM. Look at the value of R3 in the context of the caller.

Volker.
sathya prabu
Advisor

Re: Process dump error meaning - BR R31,#X000228

Hi Volker,

Thank you very much for the info.

Here is the data for the address space
Process address space
---------------------

Mapped Address PTE Address PTE Type Read Writ MLOA GH PgTyp Loc Bak RefCnt WSLX
----------------- ----------------- ----------------- ----- ---- ---- ---- - ------- ------ ----------------- ---- --------
00000000.0140C000 FFFFFEFC.00005030 000C0C02.00160F01 VALID KESU NONE M-U- 0 PROCESS ACTIVE FF000000.00000000 0001 00000555

Please let nme know what it signifies and how im gonna get the code work?

-Thanks
Sathya
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

Sathya,

as expected, the protection of the page in question is Writ: NONE - so your code can not write to that page !

The only conclusion from this is, that the some previous code calculated a wrong address or address offset before calling your final failing routine, which incurs the ACCVIO.

So my previous advice is still valid, run the code with the debuggger and wait for the ACCVIO, then issue a DBG> SHOW CALLS commands to see the call stack.

Or set a breakpoint to the first instruction in the failing routine (INIT_PPVM ?) and look at the value in R3. If it looks 'bad', determine the caller. For the next execution of your program, set a breakpoint in the calling routine and step through it, until it calls INIT_PPVM. Look at how it calculates R3.

Does your program always fail when entering this routine ? Did it ever work before ? If so, what changed ?

Volker.
sathya prabu
Advisor

Re: Process dump error meaning - BR R31,#X000228

Hi Volker,

Thanks for the quick info.

Actually ,the code was working fine before.
After that,a lot of changes has been made. I could not pin point what exactly is it. But i was able to sense something wierd(for me?!) again.

While in debug, The task(previously i thought that the routine INIT_PPVM is ought to be called from the TASK) is calling this INIT_PPVM without having any actual call being made from this task.

There is one specific step in the task where it is mistakenly being called always.
When i 'step debug' the task, it performs normally and when it reaches that specific step i did 'set break' on the routine actually being called from the task, but the acms debugger is not showing me the actual routine that i have set break, instead shows this INIT_PPVM and as i step through the debugger, it gives ACCVIO at line 305 for STQ_U on 140c9f3.

Do you have any idea why the task is calling uninvited guests?!?

-Thanks,
Sathya
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

Sathya,

I don't have any experience with ACMS debugging.

If you are only looking at the source code, you may not see the actual 'call', if it's being generate by the compiler. You would need to look at the machine code listing of the module.

Once you've hit the ACCVIO, try

DBG> SHOW CALL
DBG> EXA/INS @R26

Volker.
Volker Halle
Honored Contributor

Re: Process dump error meaning - BR R31,#X000228

and by the way:

The fact the that page is Writ: NONE is consistant with the fact, that this seems to be a code page - as pointed out earlier:

Please note that the failing VA of 0140C9F3 is pretty close to the following return address on the stack:

*SERVER_1 ACM$SERVER_1 00000000000000D4 000000000140C9D4

So something may have gone wrong on the stack and some code address has been picked up incorrectly and used as a data address.

What does this return ?

DBG> EXA/INS 0140C9F3-10:0140C9F3+10

Volker.
sathya prabu
Advisor

Re: Process dump error meaning - BR R31,#X000228

Hi Volker,

I am Getting the following instrcutions at the range

DBG> exa/ins 0140C9d3:0140C9F3+10
ACM$READ_SERVER+83: FBLT F16,#XF41E6B
ACM$READ_SERVER+87: BGT R8,#X041E43
ACM$READ_SERVER+8B: STT F16,#X0847(R0)
ACM$READ_SERVER+8F: STQ_C R16,#X10A7(R0)
ACM$READ_SERVER+93: STQ_C R16,#X18A5(R0)
ACM$READ_SERVER+97: FBEQ F0,#XF41EA7
ACM$READ_SERVER+9B: BGT R4,#X000143
ACM$READ_SERVER+9F:
ACM$READ_SERVER+0A3:
ACM$READ_SERVER+0A7:
ACM$READ_SERVER+0AB:
ACM$READ_SERVER+0AF:
ACM$READ_SERVER+0B3:

and 'show calls' having

module name routine name line rel PC abs PC
*INIT_PPVM INIT_PPVM 305 000000000000031C 0000000000F6FD6C
SHARE$ACMTWPSHR 0000000000037BBC 0000000007CA5BBC
SHARE$ACMTWPSHR 0000000000039588 0000000007CA7588
SHARE$ACMTWPSHR 000000000003E08C 0000000007CAC08C
SHARE$ACMTWPSHR 000000000003DDCC 0000000007CABDCC
SHARE$ACMTWPSHR 000000000003A330 0000000007CA8330
SHARE$ACMTWPSHR 0000000000037DEC 0000000007CA5DEC
SHARE$ACMTWPSHR 00000000000393A0 0000000007CA73A0
*READ_SERVER ACM$READ_SERVER 00000000000000D4 000000000140C9D4
SQL$PROC_2_A45A23_241DC1 0000000001927E18 0000000001937E18
----- the above looks like a null frame in the same scope as the frame below
0000000000079040 0000000000089040
FFFFFFFF80385D54 FFFFFFFF80385D54

-Thanks
sathya