[kaffe] [Debian bug report] Kaffe JVMPI shutdown problem on ppc

2005-10-28 Thread Wolfgang Baer

Hi all,

we received a kaffe jvmpi bug report for powerpc in debian.

For the thread up to now and followups see:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335622

JMP seems to work the same as on my x86 box except that
during the vm shutdown on ppc of the bug reporter
an internal error in kaffe occures

[...]
teardown called, freeing jmp-data..
Internal error: caught an unexpected exception.
Please check your CLASSPATH and your installation.
java/lang/NullPointerException
Abandon
[...]

The bug reporter says that this error is reproducible
every time on his box.

Regards,
Wolfgang


___
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] JVMPI status?

2004-03-12 Thread Dalibor Topic
Hi Jon,

Jon Nall wrote:
dalibor,
i don't think this is a libtool bug. i think the solution is to remove 
it from libltdl/acinclude.m4:6372. i don't have up to date 
autoconf/automake, so i can't test it, but manually removing it from 
libltdl/configure:21057 worked.
the libltdl directory comes from GNU libtool: it is created by running 
libtoolize from libtool 1.5.2. I'll forward your bug report and fix to 
the libtool developers, it's a very good catch.

i'm attaching a patch that should resolve both the malloc issue and the 
assert i mentioned in my previous email.
thanks, I've checked it in. I've adapted the libtool patch slightly to 
fit into our build system.

current status is that i can get EJP to load and run successfully on 
small programs. i tried it on a larger program and got an internal error 
in EJP (an error that doesn't show up when i run against the sun JDK). 
so i'll debug that one next.
thanks for doing that!

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] JVMPI status?

2004-03-11 Thread Dalibor Topic
Hi Jon,

Jon Nall wrote:
Dalibor Topic wrote:

yep, I get the same problem with jprofiler-1.1.1. It seems to be some 
weird memory allocation issue. I haven;t tried tracking it down.


i figured out why it's happening, though i'm not familiar enough with 
the project (yet) to suggest the proper fix. the issue is that in 
function argz_create_sep() at libltdl/ltdl.c:627 argz is LT_DLMALLOC'ed. 
and in foreach_dirinpath() at libltdl/ltdl.c:2705 is LT_DLFREE'ed. 
however, configure found argz_create_sep() on my system defined in 
/usr/include/argz.h and set the following in libltdl/config.h: #define 
HAVE_ARGZ_CREATE_SEP 1.
wow, that was quick. Thanks a lot for looking into it.

this, i assume, causes the external argz_create_sep call which just uses 
plain old malloc(). send that to LT_DLFREE and chaos ensues.

i hand-modified libltdl/config.h to say #undef HAVE_ARGZ_CREATE_SEP, 
recompiled and can now run ejp without error.
sounds reasonable.

