Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

 
SOLVED
Go to solution
Michael Moroney
Frequent Advisor

SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

I did a SHOW PROCESS/CONTINUOUS of a wayward process and often it is shown as being in CUR mode, but with a PC = 2BAD2BAD.CODE2BAD and a PSL = CODE2BAD, obviously bogus values. Other tools show that it is spending excessive time in kernel mode. Am I correct in assuming that SHOW PROCESS/CONTINUOUS displays those values when the process is at high IPL and not interruptable? (yes I know the concept of a "current" process is ambiguous above sched IPl)

This is OpenVMS V8.3 on an Integrity rx3600.
28 REPLIES 28
John Gillings
Honored Contributor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

Michael,

This is unlikely to be documented except in the source code. Addresses like 2BAD2BAD (and a few others, like DEADBEEF are scattered in the source code as flags).

This *may* be something in SHOW.EXE, but it's also possible it's in the scheduler or $GETJPI. FWIW, I can't see any instances of the string "2BAD" in SHOW.EXE.

Having worked on a derivative of SHOW PROCESS/CONTINUOUS back in VAX days, at that time it got most of its information from globally visible (though privileged) data structures, and the rest from $GETJPI, so chances are SHOW is just displaying what it found. Something else is planting the data. It must have changed fairly radically since then as a lot of the VAX code wasn't portable to Alpha, let alone Integrity.

As they say "Use the Source (Luke)".
A crucible of informative mistakes
Highlighted
Michael Moroney
Frequent Advisor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

There is no "C0DE2BAD" anywhere in the source, list or map of the executable, and I can't find either that string nor its binary equivalent on sys$sysdevice:, which is puzzling.
H.Becker
Honored Contributor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

As far as I know the SHOW PROCESS queues a special kernel mode AST to the target process. Once that is delivered it walks the call stack and retrieves the PC/PSL of the code thread that was interrupted by this AST. That pair is reported back and displayed by SHOW PROCESS.

If walking the stack fails, for whatever reason, special values are reported: 2BAD...

While walking the stack is simple for VAX and Alpha, it is very different and complex for I64.

Unfortunately there is no indication from the special PC/PSL what the actual failure in walking the stack was. So it is difficult to say why it failed. But these codes do not indicate a problem in your image. You should be able to find the string in sys$loadable_images, in the process management image.
Michael Moroney
Frequent Advisor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

I know Shadowing used 2BAD codes. I know how bad frame tracing is on the Itanium, I had to deal with that a couple of years ago.

I used the PC sampler in SDA to see what's going on and why the process is using more CPU time and is visibly slower. I see lots of time in F11BXQP at IPL 8, routine DEL_EXTFCB_C. Now I have to find out what that means. Weird in that it doesn't do much file IO.
Volker Halle
Honored Contributor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

Michael,

DEL_EXTFCB in [F11X]CLENUP removes and de-allocates Extension FCBs (File Control Blocks) linked to a primary FCB during a cleanup operation after a successfully completed file operation.

Is this program working with very fragmented files or files with man ACLs and therefore with many extension file headers ? Or are there a huge number of files open on the associated volumes ? High Trans Count on the mounted devices ?

DEL_EXTFCB runs in kernel mode and follows the FCB queues to the VCB to decrement the transaction count. Long lists of FCBs to be followed may cause this behaviour.

Volker.
Jur van der Burg
Respected Contributor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

The code comes from [sys]proc_read_write_reg.c, routine exe$read_process_reg_ast. It is walking the stack and has a problem interpreting that.

Fwiw,

Jur.

Michael Moroney
Frequent Advisor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

I'm going to guess that exe$read_process_reg_ast cannot access the process' registers when the process is at IPL 8, hence the bogus values.

I looked at the drive and it is somewhat fragmented. What is interesting is the process doesn't do much I/O to the drive but another process which uses it heavily is hardly affected. Anyway, I told them to defrag the drive the next chance they get.
Volker Halle
Honored Contributor
Solution

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

Michael,

DEL_EXTFCB is called to clean up after 'file operations', so just doing IO on open files may not call this routine. Just opening and closing (fragmented) files may cause this behaviour !

Volker.
H.Becker
Honored Contributor

Re: SHOW PROCESS/CONT shows PC=2BAD2BAD.CODE2BAD?

Any guess why the name has the "_ast" suffix at all? Or in other words, if at lower IPL, how can code in one process get the PC/PSL of another process?

2BAD2BAD.CODE2BAD shows a problem in walking the call stack not finding the AST frame. It is not an indicator that the target process is at a high IPL.

There were changes in the unwind code after V8.3. But I don't know why the AST frame isn't found in your environment and if any changes so far can fix that.

But I'm sure, this is not the real problem you want to solve. You seem to have a performance problem and SHOW PROCESS/CONT can't help you to find out whats going on.

PS: I was somehow wrong about finding the string in the image. I forgot that moving a 64 bit literal into a register (MOVL) splits the immediate operand into pieces and then into two slots so you can't see the literal as a whole in the code segment of the image. However, ANALYZE/IMAGE/SEGMENT=CODE can show the MOVL and the literal.