[Starkit] FreeBSD core dumps when wrapping big files! - SOLVED!

Joey Mukherjee joey at swri.edu
Wed Dec 20 12:04:30 CET 2006


Well, sort of...

To fix the problem, I added:

kern.maxdsiz=2147483648
kern.maxssiz=2147483648

to my /boot/loader.conf file and rebooted.

In case you care, some background on what is happening when TclKit  
cores:

The Tcl is the tclStringObj.c where it is trying to append a unicode  
string to the end of the unicode string.  It has just realloc'ed the  
string to our magical 67108864 number, and is attempting to write to  
the end of the string.  The code in question is :

     memcpy ((VOID *) (stringPtr->unicode + stringPtr->numChars),  
unicode,
             appendNumChars * sizeof(Tcl_UniChar));

Since the stringPtr is malloc'ed so large, when it does the write, it  
is writing out of bounds of the allocated data size since that is  
larger than FreeBSD allows on a standard install.  Or maybe, FreeBSD  
allocated this in separate areas and doesn't like to be addressed  
linearly.  These are just my guesses.  I have no idea what its doing...

You can tell if you have the problem if you type in limit and you see  
a datasize of 524288k and a stacksize of 65536k.   Now when I run  
limit, I see:

 > limit
cputime      unlimited
filesize     unlimited
datasize     2097152 kbytes
stacksize    2097152 kbytes
coredumpsize unlimited
memoryuse    unlimited
vmemoryuse   unlimited
descriptors  11095
memorylocked unlimited
maxproc      5547
sbsize       unlimited

Anyway, I have now successfully bundled a large file on FreeBSD!

Thanks to all who helped!

Joey


More information about the Starkit mailing list