× Discuss on Template programming, jBASE programming, Enquiries, No-File enquiry, Enquiry routines, Version, Version routines, Menus, Abbriviations, Creating local reference fields, Fast path enquiries, Creating charts and graphs, Generating Reports, Deal slips, Straight through processing, Multi Company and Multi Book setup, Tabbed screens, Composite Screens, T24 API, etc...

jBASE: Segmentation violation. Aborting

  • N_arya_N
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 7 months ago #9510 by N_arya_N
jBASE: Segmentation violation. Aborting was created by N_arya_N
I try to run the below routine from jsh as well as mainline, I get the below error. Attaching my .profile


0001 PROGRAM TEST11
0002 $INSERT T24.BP I_COMMON
0003 $INSERT T24.BP I_EQUATE
0004 $INSERT T24.BP I_F.CUSTOMER
0005 PRINT "HELLO WORLD"
0006 * INPUT AA
0007 F.CUS = ''
0008 FN.CUS = 'F.CUSTOMER'
0009 PRINT " OPF"
0010 CALL OPF(FN.CUS,F.CUS)
0011 CUS = 10000001
0012 CRT " F.READ"
0013 CALL F.READ(FN.CUS,CUS,R.CUS,F.CUS,ERR)
0014 CRT R.CUS
0015
0016 RETURN
0017 END


PS: I have already run a COB in this environment and didnt get any such errors previously.

Please Log in or Create an account to join the conversation.

  • N_arya_N
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 7 months ago #9511 by N_arya_N
Replied by N_arya_N on topic Re: jBASE: Segmentation violation. Aborting
Attaching .profile
Attachments:

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 7 months ago #9512 by jpb
Have you tried

CUS = "10000001"

?

Please Log in or Create an account to join the conversation.

  • N_arya_N
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 7 months ago #9513 by N_arya_N
Replied by N_arya_N on topic Re: jBASE: Segmentation violation. Aborting
Yes i tried giving the customer in quotes as well.. Didnt help. Same error

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 7 months ago #9514 by jpb
Do you get the CRT's ?

And change RETURN to STOP, it's a program, not a subroutine.

Please Log in or Create an account to join the conversation.

  • badri.vijay
  • Visitor
  • Visitor
13 years 7 months ago #9516 by badri.vijay
Replied by badri.vijay on topic Re: jBASE: Segmentation violation. Aborting
Hi Jpb,

I am also N_arya_N's collegue. We faced this problem for CRT's as well. Please see the below routine where I changed the OPF and F.READ to OPEN and READ respectively. Then also i face the same issue

0001 PROGRAM TEST11
0002 $INSERT T24.BP I_COMMON
0003 $INSERT T24.BP I_EQUATE
0004 $INSERT T24.BP I_F.CUSTOMER
0005
0006 PRINT "HELLO WORLD"
0007 * INPUT AA
0008 F.CUS = ''
0009 FN.CUS = 'F.CUSTOMER'
0010 PRINT " OPF"
0011 * OPEN '' TO F.CUSTOMER ELSE
0012 OPEN 'FBNK.CUSTOMER' TO F.CUS ELSE
0013 PRINT " UNABLE TO OPEN CUSTOMER"
0014 END
0015 * CALL OPF(FN.CUS,F.CUS)
0016 CUS = "10000001"
0017 CRT " F.READ"
0018 *READ R.CUS FROM F.CUSTOMER,CUS ELSE
0019 READ R.REC FROM F.CUS,"10000001" ELSE
0020 PRINT " UNABLE TO READ"
0021 END
0022 * CALL F.READ(FN.CUS,CUS,R.CUS,F.CUS,ERR)
0023 CRT R.REC
0024
0025
0026 STOP
0027 END

Please Log in or Create an account to join the conversation.

  • badri.vijay
  • Visitor
  • Visitor
13 years 7 months ago #9517 by badri.vijay
Replied by badri.vijay on topic Re: jBASE: Segmentation violation. Aborting
jsh S260806 ~ -->TEST11
jBASE: Segmentation violation. Aborting
.profile[2]: 10551370 Abort(coredump)
$

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 7 months ago #9518 by jpb
I suppose this happens with all local compiled routines?

Check your settings for your compiler in $TAFC_HOME/config/system.properties
Do you have the correct environments uncommented / commented?

You can also check your routine with

jshow -c TEST11

there might be some info inside.

