Space offset is outside current limit for object

65 pts.
Tags:
AS/400 errors
RPG
I have a batch job COAMR0 which runs the RPG program (COAPR2). In RPG program if business logic fails, I want to terminate the program and like to generate DUMP of the program. Recently COAMR0 taking too much CPU time when it executing DUMP operation. I found this when I was debugging COAPR2 which is executing in batch job COAMR0. After some time, it generated following error …. Message ID . . . . . . : MCH0601 Severity . . . . . . . : 40 Message type . . . . . : Escape Date sent . . . . . . : 21/07/08 Time sent . . . . . . : 07:02:59 Message . . . . : Space offset X'00002004' or X'0000000000000000' is outside current limit for object COAMR0 RPLSEA 096360. Cause . . . . . : A program tried to set a space pointer or use storage outside a space, or tried to use an unallocated page in teraspace. The space class is X'04'. The space class designates the type of space: 00-primary associated space (includes space objects). 01-secondary associated space 0. 02-implicit process space for automatic storage. 03-implicit process space for static storage in activation group mark X'00000000'. 04-implicit process space for heap identifier X'00000000' in activation group mark X'00000000'. It generated incomplete spool file with following statements at the bottom of spool file… “Cannot allocate storage to receive variable data. Dump terminated. Unexpected errors occurred during module variable dump. Dump terminated. “ I think not enough memory allocated for the job to generate entire dump. Could anybody help me to solve this issue?
ASKED: July 21, 2008  8:33 AM
UPDATED: May 6, 2010  6:31 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

Hi,

This isn’t something I’ve come across before, but I’d suggest taking a look at some of your system values :-

QJOBMSGQMX
QJOBMSGQFL

Regards,

Martin Gilbert.

