Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging a Java bus error




On Sep 22, 2008, at 11:40 AM, Bill Janssen wrote:

I'm running an image-processing program on OS X 10.5.4 on Intel (Core 2
Duo), Java 5, 32-bit client JVM, with lots of RAM, and am getting a bus
error from Java. Here's the end of a log file that shows -verbose:gc
along with the stack trace:

[snip]

java(69146,0xb0801000) malloc: *** mmap(size=33660928) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
Invalid memory access of location 00000018 eip=6a5655a2


I've run this under gdb, but there are no symbols in the Apple Java, so
the trace is pretty much uninformative. I'm looking for tips and tricks
for finding out what's causing this. I'm running with -Xmx1500m, as well.

Malloc's debugging printfs are helpful here.

- The malloc implementation tried to mmap a ~32 megabyte block of MAP_ANON|MAP_PRIVATE pages.
- This failed with ENOMEM (error code=12), and malloc returned NULL.
- Most likely, Java (or a library it uses) attempted to dereference the returned NULL pointer (address 0x18) and crashed.


From the mmap man page:
[ENOMEM] MAP_FIXED is specified and the address range specified exceeds the address space limit for the process.
[ENOMEM] MAP_FIXED is specified and the address specified by the addr parameter isn't available.
[ENOMEM] MAP_ANON is specified and insufficient memory is available.


-landonf

Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >Re: how to read images fast with Apple Java? (From: Greg Guerin <email@hidden>)
 >Debugging a Java bus error (From: Bill Janssen <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.