On Fri, 2 Apr 1999, Sandeep Malhotra wrote:

> Hi,

Alas, it is much more difficult to track down bugs in Tcl Blend
when compared to Jacl but there are still ways. First off, you
need to create a small example of your code that crashes under
Tcl Blend but works under Jacl. There is no easy way to do this,
it is different for every type of bug that needs to be tracked down.
You should check to see if the problem is related to the JIT compiler.
You can test this by setting the java.compiler property to ""
(use the tclblend_init variable before doing the "package require java").
If you know this is not a jit problem then you should try to trace
each method call to see where the crash is. I think there is a -Xdebug
kind of option you can pass to JDK1.2 to do this. You might also want
to try building a debug version of Tcl Blend. To do this with Tcl Blend
1.2 you simply compile Tcl with the --enable-debug flag and Tcl Blend
will automatically compile with debug symbols. You should also switch
your Tcl version to 8.0.5 as 8.0.3 has a strange problem that caused
crashes (I am not sure if it is related). The other thing you should
try is running under Jacl with native threads (I assume you are using
the default green threads java when running Jacl). The configure
script should put the -native option in your jaclsh startup script
which is installed when you type "make install", but you can also
run Jacl under native threads like so "java -native tcl.lang.Shell".

> I have a java (JDK 1.2) application that uses multiple threads.
> The application runs really well Jacl (version 1.2.2). However, 
> when I run the same application using TclBlend (version 1.2.2),
> it runs OK sometimes, but about 60% of the time it either core dumps
> (segmentation voilation) or results in an NullPointerException.
> 
> I am running this on Solaris 2.5.1, using Tcl 8.0.3 and JDK1.2fcs
> classic as the Java VM. I used the native threads (libhpi.so)
> when compiling TclBlend.
> 
> Anyone dealt with applications with multiple threads and TclBlend?
> Any advice will be appreciated.
> 
> Thanks in advance.
> 
> Sandeep Malhotra
> (Nortel Networks)
> 
> -------------------------------------------------------------
> 
> Following is the text that I get at the TCL prompt for the 
> NullPointerException:
> 
> java.lang.NullPointerException
>         at bay.jets.Automat.demuxPacket(Compiled Code)
>         at bay.jets.Automat.run(Compiled Code)
>         at java.lang.Thread.run(Compiled Code)
> 
> -------------------------------------------------------------
> 
> Part of the screen dump for the core dump (segmentation voilation)
> is:
> 
> SIGSEGV   11*  segmentation violation
>     si_signo [11]: SIGSEGV   11*  segmentation violation
>     si_errno [0]: Error 0
>     si_code [1]: SEGV_MAPERR [addr: 0x0]
> 
>         stackpointer=e9b052d4
> 
> Full thread dump Classic VM (JDK-1.2fcs-O, native threads):
>     "Timer" (TID:0xeb0bfcc8, sys_thread_t:0xa54e88, state:CW, native ID:0xf)
> prio=10
> .
> .
>      "Automat : 192.32.9.135:1025" (TID:0xeb0c0b30, sys_thread_t:0xa4cdb8,
> state:R, native ID:0xe) prio=5
> .
> .
> .
> Registered Monitor Dump:
>     PCMap lock: <unowned>
>     utf8 hash table: <unowned>
>     JNI pinning lock: <unowned>
>     JNI global reference lock: <unowned>
>     BinClass lock: <unowned>
>     Class linking lock: <unowned>
>     System class loader lock: <unowned>
>     Code rewrite lock: <unowned>
>     Heap lock: <unowned>
>     Monitor cache lock: owner "Automat : 192.32.9.135:1025" (0xa4cdb8) 1 entry
>     Thread queue lock: owner "Automat : 192.32.9.135:1025" (0xa4cdb8) 1 entry
>     Monitor registry: owner "Automat : 192.32.9.135:1025" (0xa4cdb8) 1 entry
> 
> Abort - core dumped
> 
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by WebNet Technologies.
> To subscribe:    send mail to [EMAIL PROTECTED]  
>                  with the word SUBSCRIBE as the subject.
> To unsubscribe:  send mail to [EMAIL PROTECTED] 
>                  with the word UNSUBSCRIBE as the subject.
> To send to the list, send email to '[EMAIL PROTECTED]'. 
> A list archive is at: http://www.findmail.com/listsaver/tcldallas/
> 

----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
To subscribe:    send mail to [EMAIL PROTECTED]  
                 with the word SUBSCRIBE as the subject.
To unsubscribe:  send mail to [EMAIL PROTECTED] 
                 with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'. 
A list archive is at: http://www.findmail.com/listsaver/tcldallas/

Reply via email to