[Rxtx] Port Locking / JVM Crashing

Kharbanda, Pawan Pawan.Kharbanda at dot.state.co.us
Sat Aug 5 13:31:44 MDT 2006


Trent, 
 I am able to constantly replicate almost everytime even when I have
locks disabled. Don't know the reason why you are not able to on your
environment. Any suggestions??????? 


Cycle No (Thread ::: /dev/cuf04) ::::::: 7
Cycle No (Thread ::: /dev/cuf01) ::::::: 7
Cycle No (Thread ::: /dev/cuf02) ::::::: 7
RXTXCommDriver:getCommPort(/dev/cuf01,1)
RXTXCommDriver:getCommPort(/dev/cuf04,1)
RXTXCommDriver:getCommPort(/dev/cuf02,1)
Exiting Thread ::: /dev/cuf03
Cycle No (Thread ::: /dev/cuf03) ::::::: 7
RXTXCommDriver:getCommPort(/dev/cuf03,1)
Exiting Thread ::: /dev/cub01
Cycle No (Thread ::: /dev/cub01) ::::::: 7
RXTXCommDriver:getCommPort(/dev/cub01,1)
Port /dev/cuf02 is Opened
0x01 Sent
Port /dev/cuf04 is Opened
Port /dev/cuf03 is Opened
0x01 Sent
0x01 Sent
Port /dev/cuf01 is Opened
0x01 Sent
Port /dev/cub01 is Opened
0x01 Sent
Port /dev/cuf01 is Closed
Port /dev/cuf02 is Closed
Port /dev/cuf03 is Closed
Port /dev/cuf04 is Closed
Port /dev/cub01 is Closed
Exiting Thread ::: /dev/cuf03
Exiting Thread ::: /dev/cuf02
Cycle No (Thread ::: /dev/cuf03) ::::::: 8
Cycle No (Thread ::: /dev/cuf02) ::::::: 8
Exiting Thread ::: /dev/cuf04
Exiting Thread ::: /dev/cuf01
Cycle No (Thread ::: /dev/cuf01) ::::::: 8
Cycle No (Thread ::: /dev/cuf04) ::::::: 8
RXTXCommDriver:getCommPort(/dev/cuf01,1)
RXTXCommDriver:getCommPort(/dev/cuf04,1)
RXTXCommDriver:getCommPort(/dev/cuf02,1)
RXTXCommDriver:getCommPort(/dev/cuf03,1)
Exiting Thread ::: /dev/cub01
Cycle No (Thread ::: /dev/cub01) ::::::: 8
RXTXCommDriver:getCommPort(/dev/cub01,1)
Port /dev/cuf02 is Opened
0x01 Sent
Port /dev/cuf04 is Opened
0x01 Sent
Port /dev/cuf01 is Opened
Port /dev/cuf03 is Opened
0x01 Sent
0x01 Sent
#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  SIGSEGV (0xb) at pc=0xb75e3962, pid=21386, tid=2367155120
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_06-b05 mixed mode)
# Problematic frame:
# C  [librxtxSerial.so+0x6962]  initialise_event_info_struct+0x66
#
# An error report file with more information is saved as
hs_err_pid21386.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Aborted

-----Original Message-----
From: Trent Jarvi [mailto:tjarvi at qbang.org] 
Sent: Saturday, August 05, 2006 1:19 PM
To: Kharbanda, Pawan
Cc: Trent Jarvi; RXTX Developers and Users
Subject: RE: Port Locking / JVM Crashing


Lockfiles are a compile time option.  I've turned them on now, corrected
a mistake resulting in only 3 ports being used and now have it going
through a few hundred iterations again without a crash.

To disable lockfiles..

./configure --disable-lockfiles && make install

Port /dev/ttyS5 is Opened
0x01 Sent
Port /dev/ttyS0 is Closed
Port /dev/ttyS5 is Closed
Exiting Thread ::: /dev/ttyS1
Cycle No (Thread ::: /dev/ttyS1) ::::::: 310 Exiting Thread :::
/dev/ttyS4 Cycle No (Thread ::: /dev/ttyS4) ::::::: 310 Exiting Thread
::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 310 Exiting
Thread ::: /dev/ttyS5 Cycle No (Thread ::: /dev/ttyS5) ::::::: 310 Port
/dev/ttyS1 is Opened
0x01 Sent
Port /dev/ttyS4 is Opened
0x01 Sent
Port /dev/ttyS0 is Opened
0x01 Sent
Port /dev/ttyS1 is Closed
Port /dev/ttyS4 is Closed
Port /dev/ttyS5 is Opened
0x01 Sent
Port /dev/ttyS0 is Closed




On Sat, 5 Aug 2006, Kharbanda, Pawan wrote:

> Trent, How can you turn off the lock files? I can try using that. I 
> never tried that, I thought you can't turn off the file locking.
> ~pk
>
> -----Original Message-----
> From: Trent Jarvi [mailto:tjarvi at qbang.org]
> Sent: Saturday, August 05, 2006 1:06 PM
> To: Kharbanda, Pawan
> Cc: Trent Jarvi; RXTX Developers and Users
> Subject: RE: Port Locking / JVM Crashing
>
>
> You may try 4 ports instead of 5 to make sure thats not the issue.
>
> SuSE Linux 9.3 (x86-64) - Kernel 2.6.11.4-20a-smp (20) 
> 2.6.11.4-20a-smp
> #1 SMP Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux 
> java -version java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) 
> Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_06-b05, mixed mode)
>
> I'm using rxtx 2.1-7 (final) with default configuration except 
> lockfiles are disabled.  I gathered that you are doing your own
resource locking.
>
> ...
> Port /dev/ttyS1 is Closed
> Port /dev/ttyS0 is Closed
> Exiting Thread ::: /dev/ttyS4
> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1879 Exiting Thread :::
> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1879 Exiting 
> Thread
> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1879 Port
> /dev/ttyS4 is Opened
> 0x01 Sent
> Port /dev/ttyS1 is Opened
> 0x01 Sent
> Port /dev/ttyS0 is Opened
> 0x01 Sent
> Port /dev/ttyS4 is Closed
> Port /dev/ttyS1 is Closed
> Port /dev/ttyS0 is Closed
> Exiting Thread ::: /dev/ttyS4
> Cycle No (Thread ::: /dev/ttyS4) ::::::: 1880 Exiting Thread :::
> /dev/ttyS1 Cycle No (Thread ::: /dev/ttyS1) ::::::: 1880 Exiting 
> Thread
> ::: /dev/ttyS0 Cycle No (Thread ::: /dev/ttyS0) ::::::: 1880 Port
> /dev/ttyS4 is Opened
> 0x01 Sent
> Port /dev/ttyS1 is Opened
> 0x01 Sent
> Port /dev/ttyS0 is Opened
> 0x01 Sent
> ...
>
>
> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote:
>
>> Trent, I have 5 ports of Digi and I can reproduce almost every time.
>> Hhmm Interesting .. I am using JDK 1.5.0_06 and 2.1.7 (final) RXTX 
>> version
>>
>> -----Original Message-----
>> From: Trent Jarvi [mailto:tjarvi at qbang.org]
>> Sent: Saturday, August 05, 2006 12:52 PM
>> To: Kharbanda, Pawan
>> Cc: Trent Jarvi; RXTX Developers and Users
>> Subject: RE: Port Locking / JVM Crashing
>>
>>
>> Whats a few times?  I've got 4 ports here and have run it a few 
>> thousand iterations.
>>
>> Is that true for you if you run it with just four of your DIGI ports?
>>
>> On Sat, 5 Aug 2006, Kharbanda, Pawan wrote:
>>
>>> You need to run it few times. More the number of ports, more 
>>> frequently you can reproduce. With just 2 ports it will be hard to 
>>> reproduce frequently.
>>>
>>> ~pk
>>>
>>> -----Original Message-----
>>> From: Trent Jarvi [mailto:tjarvi at qbang.org]
>>> Sent: Saturday, August 05, 2006 12:33 PM
>>> To: Kharbanda, Pawan
>>> Cc: tjarvi at qbang.org; RXTX Developers and Users
>>> Subject: Re: Port Locking / JVM Crashing
>>>
>>>> I am also attaching a Test Class to replicate the problem. You need

>>>> to
>>>
>>>> modify the class and add your systems Serial ports into the code 
>>>> and
>
>>>> execute.
>>>>
>>>> java TestOpenClosePort 100
>>>>
>>>> It will open and close all the serial ports 100 times in there own 
>>>> thread.
>>>>
>>>> Please let me know, I will be available thru out this weekend and 
>>>> can
>>
>>>> help you as much as I can with testing.
>>>>
>>>
>>> How reproducable is the problem with the above testcase?  I'm 
>>> running
>
>>> 100's of iterations without reproducing the problem.
>>>
>>> --
>>> Trent Jarvi
>>> tjarvi at qbang.org
>>>
>>
>




More information about the Rxtx mailing list