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

Pascal compiler sits in the COM state.

SOLVED
Go to solution
Brian Reiter
Valued Contributor

Pascal compiler sits in the COM state.

Here's a good one for Pascal experts.

We're using Compaq Pascal V5.8-88 on OpenVMS Alpha V7.3-1 to recompile a number of our legacy systems (currently compiled on OpenVMS 7-1-2). One task kept the Pascal compiler in the COM state for over an hour (we gave up on it). The engineer performing the recompilation has managed to compile the module using the /NOCHECK qualifier. The default /CHECK=(BOUND,DECLARATIONS) seems to cause the infinite loop.

Does anybody have any clues as to what would cause this behaviour. The task in question consists of 1 large(ish) source file which relies on a number of environment files. Other tasks using these environment files have compiled without any problems.

Best regards


Brian

Note:
I know we should be upto date on all patches, OS versions etc. but our IT department is very anti-VMS. Its up to us as Engineers to keep the target systems up to date.
13 REPLIES
Antoniov.
Honored Contributor

Re: Pascal compiler sits in the COM state.

Brian,
welcome to VMS group!
If there is some patch and you can't install because your "department is very anti-VMS", you don't find solution, I think ;-)
However I don't find any path for pascal. Ian is better than me to find patch and perhaps he can help you (I hope).

@Antoniov
Antonio Maria Vigliotti
Willem Grooters
Honored Contributor

Re: Pascal compiler sits in the COM state.

Brian,

Wild shot - based on (VAX PASCAL) experience yeaeaears ago: try /NOOPTIMIZE. It might be the optimizer causing problems....

You could also try to check just BOUNDS of just DECLARATIONS - not both - to pinpoint the problem.

I remember that COM means "Ready to get the CPU - to be CUR" and I remember there might be a reason for this state to be persistent. having said that - and your remark that the file compiles under VMS 7.1-2) gives me a feeling it's VMS-version related. I would then suggest thst, IF you have a suport contract, to contact your HP representative.
To analyse: ANA/SYS when this process 'hangs' in COM state. You can then find out (hopefully) why this happens.
To do this off-line, you may need to create a system or process crashdump (HP might need that, anyway)
Willem Grooters
OpenVMS Developer & System Manager
Antoniov.
Honored Contributor

Re: Pascal compiler sits in the COM state.

Hi Willem,
your post is against the common idea of people in this forum (see http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=430966 ;-)
However Brian has already solved without /OPT qualifier and he's asking any solution with optimitiation.

@Antoniov
Antonio Maria Vigliotti
John Gillings
Honored Contributor

Re: Pascal compiler sits in the COM state.

Brian,

Please log a case with your local customer support centre, providing them with all the files and commands required to reproduce the symptom. I'm sure Pascal engineering will want to find out what's wrong.

When installing Pascal, you are given the option to retain old compilers. You can then switch between compiler versions whenever you like. If you have more than one version, try compiling with an older version to see if the behaviour changes. There should be no problem mixing modules compiled with different versions.
A crucible of informative mistakes
John Reagan
Respected Contributor

Re: Pascal compiler sits in the COM state.

This is a new problem. I haven't seen this before.

Can you send me a reproducer so I can fix it for V5.9?

John Reagan
Pascal Project Leader
Brian Reiter
Valued Contributor

Re: Pascal compiler sits in the COM state.

John,

I suspect that the problem may be related to the amout of environment files (and poss. the size of the source). I could probably put together a save set of the environment and dispatch it to you (by post if too large).

In any event I need to get cleance from my managers.

I'll let you know the outcome

regards

Brian
John Reagan
Respected Contributor

Re: Pascal compiler sits in the COM state.

I'm willing to take any size.

If you cannot get clearance, if you record some PC values using either SDA or SHOW PROC/CONT, I can use the .MAP file to figure out where the looping is happening.

John
Brian Reiter
Valued Contributor

Re: Pascal compiler sits in the COM state.

John,

Will try and push things along over the next couple of days. Fairly hectic at the moment. Too many things requiring my immediate attention.

cheers

Brian
Brian Reiter
Valued Contributor

Re: Pascal compiler sits in the COM state.

John,

Just managed to the info. (The Engineer resigned last week so I've had a struggle getting to the account).

From SHO PROC/CONT I get the following PC values:

2D45D0
2D45C4
2D45E0
2d45F0

I've also attached the call stack from SDS

cheers

Brian
Brian Reiter
Valued Contributor

Re: Pascal compiler sits in the COM state.

Whoops forgot the attachment
John Reagan
Respected Contributor
Solution

Re: Pascal compiler sits in the COM state.

The loop in right in the middle of the optimizer's dataflow phase. I suspect that with /NOCHECK, it was able to optimize or eliminate code before the dataflow phase such that it didn't get confused.

With such bugs in dataflow, we probably need a reproducer. I can tell you how to get some dataflow dumps from the compiler, but it just takes up disk space and probably wouldn't find the problem.

Also, the GEM code generator used in -88 is a few versions old. The 5.9 which will come out later this year uses a newer GEM which might have already fixed the problem.
John Gillings
Honored Contributor

Re: Pascal compiler sits in the COM state.

Reminder for Brian

Pascal V5.9 has shipped. Please check to see if it's fixed this problem. If not, log a case so Engineering can look at it.
A crucible of informative mistakes
Brian Reiter
Valued Contributor

Re: Pascal compiler sits in the COM state.

Thanks for that. Will soon be battling with VMS 8-2 too :)

cheers

Brian