Please Log in or Create an account to join the conversation.

  • badri.vijay
  • Visitor
  • Visitor
13 years 7 months ago #9523 by badri.vijay
Replied by badri.vijay on topic Re: jBASE: Segmentation violation. Aborting
Hi Jpb,Thanks for your reply. You are correct. This happens only for the local routines that have been compiled in this environment. There were no issues when running other core routines or even COB.

I had uncommented the below lines in the system.properties file , since I am using gcc compiler.Do u think this might be the issue?

0046 # AIX platform(s)
0047 #
0048 jcompile.cc=gcc
0049 jcompile.cc.options=-fPIC -w -maix64
0050 jcompile.cpp=g++
0051 jcompile.cpp.options=-fPIC -w -maix64
0052 jcompile.ccslib=gcc
0053 jcompile.ccslib.options=-shared -Wl,-brtl -maix64
0054 jcompile.ccexe=gcc
0055 jcompile.ccexe.options=-Wl,-brtl -maix64
0056 jcompile.ccjbc=gcc
0057 jcompile.ccjbc.options=-fPIC -w -maix64
0058 jcompile.output.file=-o
0059 jcompile.debug=-g
0060 jcompile.optimise=-O2
0061 jcompile.obj.extension=.o


Also I dont find prob with the jshow

jsh S260806 ~ -->jshow -c TEST11
Executable: /home/S260806/bnk/bnk.run/bin/TEST11.so
jBC main() version 11.0 Mon Nov 21 06:51:34 2011
jBC main() source file BADRI.BP
Executable (DUP!!): /home/S260806/bnk/bnk.run/bin/TEST11
jBC main() version 11.0 Mon Nov 21 06:51:34 2011
jBC main() source file BADRI.BP
jsh S260806 ~ -->

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 7 months ago #9530 by jpb
We use GNU compiler on SunOS [R08 and R12 with jBase], I can't tell you if your settings for AIX are correct.
I just remember that we also faced the seg.vio. error when these settings were incorrect.

We also use 64bit but the options you set (-maix64) are not included in our system.properties ??

Please Log in or Create an account to join the conversation.

  • badri.vijay
  • Visitor
  • Visitor
13 years 7 months ago #9531 by badri.vijay
Replied by badri.vijay on topic Re: jBASE: Segmentation violation. Aborting
Thanks. Actually the settings(-maix64) were given by Temenos for 64bit AIX. If that is taken off we get an error while cataloging.
Now I dont face any problems when compiling or cataloging the routine. Only when running the routine I get the problem of Segmentation violation.

Also I noticed one thing. I tried changing the stack size of the OS to 4194304 from shell prompt. But when I go the the jsh prompt in the same session, the stack size is going back to the old value. Not sure of the reason behind this.

$ ulimit -s 4194304
$ ulimit -a

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited

stack(kbytes) 4194304

memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited

$ jsh

jsh S260806 ~ -->ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 32768
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) unlimited
threads(per process) unlimited
processes(per user) unlimited
jsh S260806 ~ -->

Please Log in or Create an account to join the conversation.

  • jpb
  • jpb's Avatar
  • Offline
  • Moderator
  • Moderator
  • retired . . . ¯\_(ツ)_/¯
More
13 years 7 months ago #9532 by jpb
from man :
ulimit provides control over the resources available to the shell and to processes started by it, on systems that allow such control.


Try setting the stacksize in .profile to unlimited

Please Log in or Create an account to join the conversation.

  • badri.vijay
  • Visitor
  • Visitor
13 years 7 months ago #9533 by badri.vijay
Replied by badri.vijay on topic Re: jBASE: Segmentation violation. Aborting
Tried including in .profile. Still not working. Stack size remains the same.. I guess the problem could be with the GCC compiler that I am using. I wil try installing the XLC/C++ compiler which is the prescribed one and let you know if it works.

Thanks a lot for your help.

Please Log in or Create an account to join the conversation.

More
7 years 6 months ago #21526 by rizkiisroi
Replied by rizkiisroi on topic Re: jBASE: Segmentation violation. Aborting
Is there any fixed solution for this problem?
I face similar issue on IBM AIX environment

Error message was like this:

jBASE: Unable to allocate 107985074 bytes, errno = 12, at jlibECOMPLEX.c:163
jBASE: Segmentation violation. Aborting
.profile[137]: 15859840 IOT/Abort trap(coredump)

Please Log in or Create an account to join the conversation.

Time to create page: 0.051 seconds