13 messages in net.java.dev.jna.usersRe: [jna-users] JNA crashes on large ...
FromSent OnAttachments
Stas OskinSep 15, 2008 9:42 am 
Timothy WallSep 15, 2008 10:57 am 
Stas OskinSep 15, 2008 1:00 pm 
Stas OskinSep 15, 2008 1:11 pm 
Timothy WallSep 15, 2008 1:17 pm 
Stas OskinSep 16, 2008 4:16 am 
Timothy WallSep 16, 2008 5:18 am 
Stas OskinSep 16, 2008 7:08 am 
Timothy WallSep 16, 2008 7:20 am 
Stas OskinSep 17, 2008 4:45 am 
Timothy WallSep 17, 2008 5:32 am 
Stas OskinSep 17, 2008 7:31 am 
Timothy WallSep 17, 2008 7:38 am 
Actions with this message:
Paste this link in email or IM:
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 threadsActions...
From:Stas Oskin (stas@gmail.com)
Date:Sep 17, 2008 4:45:29 am
List:net.java.dev.jna.users

Hi.

My answers:

JNA sets and restores SIGSEGV/SIGBUS handlers around "dangerous" code, but "signal" is not necessarily multi-thread safe.

Why then the immediate SEGFAULT? It runs fine without it.

I do initiate a shutdown hook in Java, could this be related? Additionally, I have signal handlers in the native app, but they shouldn't interrupt (as it's external).

Where and when do they get set up? Are they set up for SEGV/BUS?

The external app sets these signals on start-up: SIGTERM, SIGUSR1 and SIGUSR2.

My first guess would be that the memory pointed to by the structure you're reading is no longer (or never was) valid. I'd pursue that line of thought.

Point is, that the structure is allocated by native app who's keep running even after the Java has crashed. I can even bring the Java app back and would continue running, until the next crash.

Regards.