Discuss This Question: 12  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • svmanoj166
    Thanks for your support. Values are System value . . . . . : QJOBMSGQMX Description . . . . . : Maximum size of job message queue Size in Megabytes . . : 64 8-64 System value . . . . . : QJOBMSGQFL Description . . . . . : Job message queue full action Job message queue full action . . . . . . . : *PRTWRAP *NOWRAP *WRAP *PRTWRAP But i could not understand the relation between message queue size and the storage space for the object COAMR0? Do you think there will be some impact based on these system values?
    65 pointsBadges:
    report
  • Gilly400
    Hi, The job message queue size is also used for the joblog size. Yours is set to the maximum and set to print/wrap so this shouldn't be any problem. A few questions to point us in the right direction :- 1. How long does the program run/how much I-O does the program process before it starts the dump? 2. How busy is the system at the time of the dump? 3. How full is the ASP (Disk)? 4. Is there a second/third page of the message text that you pasted above? 5. Is this an ILE RPG program or a RPG/400 (OPM) program? 6. Is the program compiled with debug options? 7. Are you using pointers in your program? 8. Are you on the latest PTF level? Which version of the OS are you running? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Gilly400
    Hi, One more question :- Are there any other messages in the joblog before the MCH0601? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • svmanoj166
    Hi Gill, I was not in office yesterday. Thanks for you support, please find below answers to your questions. 1. How long does the program run/how much I-O does the program process before it starts the dump? Morning we start the batch jobs (around 10AM). When we got the issue it was evening (around 6.00 PM). Program definitely access lot of files before business logic fails. 2. How busy is the system at the time of the dump? Not much busy at the time of dump, I think CPU usage below 10%. Once it reached DUMP statement CPU usage gone crazy. I has taken around 60 to 70% cpu. 3. How full is the ASP (Disk)? Sorry I don’t how to see this. Can you help me where can I find this? 4. Is there a second/third page of the message text that you pasted above? Following few lines are after that page. 05-constant space. 06-space for handle-based heap identifier X'00000000'. 07-teraspace offset X'0000000000000000'. 08-teraspace for OS/400 PASE memory address X'0000000000000000'. Offset X'00002004' only applies to storage outside teraspace. X'8000000000000000C8CF351CB6001000' is a pointer to the teraspace page or the start of the implicit process space for the allocation. 5. Is this an ILE RPG program or a RPG/400 (OPM) program? COAPR2 is ILE program. 6. Is the program compiled with debug options? We mention *All in debugging view parameter when compiling ILE program. Debugging views . . . . . . . . > *ALL 7. Are you using pointers in your program? No. 8. Are there any other messages in the joblog before the MCH0601? Nothing is relating to this issue. This is the first message after system met with an error. 9. Are you on the latest PTF level? Which version of the OS are you running? Our OS is V5R3 version. I don’t know about PTF level, please let me know how can find that? Regards, Manoj
    65 pointsBadges:
    report
  • Gilly400
    Hi, 1. Program has been running for about 8 hours, therefore it may have a lot of temporary space in use. 2. CPU shouldn't be a problem before the dump. 3. Use WRKSYSSTS, you should see "% system ASP used". A few more questions :- Does the program have this problem regularly? Can you cause the problem yourself (maybe by giving the program data to process which causes the business logic to fail )? How big is this program (does it have a lot of references to external objects)? Does it use any other modules? Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • svmanoj166
    Hi Gilly, % system ASP used is 45.9960 Yes this is happneing regulary when ever it goes to DUMP operation. yes i can easily replicate the problem using many scenario. Program around 4000 lines, it does not have too many references to the external objects. No, it does not have any other modules. Even though this is ILE program, it did not use ILE features. No procedures, not using any service programs, no binding directory included. Most of the code uses RPG III. This program has been converted from RPGIII to RPGIV 5 years back. Regards Manoj
    65 pointsBadges:
    report
  • Gilly400
    Hi Manoj, Is it possible for you to email me the source? Then I can take a look to see what's going on. email is gilly400 (at) hotmail (dot) com Regards, Martin.
    23,730 pointsBadges:
    report
  • Sloopy
    The problem occurs during the DUMP operation. I suspect that the program in error is an IBM-supplied program, and that it is trying to retrieve a value from the heap. However, the heap address it is using is zero, which of course is invalid. Because of the size of this program, and the amount of automatic storage it (probably) uses, and because the dump operation itself also uses a lot of automatic storage, it may be that you are running out of heap space. (What do you think, Martin? Sounds feasible to you?) If you can do without the dump, and instead write critical variables and error information to a report, or send a message, then that would probably solve this problem. Of course, you still have the problem that this program falls over on a fairly regular basis, and that it is rather large, and does not use the most efficient coding methods for the box. And of course, the dump would be very useful in helping to fix it. But since the problem is the business logic, you can probably work out which variables would help you most and print them out yourself without having to dump everything, as mentioned above. By all means send Martin the source. If you send it to me, I will rewrite the program in ILE and then you'll be even worse off.... Regards, Sloopy
    2,195 pointsBadges:
    report
  • Gilly400
    Hi Sloopy, Sounds feasible to me. Maybe the latest cumulative PTF's would fix the problem. It might be worth writing a test program with just a DUMP and no other processing and seeing whether it causes the same problem. Regards, Martin.
    23,730 pointsBadges:
    report
  • svmanoj166
    Hi Sloopy, Thanks for your valuable information. Ok, I will try to do generate the spool file with required data which is need for investigation instead of DUMP. I thought this is the last hope for me. Do you think can we get any help if we discuss same with IBM? Hi Gilly, One more thing, same DUMP operations executing properly in some other program (but they are interactive programs). I will try your suggestion. Unfortunately I can not send the code to you which violate our company security policy. I should get approval for this. Let see will they allow me or not.
    65 pointsBadges:
    report
  • Sloopy
    I don't know whether IBM would be able to help. Martin is correct to say that you should be up to date on necessary PTFs. But, again, I don't k now whether that would help. The Dump opcode is not really intended to be used as part of a company's day-to-day operations! If the program behaves badly, it should be fixed. If a program's business rules are violated by bad data, the data needs to be fixed, but the program also should not fall over -- it should report the problem in a sane and clear way, usually by printing an error report showing which rules were violated, and which records were involved. Sloopy
    2,195 pointsBadges:
    report
  • TomLiotta
    Why is DUMP being used? Is this a normal process for this program or is the DUMP statement a part of an error process such as a *PSSR operation? That is, is an error causing the program to run the DUMP statement or is the DUMP always executed in the normal running of the program at this point? (Why would you do that?) If DUMP is part of an error handling process, is it part of ending the program? Or does the program run DUMP and try to continue? Was this the only DUMP run by the program? If the program is large, if it has many variables or many large variables, then It's possible that it simply couldn't create a dump big enough. There is a problem with ILE and long-running programs, but your program wasn't running anywhere near long enough. On very large systems, you might expect unexplained problems after running continuously for a couple weeks. But this doesn't seem to apply since other messages would be more important than the MCH0601. I'm suspicious of the large job message queue size with *PRTWRAP. That indicates significant problems with program design. Joblogs generally have no business getting that large so often that system values need to accommodate them. Most likely, the program simply needs to be cleaned up. It is very unlikely that it can't get enough memory to do its normal work. It possibly just has so much unnecessary stuff in it that the DUMP fails. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following