

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
13 messages in net.java.dev.jna.usersRe: [jna-users] JNA crashes on large ...| From | Sent On | Attachments |
|---|---|---|
| Stas Oskin | Sep 15, 2008 9:42 am | |
| Timothy Wall | Sep 15, 2008 10:57 am | |
| Stas Oskin | Sep 15, 2008 1:00 pm | |
| Stas Oskin | Sep 15, 2008 1:11 pm | |
| Timothy Wall | Sep 15, 2008 1:17 pm | |
| Stas Oskin | Sep 16, 2008 4:16 am | |
| Timothy Wall | Sep 16, 2008 5:18 am | |
| Stas Oskin | Sep 16, 2008 7:08 am | |
| Timothy Wall | Sep 16, 2008 7:20 am | |
| Stas Oskin | Sep 17, 2008 4:45 am | |
| Timothy Wall | Sep 17, 2008 5:32 am | |
| Stas Oskin | Sep 17, 2008 7:31 am | |
| Timothy Wall | Sep 17, 2008 7:38 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [jna-users] JNA crashes on large number of threads | Actions... |
|---|---|---|
| From: | Timothy Wall (twal...@dev.java.net) | |
| Date: | Sep 15, 2008 1:17:51 pm | |
| List: | net.java.dev.jna.users | |
Likely that the pointer for the structure is no longer valid. You can print the value (Structure.getPointer()) to see if it looks obviously corrupt. Is the structure allocated by native code, or by Java code? If the former, are you certain the memory hasn't been freed?
Odd that setProtected(true) didn't prevent the crash, although it just uses signal handlers, so it's possible its handler got replaced.
On Sep 15, 2008, at 4:11 PM, Stas Oskin wrote:
Hi again.
I actually figured out to check the logs, and the stack trace was indeed there:
C [jna8479.tmp+0x8072] Java_com_sun_jna_Pointer__1getInt+0x74 J com.sun.jna.Pointer._getInt(J)I
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) J com.sun.jna.Pointer._getInt(J)I J com.sun.jna.Structure.readValue(ILjava/lang/Class;Ljava/lang/ Object;)Ljava/lang/Object; J com.sun.jna.Structure.read()V J org.update.threads.ReadDataThread.run()V v ~BufferBlob::StubRoutines (1)
Any idea - seems as the structure wasn't read?
2008/9/15 Stas Oskin <stas...@gmail.com> Hi.
I tried enabling the setProtected before, and it didn't help - the app always crashed. I do recall that it was due to some possible issues in the native code, so it worth trying again.
If it does not work - what other means I have to track the issue? Is there any way at all to get core dumps and check them?
Also, by meaning the who owns the pointer, you mean that somewhere I'm trying to access invalid int pointer?
Regards.
2008/9/15 Timothy Wall <twal...@dev.java.net>
Do you have any more stack? If not, if you run with - Djna.protected=true (or Native.setProtected(true)), the SEGV should throw a java.lang.Error instead of crashing.
You'll need to determine who owns the pointer value being used and how it got to be invalid (if it's really failing in Pointer.getInt).
On Sep 15, 2008, at 12:42 PM, Stas Oskin wrote:
Hi.
I'm trying to hunt an issue of JNA sporadically crashing after working some time normally, with a high number of concurrent threads (40+). The problem seems to be within JNA, as the log shows:
# # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002aaad6a3b072, pid=9698, tid=1187899712 # # Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0-b23 mixed mode linux-amd64) # Problematic frame: # C [jna8479.tmp+0x8072] Java_com_sun_jna_Pointer__1getInt+0x74 # # An error report file with more information is saved as: # /JavaCore/hs_err_pid9698.log # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Aborted
Any idea how I can hunt for this one, or how this crash could be prevented at all?
Regards.







