[okl4-developer] How to deal with out of memory errors ? Test case using two oklinux cells.
Hugues Balp
hugues.balp at free.fr
Fri Dec 5 10:04:18 EST 2008
Dear all,
in order to try multiple oklinux cells on one system
I have cloned the cell "linux" into another one named "linux2"
so as to enable two different configurations and compilations
of OK linux, one per cell...
Then I have tried to build it from the sources of OKL4_3.0 with
the following command:
./tools/build.py machine=versatile project=examples pyfreeze=false
EXAMPLE=oklinux,oklinux2 LINUX_APPS=hello kdb_serial=True
TOOLCHAIN=gnu_arm_eabi_toolchain pistachio.TOOLCHAIN=gnu_arm_toolchain
--debug=pdb
The compilation is ok but elfweaver crashes because of an *out of
memory* error
detected by the memory allocator when trying to allocate the memory for
the second
ok_linux cell....
You can find here attached the elfweaver merge specification file
named two_oklinux_weaver_ko.xml
so as a log file ( named "two_oklinux_merge_ko.log.tgz" ) tracing the
scanned addresses
just before the crash obtained with some additional prints in method
Allocator::__simple_alloc().
The problem is to find the reason of such a failure even if I cannot
use the memory usage tool
simply because the image.elf file has not been created successfully...
I have seen in the elfweaver documentation the option "--ignore="
but don't know how to use it from
within the scripts build.py or elfweaver.py ... In case I add it to the
system arguments used in file build.py
like this: sys.argv.append("--ignore=ok_linux2",
then I get the following usage message and scons error:
usage: scons [OPTION] [TARGET] ...
SCons error: --ignore-errors option does not take a value.
In order to get some more informations on the required memory usage
for such test case on the versatile
platform I have build the cross-cell-demo example where only one oklinux
cell is used with an additionnal decrypt cell...
In that case the elf image is well created and I can look at the memory
usage thanks to memtests...
I join also to this post the corresponding weaver file and memory usage
reports, named resp. "one_oklinux_weaver.xml" and
"one_oklinux_memory_usage.txt".
When looking in this last file at the physical memory value we have
57344kB with 19358kB remaining...
Normaly the resources required by the two OK linux cells should be the
same because I have just clone the linux cell
without reconfiguring it by removing some devices etc...
My first reaction would be to try to increase "virtualy" the size of
the physical memory of the versatile platform
by editing the appropriate descriptor in order to "force" elfweaver to
merge the system without any error and
to be able to use the memory usage tool on the generated image.elf file....
The problem here is that I don't know where is located the default
physical memory value for the versatile platform
and if I can really increase this value and how... (just for a virtual
test)...
When looking in the sources for the value 57344 I found it in file
okl4_3.0/linux/kernel-2.6.24-v2/fs/cifs/README
as follows:
wsize default write size (default 57344) maximum wsize currently
allowed by CIFS is 57344 (fourteen 4096 byte pages)
So I suppose I cannot increase the physical value easily.
The solution to solve this out of memory error is probably to remove
all things that is not necessary for running the
two ok linux cells... The problem is that I am not sure of what to
remove and how to do that correctly.
To sum up, I wonder simply how to deal with out of memory errors ?
Other said, what is the best suited process to get rid of such
problems ?
Thanks in advance,
Hugues Balp.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two_oklinux_weaver.xml
Type: text/xml
Size: 4715 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20081205/80794032/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two_oklinux_merge_ko.log.tgz
Type: application/x-compressed-tar
Size: 4834 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20081205/80794032/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: one_oklinux_weaver.xml
Type: text/xml
Size: 4238 bytes
Desc: not available
Url : http://lists.okl4.org/pipermail/developer/attachments/20081205/80794032/attachment-0002.bin
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: one_oklinux_memory_usage.txt
Url: http://lists.okl4.org/pipermail/developer/attachments/20081205/80794032/attachment.txt
More information about the Developer
mailing list