Jump to content
Excelsior Forums

KarelKyovsky

Members
  • Content count

    0
  • Joined

  • Last visited

Community Reputation

0 Neutral

About KarelKyovsky

  • Rank
    Newbie
  1. write calls inside JNI interrupted by Linux JET?

    "resistance to SA_RESTART flag" is fact that application will not misbehave (will write correct number of bytes) when it receives SA_RESTART flag in signal. I would like to know how can i send in automated way multiple number of signals to my application that will check correct handling of write interruption.
  2. write calls inside JNI interrupted by Linux JET?

    Can you recommend me a way how can i stress test my application's resistance to SA_RESTART flag? Can i test it somehow by sending a signal to JVM process using kill utility?
  3. write calls inside JNI interrupted by Linux JET?

    This is it? This is the answer? I need more information on this issue, than this statement. Please tell me which signal causes this behavior, SIG35? To which feature is this signal linked? GC or something different? What other calls apart from write can be interrupted? Can you refer me to some documentation? How do you recommend us to fix/workaround 3rd party JNI libs for which we will never have the source code? Thank you
  4. write calls inside JNI interrupted by Linux JET?

    Thanks for your post, waiting for more information.
  5. write calls inside JNI interrupted by Linux JET?

    Just to give more detailed information. This is the original SerialImpl.c code in RXTX-2.2pre2 that has the issue when running with JET: do { result=write (fd, (void * ) ((char *) body + total + offset), count - total); if(result >0){ total += result; } } while ( ( total < count ) && (result < 0 && errno==EINTR ) ); And this is my fix that contains JET workaround: do { result=write (fd, (void * ) ((char *) body + total + offset), count - total); if(result >0){ total += result; } } while ( ( result > 0 && total < count ) || (result < 0 && errno==EINTR ) );
  6. write calls inside JNI interrupted by Linux JET?

    1) Linux Ubuntu 8.04 32bit PAE Kernel 2.6.24-32-generic #1 SMP Tue Sep 4 18:28:08 CEST 2012 i686 GNU/Linux 2) JET 7.60mp5: java version "1.6.0_37" Java 2 Runtime Environment, Standard Edition Excelsior JET 7.60 JET Profile [1.6.0_37 (binary compatibility level 30)] Runtime: Desktop [sMP: yes, optimizations: enabled] 3) java version "1.6.0_07" Java SE Runtime Environment (build 1.6.0_07-b06) Java HotSpot Server VM (build 10.0-b23, mixed mode) 4) Currently I don't have application which is not HW dependent to be able to send it to you. I noticed this behavior when using RXTX-2.2pre2 JNI library when i'm sending large bitmaps on the printer's serial port. write(new byte[70000]) on serial port OutputStream. I fixed the RXTX library sources to accommodate with described JET's behavior (not all writes are performed fully), but it took me lots of time of debugging and i would like to know why there is this difference between JET and SunJVM.
  7. Hi, When i'm calling: int len_written = write(fd,char* bytes, int count); In JNI library where fd is ie. serial port (/dev/ttyS0) file descriptor than not always count == len_written. This behavior doesn't appear when i'm using Sun JVM. Perhaps Linux JET is firing some signals that interrupt write call? Can you please check root cause of this behavior difference? Thank you, Karel Kyovsky
×