[Rxtx] Port Locking / JVM Crashing

Andy Dalton andy.dalton at gmail.com
Thu Sep 7 11:12:57 MDT 2006


Greetings,

I've seen in the archives some recent discussion between Trent and
Pawan Kharbanda that looks like it's related to a problem I'm
experiencing.  I've downloaded and ran Pawan's test application and I
am able to reproduce the problem with my hardware pretty quickly (with
as little as 3 threads).  Here's the end snipit of what happened:

---------------------------------------------------------------------------------------------------------------------------

Cycle No (Thread ::: /dev/ttyUSB13) ::::::: 2
Exception in thread "Thread ::: /dev/ttyUSB13"
java.lang.NoClassDefFoundError: javax.comm/PortInUseException
        at javax.comm.RXTXPort.open(Native Method)
        at javax.comm.RXTXPort.<init>(RXTXPort.java:84)Exiting Thread
::: /dev/ttyUSB50
Cycle No (Thread ::: /dev/ttyUSB50) ::::::: 2
Exiting Thread ::: /dev/ttyUSB25
Cycle No (Thread ::: /dev/ttyUSB25) ::::::: 2

        at javax.comm.RXTXCommDriver.getCommPort(RXTXCommDriver.java:772)
        at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:343)
        at TestOpenClosePort$SerialThread.run(TestOpenClosePort.java:192)
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xaa30d73a, pid=1449, tid=2778098592
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_08-b03 mixed mode)
# Problematic frame:
# C  [librxtxSerial.so+0x773a]  initialise_event_info_struct+0x18a
#
# An error report file with more information is saved as hs_err_pid1449.log
Exiting Thread ::: /dev/ttyUSB12
Cycle No (Thread ::: /dev/ttyUSB12) ::::::: 2
Exiting Thread ::: /dev/ttyUSB29
Cycle No (Thread ::: /dev/ttyUSB29) ::::::: 2
Exiting Thread ::: /dev/ttyUSB64
Cycle No (Thread ::: /dev/ttyUSB64) ::::::: 2
Port /dev/ttyUSB1 is Opened
0x01 Sent
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

---------------------------------------------------------------------------------------------------------------------------

I'm working with rxtx-2.1-7pre17 to communicate with 80 FTDI USB
serial devices in Linux.  Currently I can be communicating with up to
8 different devices at the same time.  The problem is, I frequently
get the same SIGSEGV seen above:

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xa8b1673a, pid=20656, tid=2808978336
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_05-b05 mixed mode)
# Problematic frame:
# C  [librxtxSerial-2.1-7pre17.so+0x773a]  initialise_event_info_struct+0x18a
#
# An error report file with more information is saved as hs_err_pid20656.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

I've tried upgrading to rxtx-2.1-7r2; however, I can't seem to get
that version to work at all with my existing software.  Here's some
information related to my setup:

$ java -version
java version "1.5.0_08"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode)

$ uname -a
Linux nestbed 2.6.17-gentoo-r7 #1 SMP Sat Sep 2 03:55:06 EDT 2006 i686
Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux

$ grep VERSION /usr/src/linux/drivers/usb/serial/ftdi_sio.c
#define DRIVER_VERSION "v1.4.3"

If there's any additional information I might be able to provide,
please let me know.

Thanks in advance for your time as assistance.

Andy



More information about the Rxtx mailing list