[kaffe] Problem with garbage collection and p-threads
Martin Edlund
Martin.Edlund@ascomtateco.se
Tue, 29 Oct 2002 10:41:25 +0100
Hi!
I work together with Josef on this project, and this is the output we =
get from gdb
This does not make any sense to us, but hopefully some of you can get =
something from it.
//Martin
-------------------------------------------------------------------
soft_trace: java/lang/System.runFinalization()V
soft_trace: java/lang/Runtime.getRuntime()Ljava/lang/Runtime;
[Switching to Thread 31582]
Program received signal SIGUSR1, User defined signal 1.
0x400e458b in __sigsuspend (set=3D0xbf7ffb9c) at =
../sysdeps/unix/sysv/linux/sigsuspend.c:48
48 ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or =
directory.
(gdb) backtrace full
#0 0x400e458b in __sigsuspend (set=3D0xbf7ffb9c) at =
../sysdeps/unix/sysv/linux/sigsuspend.c:48
resultvar =3D 3212835740
saved_errno =3D 4
#1 0x4009d1a0 in pthread_cond_wait (cond=3D0x818a398, =
mutex=3D0x818a380) at restart.h:49
jmpbuf =3D {{__jmpbuf =3D {1074436732, -1082131556, -1082130848, =
-1082131424, -1082131768,=20
1074385259}, __mask_was_saved =3D 0, __saved_mask =3D {__val =3D =
{0, 0, 0, 0, 0, 0, 0, 0, 1074375668,=20
0, 0, 1073860985, 3212835868, 1074373684, 200, 1074374340, =
1074370484, 1074352752, 9,=20
135348680, 3, 3212835720, 1073832860, 1073819444, 262742500, =
3212835844, 1073859563,=20
1074373684, 1074352752, 3212835864, 1073770324, 134514600}}}}
mask =3D {__val =3D {0, 0, 1073818928, 1073819648, 1074352752, =
9, 135348680, 3, 1074401537, 681,=20
134479873, 135832448, 1073861180, 3212835848, 1073782701, =
1073818872, 1074354824, 7, 1073782526,=20
1074303112, 135832472, 135832448, 1073818928, 1073832860, =
1074303764, 1073859563, 1074373684,=20
3212835940, 1073783072, 0, 0, 1074384992}}
self =3D 0xbf7ffe60
self =3D 0xbf7ffe60
#2 0x4006eaca in jcondvar_wait (cv=3D0x818a398, mux=3D0x818a380, =
timeout=3D0)
at =
../../../../../kaffe/kaffe/kaffevm/systems/unix-pthreads/lock-impl.c:39
cur =3D (nativeThread *) 0x8187ec0
stat =3D 4
abst =3D {tv_sec =3D 1073783072, tv_nsec =3D 0}
now =3D {tv_sec =3D 0, tv_usec =3D 1074195072}
#3 0x4004516a in _waitCond (lkp=3D0x4008f068, timeout=3D0) at =
../../../kaffe/kaffe/kaffevm/ksem.h:87
r =3D 1 '\001'
sem =3D (Ksem *) 0x818a380
timeout =3D 0
lk =3D (iLock *) 0x40088df8
holder =3D (void *) 0xbf7ffce4
tid =3D (Hjava_lang_Thread *) 0x8187e50
ptr =3D (Hjava_lang_Thread **) 0x818a380
r =3D 32 ' '
#4 0x4003523f in finaliserMan (arg=3D0x4008e8e0)
at ../../../kaffe/kaffe/kaffevm/mem/gc-incremental.c:764
info =3D (gc_block *) 0x4004de01
unit =3D (gc_unit *) 0xbf7ffd14
gcif =3D (Collector *) 0x4008e8e0
iLockRoot =3D 0
#5 0x4004da7e in startSpecialThread (arg=3D0x8187e50) at =
../../../kaffe/kaffe/kaffevm/thread.c:273
tid =3D (Hjava_lang_Thread *) 0x8
func =3D (void (*)()) 0x4
argument =3D (void *) 0xfffffffc
#6 0x400701cb in tRun (p=3D0x8187ec0)
at =
../../../../../kaffe/kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:55=
0
p =3D (void *) 0xfffffffc
cur =3D (nativeThread *) 0x8187ec0
t =3D (nativeThread *) 0x4
ss =3D 32768
oldCancelType =3D 0
iLockRoot =3D -1082131136
#7 0x4009deca in pthread_start_thread (arg=3D0xbf7ffe60) at =
manager.c:213
self =3D 0xbf7ffe60
request =3D {req_thread =3D 0xbf7ffe60, req_kind =3D REQ_DEBUG, =
req_args =3D {create =3D {attr =3D 0x0,=20
fn =3D 0, arg =3D 0x0, mask =3D {__val =3D {0 <repeats 32 =
times>}}}, free =3D {thread_id =3D 0}, exit =3D {
code =3D 0}, post =3D 0x0}}
outcome =3D (void *) 0xfffffffc
(gdb)=20
-------------------------------------------------------------------
-----Original Message-----
From: Dalibor Topic [mailto:robilad@yahoo.com]
Sent: den 25 oktober 2002 15:44
To: Josef Nordang=E5rd; kaffe@kaffe.org
Subject: Re: [kaffe] Problem with garbage collection and p-threads
Hi Josef,
--- Josef_Nordang=E5rd <Josef.Nordangard@ascomtateco.se>
wrote:
> Hi!
>=20
> The garbage collection is not working properly when
> an application using JNI is running. There is simply
> no collection of no-longer-used memory at all,
> instead the entire process is frozen when the gc
> should start. Kaffe is build with p-threads due to
> our native code is using p-threads.=20
thanks for the bug report. Could you take a look at
FAQ.debugging, configure kaffe with --enable-debug and
fire up the gdb to see where kaffe is hanging?
> Is there anyone who has used p-thread compiled kaffe
> together with JNI? Is this supposed to work? If not,
> how much work would it take to fix it?
It would be great if you could try to fix pthreads
support in kaffe. A couple of regression test still
fail on i386-linux, if I recall it correctly, and
that's always a bad sign.
best regards,
dalibor topic
__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/
_______________________________________________
kaffe mailing list
kaffe@kaffe.org
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe