From nobody@FreeBSD.org  Fri May 11 09:56:03 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id A628C16A403
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 May 2007 09:56:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 99FE713C448
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 May 2007 09:56:03 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l4B9u3Nx048905
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 11 May 2007 09:56:03 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l4B9p1p7048136;
	Fri, 11 May 2007 09:51:01 GMT
	(envelope-from nobody)
Message-Id: <200705110951.l4B9p1p7048136@www.freebsd.org>
Date: Fri, 11 May 2007 09:51:01 GMT
From: Jedrzej Nasiadek<jedrzej.nasiadek@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Java appletviewer frequently hangs (kse_release loop)
X-Send-Pr-Version: www-3.0

>Number:         112595
>Category:       java
>Synopsis:       Java appletviewer frequently hangs (kse_release loop)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-java
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 11 10:00:12 GMT 2007
>Closed-Date:    Sat Jan 14 16:01:25 UTC 2012
>Last-Modified:  Sat Jan 14 16:01:25 UTC 2012
>Originator:     Jedrzej Nasiadek
>Release:        
>Organization:
Polska Telefonia Cyfrowa
>Environment:
FreeBSD czajnik.aaa.bbb.pl 6.2-STABLE FreeBSD 6.2-STABLE #2: Thu May 10 13:33:14 CEST 2007     root@czajnik.aaa.bbb.pl:/usr/obj/usr/src/sys/CZAJNIK  i386

java full version "diablo-1.5.0-b01"
Java is build diablo-jdk1.5.0_07 downloaded from freebsdfoundation.org

>Description:
Running (quite big) an applet using appletviewer hangs and appletviewer goes
into a loop. Truss shows what follows:

kse_release({0.045944457})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.043950069})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.041198044})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.038948596})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.036920964})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.034937192})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.032871566})                       = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.030884163})                       = 383 (0x17f)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
kse_release({0.028880836})                       = 383 (0x17f)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
(null)()                                         = 383 (0x17f)
(null)()                                         = 0 (0x0)
truss: Cannot malloc -80090560 bytes for pollfd array: Cannot allocate memory

backtrace from gdb:
(gdb) bt
#0  0x281724f7 in pthread_testcancel () from /lib/libpthread.so.2
#1  0x2816b80f in pthread_mutexattr_init () from /lib/libpthread.so.2
#2  0x080e2680 in ?? ()

Searching the net revealed that similiar problem was in older java in
FreeBSD 5.x and mapping libpthread to libc_r in libmap.conf helped.  I
tried this but unfortunately failed.

Some smaller applets work ok. Can't yet find out which applets work and
which do not.

Any ideas how to solve or track down problem are welcome.

And one more thing: the problem appeared only after upgrading from
6.1-RELEASE to 6.2
>How-To-Repeat:
It's a proprietary HP app: HP OVO Performance Monitor:
com.hp.ov.pm.client.InsightApplet
>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: jilles 
State-Changed-When: Sat May 15 15:34:43 UTC 2010 
State-Changed-Why:  
Does this still happen in 7.0 or newer versions?  If you are still using 
6.x, try mapping libpthread to libthr. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112595 
State-Changed-From-To: feedback->closed 
State-Changed-By: eadler 
State-Changed-When: Sat Jan 14 16:01:23 UTC 2012 
State-Changed-Why:  
feedback timeout and unlikely to still be a problem (if it is email me 
and I'll reopen) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=112595 
>Unformatted:
