- Forum
- T24 Technical Discussions
- T24 Development & Customization
- jBASE: Segmentation violation. Aborting
jBASE: Segmentation violation. Aborting
- N_arya_N
- Topic Author
- Offline
- New Member
-
- Posts: 11
- Thank you received: 0
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
-
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
CUS = "10000001"
?
Please Log in or Create an account to join the conversation.
- N_arya_N
- Topic Author
- Offline
- New Member
-
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
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
-
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
-
jBASE: Segmentation violation. Aborting
.profile[2]: 10551370 Abort(coredump)
$
Please Log in or Create an account to join the conversation.
- jpb
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
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
-
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
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
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
-
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
-
- Offline
- Moderator
-
- retired . . . ¯\_(ツ)_/¯
- Posts: 2859
- Thank you received: 650
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
-
Thanks a lot for your help.
Please Log in or Create an account to join the conversation.
- rizkiisroi
-
- Offline
- New Member
-
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.
- Forum
- T24 Technical Discussions
- T24 Development & Customization
- jBASE: Segmentation violation. Aborting