UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.
Cadet 1st Class
Cadet 1st Class
107 views

Memory access violation when running in cron

Hello,

We have a program that is throwing a memory access violation, when being ran from a script on a Linux server. When we run the program in debug on the same server, it runs through, no problem. The same exact program and script run on AIX with no issues.

Could anyone suggest a solution, or the best way to troubleshoot this issue?

 

Thanks...

0 Likes
3 Replies
Micro Focus Expert
Micro Focus Expert

On Linux, in the acu\bin directory run acushare -clean 

then you'll need to start acushare

does the script include the runtime -b option ... runcbl -b -c myconfig myprog

Does your program make any type of log showing which portions of your program succeeded, in order to determine where the mav may be occurring.

Are the environment variables, directory and file permissions, especially PATH the same for cron as they are for the user who can run the program successfully.

0 Likes
Cadet 1st Class
Cadet 1st Class

Yes, we use the -b option in the command line. 

Looking at the address at which the error file indicates the program failed there is a string statement. We have moved the code around, and the failure moves as well, not always to the same piece of code, but the pattern seems to be that it always failing on a "String" statement. Again, not always the same string statement, but a string statement. 

We have 15-20 other programs developed and ran in the same manner that do not fail. It is just this one.

Any suggestions would be appreciated.

 

Thanks, 

James 

 

0 Likes
Micro Focus Expert
Micro Focus Expert

If it is possible to relink the runtime (since you're running Linux, this is likely, though you may need to install a C development system), then do so as follows:

In lib/Makefile, look for a line

LDFLAGS = -s $(EXTRA_LDFLAG)

Get rid of the -s. Then execute 'make' to relink the runtime. Move the new runtime (or libruncbl.so) to the bin directory so that you are using it.

In cron, include the -z option when executing the runtime. This will cause the runtime to actually create a core file, rather than a Memory Access Violation.

That core file can be used with the runtime and gdb to determine the location of the crash:

gdb runcbl core

From the gdb prompt, type 'where' to get a stack trace. 

You may need to raise a support incident in order to get this fixed. It will also help to know what version you are using.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.