[gecode-users] Bugs in Gecode/J

Malcolm Ryan malcolmr at cse.unsw.edu.au
Tue Apr 15 10:37:22 CEST 2008


I'm using whatever the standard Java is on Mac OSX 10.5. The version  
string shows:

java version "1.5.0_13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_13- 
b05-237)
Java HotSpot(TM) Client VM (build 1.5.0_13-119, mixed mode, sharing)

I'm in the process of compiling Gecode on another (linux) machine.  
I'll run it there and see what happens.

For very large problems it is crashing with the message:

java(2404,0xb0801000) malloc: *** mmap(size=65536) failed (error  
code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
terminate called after throwing an instance of 'Gecode::MemoryExhausted'
   what():  Memory: Heap memory exhausted

What determines the maximum heap size available to Gecode?

Malcolm

PS: I know it isn't your problem, but I've got a paper deadline in a  
week that I'm trying to make, and these crashes are standing between  
me and my experimental results. Any help you can offer would be  
gratefully accepted (and acknowledged).

On 15/04/2008, at 6:28 PM, Mikael Zayenz Lagerkvist wrote:
> Hi,
>
> That is strange. The error report is left in programs working
> directory (or a temporary directory, see below for the full
> explanation from Sun). I can only think of two reasons this would not
> happen
> 1) A bug in the JVM that makes it crash hard. No idea how to handle  
> this case
> 2) You are not using Suns JVM, in which case I don't know how to help
> you, since we don't support that.
>
> If you can distill a single file that I could try that gives the
> error, you could send it to me for testing.
>
> Cheers,
> Mikael
>
> hs_er_pid file location according to Sun:
>  Before 1.5, after a fatal error, JVM prints the error log to stdout  
> and then
>  saves the same information to an hs_err log file. By default, it is  
> saved in
>  current working directory; if for some reason the current directory  
> is not
>  writable the hs_err log is saved to the system temporary directory  
> (/tmp on
>  Solaris and Linux; or the result from GetTempPath() on Windows). If  
> there is
>  no temporary directory, JVM will not save the hs_err log (because  
> the same
>  information is already printed to stdout).
>
>  Since 1.5 because JVM prints a lot more information after crash, it  
> would be
>  too much for stdout. Instead, JVM only prints a brief message to  
> stdout and
>  detailed information is saved in hs_err log. Again, to determine  
> the location
>  for hs_err, JVM first tries current directory; if it's not  
> writable, JVM uses
>  temp directory; unlike 1.4.2, if temp directory is still not  
> usable, JVM will
>  print the detailed message to stdout.
>
>
> On Tue, Apr 15, 2008 at 10:14 AM, Malcolm Ryan <malcolmr at cse.unsw.edu.au 
> > wrote:
>> I can't find any such file. Where does it get left?
>>
>> Malcolm
>>
>>
>>
>> On 15/04/2008, at 4:07 PM, Mikael Zayenz Lagerkvist wrote:
>>> Hi,
>>>
>>> When the JVM crashes it leaves a file called hs_err_pid????.log
>>> (replace ???? by some string of numbers), which contains a lot of  
>>> very
>>> interesting information. In particular, it contains the current  
>>> stack
>>> of the JVM, as well as as much of the current native stack as
>>> possible. To debug what has happened, these are the files to look  
>>> at.
>>> If you need help with a particular error, then you should attach  
>>> such
>>> a file.
>>>
>>> Cheers,
>>> Mikael
>>>
>>> On Mon, Apr 14, 2008 at 11:01 AM, Malcolm Ryan <malcolmr at cse.unsw.edu.au
>>>> wrote:
>>>> My Gecode/J constraint program is occasionally crashing with the
>>>> message:
>>>>
>>>> pure virtual method called
>>>> terminate called without an active exception
>>>>
>>>> and occasionally with:
>>>>
>>>> Invalid memory access of location 00000000 eip=00000000
>>>>
>>>> I can't say for sure, but I don't think they are happening in my
>>>> code.
>>>> I'm having trouble tracking down where in the code this is  
>>>> happening
>>>> (as they are not proper Java exceptions and can't be caught). I  
>>>> added
>>>> some debug  printfs and the errors changed. Go figure.
>>>>
>>>> Any suggestions?
>>>>
>>>> Malcolm
>>>>
>>>> _______________________________________________
>>>> Gecode users mailing list
>>>> users at gecode.org
>>>> https://www.gecode.org/mailman/listinfo/gecode-users
>>>>
>>>
>>>
>>>
>>> --
>>> Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
>>
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>
>
>
>
> -- 
> Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/





More information about the gecode-users mailing list