I would like to ask if this is jBASE software bug or problem is caused
by other source (fe. user's limits):
jsh sandie ~ -->SELECT REALLY.BIG.(DISTRIBUTED).FILE BY @ID
jBASE: Unable to allocate 114439047 bytes, errno = 12 at
jlibBStore.c,347(ENQRUN
.b,995)
Program 'SELECT' at pid 1802262 - Memory error
Program source name ENQRUN.b , line 995
Memory fault(coredump)
REALLY.BIG.DISTRIBUTED file does not neccesarilly have to be
distributed to encounter this problem. Even when it is normal 2GB less
jBASE file (over 2000000 records) I got the same result. Does anybody
know SELECT limitations? I am not aware of them, so please let me know.
Here are some server's / user data:
jsh sandie ~ -->ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 32768
memory(kbytes) unlimited
coredump(blocks) 2097151
nofiles(descriptors) 2000
jsh sandie ~ -->jdiag
jdiag - jBASE diagnostic '$Revision: 1.12 $'
System Information
==================
System : AIX server1 1.5 0053C6DA4C00
OS Release : 5.1.0.0
UNIX User : MIGTEST (uid 507, euid 507)
Tty name : /dev/pts/17
Time : Fri May 6 11:58:11 2005
Environment
===========
JBCRELEASEDIR : '/usr/jbc'
JBCGLOBALDIR : '/usr/jbc'
HOME : '/PATH/bnk/bnk.run'
JEDIFILEPATH : '/PATH/bnk/bnk.run'
JEDIFILENAME_MD : '/PATH/bnk/bnk.run/VOC'
JEDIFILENAME_SYSTEM : '/jbase'
JBCBASETMP : '/PATH/bnk/bnk.run/jBASEWORK/tmp_2383960'
JBCNOINTERNAL : Not Set
JEDI_NOSHMEM : '1'
RELEASE Information : Major 4.0 , Minor 5 , Patch 0215
Spooler dir (JBCSPOOLERDIR) : '/jbase/jspooler'
JBCEMULATE : 'prime'
Object path (JBCOBJECTLIST) :
'/PATH/bnk/bnk.run/globuspatchlib:/PATH/bnk/bnk.run/lib:/PATH/bnk/bnk.run/globuslib'
Program dir (JBCDEV_BIN) : '/PATH/bnk/bnk.run/bin'
Subroutine dir (JBCDEV_LIB) : '/PATH/bnk/bnk.run/lib'
There are No warnings, jBASE seems to be loaded correctly
Regards
Pawel
Thanks for quick reply Greg. Just before moment I have learned new
usefull AIX command - lsconf. At the end of this email you can find
command's output.
I think I have clearly understood your email. Please notice that my AIX
server is running in 64bit kernel mode. So 1GB heap memory limit is not
the case (check also server's statistics - there is plenty of free
memory). Again I am asking - is it jBASE's software bug? I produced
list of IDs for mentioned table using SELECT/READNEXT jBASIC statements
(program went fine). Whole list of IDs takes approx. 80 MB (IDs were
saved to file in separate lines).
Why simple SELECT consumes so much memory? Why did it crash? Has anyone
of you encountered similar problem? Any other ideas?
jsh sandie ~ -->lsconf
System Model: IBM,7028-6C4
Machine Serial Number: 653C6DA
Processor Type: PowerPC_POWER4
Number Of Processors: 4
Processor Clock Speed: 1000 MHz
CPU Type: 64-bit
Kernel Type: 64-bit
LPAR Info: 1 NULL
Memory Size: 16384 MB
Good Memory Size: 16384 MB
Firmware Version: IBM,RR020815_srv1
Console Login: enable
Auto Restart: true
Full Core: false
Network Information
Host Name: server1
IP Address: xxx.xxx.xxx.xxx
Sub Netmask: xxx.xxx.xxx.xxx
Gateway: xxx.xxx.xxx.xxx
Name Server:
Domain Name:
Paging Space Information
Total Paging Space: 3840MB
Percent Used: 1%
Volume Groups Information
==============================================================================
rootvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk0 active 542 2
00..00..00..00..02
==============================================================================
localvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk7 active 271 20
00..00..00..00..20
hdisk8 active 546 5
00..00..05..00..00
hdisk9 active 546 6
00..00..06..00..00
==============================================================================
hsgvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk13 active 203 2
00..00..00..00..02
hdisk6 active 203 2
00..00..00..00..02
==============================================================================
hsgnewvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE
DISTRIBUTION
hdisk11 active 677 16
00..00..00..00..16
hdisk14 active 677 16
00..00..00..00..16
==============================================================================
INSTALLED RESOURCE LIST
The following resources are installed on the machine.
+/- = Added or deleted from Resource List.
* = Diagnostic support not available.
Model Architecture: chrp
Model Implementation: Multiple Processor, PCI bus
+ sys0 00-00 System Object
+ sysplanar0 00-00 System Planar
+ mem0 00-00 Memory
+ proc0 00-00 Processor
+ L2cache0 00-00 L2 Cache
+ proc1 00-01 Processor
+ proc2 00-02 Processor
+ proc3 00-03 Processor
* pci0 00-400000000110 PCI Bus
* isa0 1G-18 ISA Bus
+ fda0 01-D1 Standard I/O Diskette Adapter
* siokma0 01-K1 Keyboard/Mouse Adapter
+ sioka0 01-K1-00 Keyboard Adapter
+ sioma0 01-K1-01 Mouse Adapter
+ ppa0 01-R1 CHRP IEEE1284 (ECP) Parallel Port
Adapter
+ sa0 01-S1 Standard I/O Serial Port
+ tty0 01-S1-00-00 Asynchronous Terminal
+ sa1 01-S2 Standard I/O Serial Port
+ sa2 01-S3 Standard I/O Serial Port
* ide0 1G-19 ATA/IDE Controller Device
+ cd0 1G-19-00 IDE CD-ROM Drive I (650 MB)
* pci2 1G-10 PCI Bus
* scsi4 1H-08 Cambex Fibre Channel I/O
Controller
* hdisk1 1H-08-00-1,0 Compaq HSV110 Enterprise Virtual
Array
* hdisk2 1H-08-00-2,0 Compaq HSV110 Enterprise Virtual
Array
* hdisk5 1H-08-00-3,0 DEC HSG80 Command Console LUN
* hdisk6 1H-08-00-3,7 DEC HSG80 RAID Array
* hdisk10 1H-08-00-5,0 DEC HSG80 Command Console LUN
* hdisk11 1H-08-00-5,1 DEC HSG80 RAID Array
* hdisk14 1H-08-00-5,2 DEC HSG80 RAID Array
* pci3 1G-12 PCI Bus
+ ent0 1L-08 10/100 Mbps Ethernet PCI Adapter
II
(1410ff01)
* pci4 1G-14 PCI Bus
+ scsi0 1S-08 Wide/Ultra-3 SCSI I/O Controller
+ hdisk0 1S-08-00-8,0 16 Bit LVD SCSI Disk Drive (36400
MB)
+ hdisk7 1S-08-00-9,0 16 Bit LVD SCSI Disk Drive (36400
MB)
+ hdisk8 1S-08-00-10,0 16 Bit LVD SCSI Disk Drive (73400
MB)
+ hdisk9 1S-08-00-11,0 16 Bit LVD SCSI Disk Drive (73400
MB)
* ses0 1S-08-00-15,0 SCSI Enclosure Services Device
+ scsi1 1S-09 Wide/Ultra-3 SCSI I/O Controller
* pci5 1G-16 PCI Bus
* pci1 00-400000000112 PCI Bus
* pci6 10-10 PCI Bus
+ scsi2 11-08 Wide/Ultra-3 SCSI I/O Controller
+ rmt0 11-08-00-0,0 SCSI 4mm Tape Drive (20480 MB)
+ scsi3 11-09 Wide/Ultra-3 SCSI I/O Controller
* pci7 10-12 PCI Bus
+ ent1 14-08 10/100 Mbps Ethernet PCI Adapter
II
(1410ff01)
* pci8 10-16 PCI Bus
* scsi5 1D-08 Cambex Fibre Channel I/O
Controller
* hdisk3 1D-08-00-1,0 Compaq HSV110 Enterprise Virtual
Array
* hdisk4 1D-08-00-2,0 Compaq HSV110 Enterprise Virtual
Array
* hdisk12 1D-08-00-3,0 DEC HSG80 Command Console LUN
* hdisk13 1D-08-00-3,6 DEC HSG80 RAID Array
* hdisk15 1D-08-00-5,0 DEC HSG80 Command Console LUN
Thanks in advance.
Regards
Pawel
From: Greg Cooper
[mailto:gr...@mcfatty.com]
Sent: Friday, May 06, 2005 4:32 AM
To: jB...@googlegroups.com
Subject: Re: SELECT limitations
I can't give you an exact value I'm afraid, but the numbers go something like this.
The SELECT uses normal OS heap space to do it's work. On 32 bit systems the limit for heaps space is approximately 1Gb per process. This is a hardware limitation of 32 bit virtual memory operating systems and will apply regardless of what your ulimit settings are, or how much real memory you have installed, or how much swap space you have configured etc.
zzzzzzzzzzzzZZZZZZZZZZZ all true of course, however perhaps the issue is that what is being done probably exceeds reasonable performance expectations even if it did not blow up.
jsh sandie ~ -->SELECT REALLY.BIG.(DISTRIBUTED).FILE BY @ID
jBASE: Unable to allocate 114439047 bytes, errno = 12 at
jlibBStore.c,347(ENQRUN
.b,995)
Program 'SELECT' at pid 1802262 - Memory error
Program source name ENQRUN.b , line 995
Memory fault(coredump)
This is possibly being caused by the sort part of it (which you could verify by removing the BY clause). If they need to have the ID in sorted order, then an index may circumvent the issue. Create a single valued index on the ID, then use KEY-SELECT. The index overhead should be minimal once it is created.
Now, why do they wish to sort by the Item ID?
Jim
Sandie,
Any replies to my questions yet?
I have made test and everything went fine (as you can see memory
management is a little bit worse than in Linux). You can find test
output at the end of this email.
I think, that you have correctly suggested that jBASE programs are not
64bit ones. I am not sure now how can I verify this parameter. "file"
command says nothing about kind of executable - "/usr/jbc/bin/SELECT:
executable (RISC System/6000) or object module".
Regards
Pawel
PS. I was absent on Monday - sorry for discussion delay.
jsh sandie ~ -->testprog
list size 4099999 , number keys 100,000
240801 A 442 778378 1327122 25 72 20 47511400 13588
pts/36 0:00 testprog
[...output has been partially cut off...]
240801 A 442 778378 1327122 60 90 20 47511400 140140
pts/36 0:09 testprog
list size 77899999 , number keys 1,900,000
240801 A 442 778378 1327122 114 117 20 47511400 144144
pts/36 0:09 testprog
list size 81999999 , number keys 2,000,000
240801 A 442 778378 1327122 83 101 20 47511400 148148
pts/36 0:11 testprog
240801 A 442 778378 1327122 90 105 20 47511400 148148
pts/36 0:11 testprog
jsh sandie ~ -->
As I have written I was absent till Monday. Below you can find my
answers.
Sometimes you are made to use "bought", closed-source code and you can
do nothing with that (you can just complain or ask about changes).
Simple SELECT BY @ID was used only to show the problem. I could use
even simpler SELECT, but I have noticed that SELECT BY @ID crashes
"faster".
I know there is rather no need to use such SELECTs in production
environment, but I try to asses chances that production, maily
closed-source code will fail. If jBASE external SELECT's are unstable
for large files I can not sleep well. I think you can agree with me?
SELECT/READNEXT commands works well for us, but what can we do with
plenty of "black-boxes"? My answer is nothing :(
I should notice (I did not want to, now I have to) that we are using
jBASE shipped with one Temenos banking application. I remember some
strange issues with this jBASE release; for example: compiler's
national characters enconding problem, strange versioning (jBASE
reports itself as 4.1) and others. I think all these "strange" issues
might have been solved already, but our jBASE version is frozen. Our
management staff (I support them here) will not agree to exchange
jBASE's release on production system without testing.
So Jim what can you advise us? Do not you think that production code
that is released by jBASE should not end with coredumps? What can we do
now? Normally users enters some selection criteria to our SELECTs, but
data growth is so amazing, that I wonder when SELECT will crash.
Waiting for reply :)
Regards
Pawel
PS. I will make sure if jBASE code is 32bit. Maybe one of you can point
me to proper command?
Thanks for the advice. Sometimes I wonder if they treat specifically
their customers ;) Should not they send important issues/patches to
their customers? They do, but as far as I know partially. Patches come
only to banking application. I have never heard of jBASE patch (I have
limited informations :)). I bet (sorry for that) that publicly
available jBASE code is far better tested that one (specific) we own.
Jim, do you think is it our specific jBASE issue?
Regards
Pawel
PS. I like Temenos people (I know few of them personally), but rather
dislike Temenos "customer care" policy.
First of all I would like to explain jBASE versioning. According to the
informations I got on jBASE Techlist some time ago (about 2003-08-09,
thread entitled "Temenos & JBase") it seems to me that our jBASE
version (bundled with Temenos banking product) is indepedently numbered
than regular jBASE. Group members told me that time, that our "4.0.6.2"
is not truly 4th one - it is (specially modified) 3.xx (that time
regular 4.xx was just expected, not available).
Sorry for telling you that we are using so called "4.1". It is in fact
"4.0.5.3" (I mean "3.xx" publicly available). I wrote version
information from memory and I made a little mistake. To be accurate -
jDiag presents our jBASE version as "Major 4.0 , Minor 5 , Patch 0215".
So Jim, do you know is this bug (?) was discovered in 3.xx? Maybe it
has been fixed years ago and we have unpatched jBASE release? I will
try to check jBASE's 3.xx patch log (if there is any).
I would like also to mention that I have searched jBASE Techlist
archives. I have found my old email there :) - see
http://listserver.jbase.com/mailman/htdig/tech/2003/001309.html. Bruce
Willmore advised us to increase kernel's Shared Memory size. I do not
know AIX kernel details at all, but I will push admins to read more
about AIX kernel (maybe it is ). Is it possibility that coredumps occur
because of this setting? (I do not think so) I think we have never
touched such parameter.
Regards
Pawel
hth
Mike