i've tried both of the following successfully:
1. never use the external argz_create_sep() call
2. add an ifdef in foreach_dirinpath() that calls normal free() for argz.
with either of these fixes, i still get a core dump:
kaffe-bin: jvmpi_kaffe.c:55: jvmpiPostEvent: Assertion `ev-event_type  
JVMPI_EVENT_COUNT' failed.

if someone can tell me which of 1 or 2 above to pursue, i'll create a 
patch and get that assert debugged.
since there is no way to guarantee that the external argz_create_sep() 
will use malloc/free (afaik), it may be better to do 1, in my opinion. 
And since it's a bug in libtool, please send a bug report upstream to 
the libtool developers, as well.

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] JVMPI status?

2004-03-11 Thread Jon Nall

since there is no way to guarantee that the external argz_create_sep() 
will use malloc/free (afaik), it may be better to do 1, in my opinion. 
And since it's a bug in libtool, please send a bug report upstream to 
the libtool developers, as well.


dalibor,
i don't think this is a libtool bug. i think the solution is to remove 
it from libltdl/acinclude.m4:6372. i don't have up to date 
autoconf/automake, so i can't test it, but manually removing it from 
libltdl/configure:21057 worked.

i'm attaching a patch that should resolve both the malloc issue and the 
assert i mentioned in my previous email.

current status is that i can get EJP to load and run successfully on 
small programs. i tried it on a larger program and got an internal error 
in EJP (an error that doesn't show up when i run against the sun JDK). 
so i'll debug that one next.

nall.
Index: kaffe/kaffe/jvmpi/jvmpi_kaffe.c
===
RCS file: /cvs/kaffe/kaffe/kaffe/jvmpi/jvmpi_kaffe.c,v
retrieving revision 1.4
diff -u -r1.4 jvmpi_kaffe.c
--- kaffe/kaffe/jvmpi/jvmpi_kaffe.c 11 Mar 2004 16:00:08 -  1.4
+++ kaffe/kaffe/jvmpi/jvmpi_kaffe.c 11 Mar 2004 19:35:30 -
@@ -52,7 +52,7 @@
 {
assert(ev != NULL);
assert(ev-event_type = 0);
-   assert(ev-event_type  JVMPI_EVENT_COUNT);
+   assert((ev-event_type  ~JVMPI_REQUESTED_EVENT)  JVMPI_EVENT_COUNT);
 
ev-env_id = THREAD_JNIENV();
switch( ev-event_type )
Index: kaffe/libltdl/acinclude.m4
===
RCS file: /cvs/kaffe/kaffe/libltdl/acinclude.m4,v
retrieving revision 1.25
diff -u -r1.25 acinclude.m4
--- kaffe/libltdl/acinclude.m4  27 Jan 2004 11:08:43 -  1.25
+++ kaffe/libltdl/acinclude.m4  11 Mar 2004 19:35:32 -
@@ -6369,5 +6369,5 @@
 #  include argz.h
 #endif])
 
-AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
+AC_CHECK_FUNCS([argz_append argz_insert argz_next argz_stringify])
 ])# AC_LTDL_FUNC_ARGZ
Index: kaffe/libltdl/configure
===
RCS file: /cvs/kaffe/kaffe/libltdl/configure,v
retrieving revision 1.54
diff -u -r1.54 configure
--- kaffe/libltdl/configure 11 Mar 2004 11:56:48 -  1.54
+++ kaffe/libltdl/configure 11 Mar 2004 19:35:38 -
@@ -21054,7 +21054,7 @@
 
 
 
-for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify
+for ac_func in argz_append argz_insert argz_next argz_stringify
 do
 as_ac_var=`echo ac_cv_func_$ac_func | $as_tr_sh`
 echo $as_me:$LINENO: checking for $ac_func 5


[kaffe] JVMPI status?

2004-03-09 Thread Jon Nall
hello.
i'm curious about the status of kaffe's JVMPI implementation. could 
someone clue me in as to where it's at?

also, i have a patchset for 1.1.4 that fixes the compile when 
--enable-jvmpi is set in configure. i can post it if there's interest.

nall.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] JVMPI status?

2004-03-09 Thread Jon Nall
tim,
thanks for the reply. i'm attaching the diff to this mail. the only bit 
i'm not sure about are the changes in jvmpi_kaffe.c. it looks like 
someone changed the definition of java_lang_String structs. the other 
diffs are just typos.

also, JVMPI functionality still seems broken, even with this patch. i 
get the stack trace attached below. i don't have time to look at it now. 
i might get to it this week, though.

nall.

[EMAIL PROTECTED] ~/kaffe-1.1.4]$ java -Xruntracer.so foo
GNU gdb Red Hat Linux (5.2-2)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-redhat-linux...
(gdb) run
Starting program: /home/nall/JDKs/kaffe/jre/bin/kaffe-bin -Xruntracer.so foo
loadNativeLib(libtracer.so)

Program received signal SIGFPE, Arithmetic exception.
0x4003af10 in gcFree (gcif=0x400bf4d4, mem=0x0) at mem/gc-incremental.c:1249
1249idx = GCMEM2IDX(info, unit);
(gdb) where
#0  0x4003af10 in gcFree (gcif=0x400bf4d4, mem=0x0) at 
mem/gc-incremental.c:1249
#1  0x4003b61d in jfree (mem=0x85ef018) at gc.c:34
#2  0x4003764f in kdlfree (ptr=0x85ef018) at 
../../include/kaffe/jmalloc.h:37
#3  0x40078ee3 in foreach_dirinpath (search_path=0x85ef050 
/home/nall/ejp/tracer/lib, base_name=0x8394714 libtracer.so,
   func=0x40079220 find_handle_callback, data1=0xbfffd848, data2=0x0) 
at ltdl.c:2712
#4  0x400792d6 in find_handle (search_path=0x0, base_name=0x85ef018 o, 
handle=0xbfffd848) at ltdl.c:2791
#5  0x4007987f in try_dlopen (phandle=0xbfffd874, filename=0xbfffe36e 
libtracer.so) at ltdl.c:3280
#6  0x40079fdf in lt_dlopen (filename=0x85ef018 o) at ltdl.c:3411
#7  0x4007a0d5 in lt_dlopenext (filename=0xbfffe36e libtracer.so) at 
ltdl.c:3463
#8  0x40036dce in loadNativeLibrary2 (path=0xbfffe36e libtracer.so, 
default_refs=1, errbuf=0xbfffd920 , errsiz=512) at external.c:293
#9  0x40036cd6 in loadNativeLibrary (lib=0x85ef018 o, errbuf=0x85ef018 
o, errsiz=140439576) at external.c:232
#10 0x08048fff in main (argc=1, argv=0xbfffdba4) at main.c:169
#11 0x4012d336 in __libc_start_main (main=0x8048ea0 main, argc=3, 
ubp_av=0xbfffdba4, init=0x8048bb8 _init, fini=0x804a710 _fini,
   rtld_fini=0x4000d2fc _dl_fini, stack_end=0xbfffdb9c) at 
../sysdeps/generic/libc-start.c:129

diff -u -r kaffe-1.1.4-orig/kaffe/jvmpi/jvmpi_kaffe.c 
kaffe-1.1.4/kaffe/jvmpi/jvmpi_kaffe.c
--- kaffe-1.1.4-orig/kaffe/jvmpi/jvmpi_kaffe.c  2003-10-11 15:45:48.0 -0500
+++ kaffe-1.1.4/kaffe/jvmpi/jvmpi_kaffe.c   2004-03-09 14:57:33.0 -0600
@@ -182,8 +182,8 @@
assert(tid != NULL);

ev-event_type = JVMPI_EVENT_THREAD_START;
-   if( (name = stringCharArray2Java(unhand_char_array(tid-name),
-obj_length(tid-name))) != NULL )
+   if( (name = stringCharArray2Java(unhand_char_array(tid-name-value),
+tid-name-count)) != NULL )
{
ev-u.thread_start.thread_name = stringJava2C(name);
}
diff -u -r kaffe-1.1.4-orig/kaffe/jvmpi/Makefile.am kaffe-1.1.4/kaffe/jvmpi/Makefile.am
--- kaffe-1.1.4-orig/kaffe/jvmpi/Makefile.am2004-01-14 20:29:29.0 -0600
+++ kaffe-1.1.4/kaffe/jvmpi/Makefile.am 2004-03-09 14:56:58.0 -0600
@@ -5,7 +5,7 @@
 
 libkaffejvmpi_la_LDFLAGS = \
-export-dynamic \
-   -release $(PACKAGE_PERSION)
+   -release $(PACKAGE_VERSION)
 
 libkaffejvmpi_la_DEPENDENCIES = \
$(LIBLTDL) \
diff -u -r kaffe-1.1.4-orig/kaffe/jvmpi/Makefile.in kaffe-1.1.4/kaffe/jvmpi/Makefile.in
--- kaffe-1.1.4-orig/kaffe/jvmpi/Makefile.in2004-02-18 15:18:56.0 -0600
+++ kaffe-1.1.4/kaffe/jvmpi/Makefile.in 2004-03-09 14:57:07.0 -0600
@@ -314,7 +314,7 @@
 lib_LTLIBRARIES = libkaffejvmpi.la
 libkaffejvmpi_la_LDFLAGS = \
-export-dynamic \
-   -release $(PACKAGE_PERSION)
+   -release $(PACKAGE_VERSION)
 
 libkaffejvmpi_la_DEPENDENCIES = \
$(LIBLTDL) \
diff -u -r kaffe-1.1.4-orig/kaffe/kaffevm/systems/unix-jthreads/jthread.c 
kaffe-1.1.4/kaffe/kaffevm/systems/unix-jthreads/jthread.c
--- kaffe-1.1.4-orig/kaffe/kaffevm/systems/unix-jthreads/jthread.c  2004-02-01 
16:14:54.0 -0600
+++ kaffe-1.1.4/kaffe/kaffevm/systems/unix-jthreads/jthread.c   2004-03-09 
14:58:48.0 -0600
@@ -2602,7 +2602,7 @@
 /*
  * Check if thread is interrupted.
  */
-int jthread_is_intrerrupted(jthread_t jt)
+int jthread_is_interrupted(jthread_t jt)
 {
return (jt-flags  THREAD_FLAGS_INTERRUPTED);
 }


Re: [kaffe] jvmpi

2003-08-31 Thread Timothy Stack
 
 
 hi,
 
 I've checked in some JVMPI stuff.  Its not completely done yet, but its 
 a pretty good start.  I'll try and get it finish RSN.  Hopefully, i 
 didn't break anything...

Real soon now indeed...

The last checkin gets things a bit farther, atleast for the
jit3/unix-jthreads configuration.  I can run the tracer for the
Extensible Java Profiler and get reasonable output for method traces,
but the class loader trace does not seem to work.  You can get EJP here:

http://ejp.sourceforge.net/

I've only run the tracer library in kaffe though, I ran the presenter 
interface using jdk1.4.

thanks,

tim

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] jvmpi

2003-08-14 Thread Timothy Stack
 hi Tim,

hi,

  I've checked in some JVMPI stuff.  Its not completely done yet, but its 
  a pretty good start.  I'll try and get it finish RSN.  Hopefully, i 
  didn't break anything...
 
 thanks! I've tried to build kaffe with jvmpi enabled, but it breaks 
 during linking because a function is missing. I've modified the 
 Makefile.am to link in libkaffevm, and I thought about exporting the 
 missing function, but you seem to use it in jvmpi_kaffe.c with a 
 different signature, so I'm not sure how to get JVMPI to build ;)

Whats the function?

 Oh, and do you know of any JVMPI applications that would work with your 
 implementation and kaffe?

I was mainly just gonna try and get sun's hprof to work.  I actually have 
some more of it written in my local tree, but I still need to implement 
the dump stuff.  I'll try to get to that over the weekend too.

 cheers,
 dalibor topic

tim

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] jvmpi

2003-08-14 Thread Dalibor Topic
hi Tim,

Timothy Stack wrote:
hi,

I've checked in some JVMPI stuff.  Its not completely done yet, but its 
a pretty good start.  I'll try and get it finish RSN.  Hopefully, i 
didn't break anything...
thanks! I've tried to build kaffe with jvmpi enabled, but it breaks 
during linking because a function is missing. I've modified the 
Makefile.am to link in libkaffevm, and I thought about exporting the 
missing function, but you seem to use it in jvmpi_kaffe.c with a 
different signature, so I'm not sure how to get JVMPI to build ;)

Oh, and do you know of any JVMPI applications that would work with your 
implementation and kaffe?

cheers,
dalibor topic
___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] jvmpi

2003-08-10 Thread Helmer Krämer
On Fri, 8 Aug 2003 10:24:35 -0600 (MDT)
Timothy Stack [EMAIL PROTECTED] wrote:

Hi,

   I've checked in some JVMPI stuff.  Its not completely done yet, but its 
   a pretty good start.  I'll try and get it finish RSN.  Hopefully, i 
   didn't break anything...
  
  thanks! I've tried to build kaffe with jvmpi enabled, but it breaks 
  during linking because a function is missing. I've modified the 
  Makefile.am to link in libkaffevm, and I thought about exporting the 
  missing function, but you seem to use it in jvmpi_kaffe.c with a 
  different signature, so I'm not sure how to get JVMPI to build ;)
 
 Whats the function?

part of this might be actually my fault. While moving the engine
dependent part of the stacktrace handling into different directories,
I also modified the handling of stacktraces themself a little bit, but
forgot to check whether jvmpi was affected or not :( To make it short,
you don't have to call stackTraceFindMethod() anymore in order to determine
the struct _methods* of a stackframe, buildStackTrace() already initializes
that field.  

Sorry,
Helmer

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] jvmpi

2003-07-27 Thread Helmer Krämer
On Sat, 26 Jul 2003 11:10:46 -0600
Timothy Stack [EMAIL PROTECTED] wrote:

Hi,

 I've checked in some JVMPI stuff.  Its not completely done yet, but its 
 a pretty good start.  I'll try and get it finish RSN.  Hopefully, i 
 didn't break anything...

you seem to have missed intrp and jit ;)
Will check in fixes for those later today.

Greetings,
Helmer

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe