Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Nov 2002 14:26:33 +0200
From:      Alexey Zelkin <phantom@FreeBSD.org.ua>
To:        Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc:        Bill Huey <billh@gnuppy.monkey.org>, Mantzios Achilleus <mantzios@softlab.ece.ntua.gr>, freebsd-java@FreeBSD.ORG
Subject:   Re: Jboss, -Xss with hotspot on -release 4.7p2
Message-ID:  <20021125142633.A77963@phantom.cris.net>
In-Reply-To: <Pine.LNX.4.44.0211251336380.24204-100000@matrix.gatewaynet.com>; from achill@matrix.gatewaynet.com on Mon, Nov 25, 2002 at 01:37:20PM %2B0200
References:  <Pine.LNX.4.44.0211251323190.24204-100000@matrix.gatewaynet.com> <Pine.LNX.4.44.0211251336380.24204-100000@matrix.gatewaynet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Nov 25, 2002 at 01:37:20PM +0200, Achilleus Mantzios wrote:
> On Mon, 25 Nov 2002, Achilleus Mantzios wrote:
> 
> > On Mon, 25 Nov 2002, Bill Huey wrote:
> >
> > > On Mon, Nov 25, 2002 at 11:45:05AM +0200, Mantzios Achilleus wrote:
> > > > I have (i think) built hotspot (core) on stable 4.7.
> > > >
> > > > When i run jboss 3.0.1 with  -Xss30m i get:
> > > >
> > > > Stack size of 30720 Kb exceeds current limit of 1024 Kb.
> > > > (Stack sizes are rounded up to a multiple of the system page size.)
> > > >
> > > > I then try to use this limit with -Xss1m.
> > > >
> > > > When i run jboss with hotspot (core)
> > > > i get sigbus (10).
> > >
> > > Yeah, sounds like a stack limit problem, fairly trivial to fix. Those are
> > > reentrant C functions being called if I remember correctly and I wonder
> > > what's going with it and I was the person that commited that logic to the
> > > core JVM library itself. I'll get at it after the all reworking that I'm
> > > currently doing. I'm in the process of reading stuff both in the HotSpot
> > > source tree, libc_r, and stuff outside of this project, so it's going to
> > > be a bit before I can get at it.
> >
> > Also hotspot compiler1 fails in the exact same fashion.
> >
> > Note that compiler2 doesnt build:
> >
> > a bunch of compiler options e.g
> > cc1plus: Invalid option `-fssa'
> > give errors.
> >
> > BTW is there something "fast" i could do to start working
> > with jboss (that is having worked around -Xss flag issue that Bill
> > commnted on and Java_java_net_InetAddressImpl_getHostByAddr issue
> > that Andrey commnted on)??
>        ^^^^^^
> I MEANT ALEXEY!!!
> SORRY!!

:-)

I have attached a patch  against jdk1.4 sources, but I think it would
be trivial to do same for 1.3.

PS: It was supposed to be a hack :) So, if it'll fix your problem -- I'll
go with clean it up and propose to commit to 1.3 tree also.

Index: Inet4AddressImpl.c
===================================================================
RCS file: /home/Java/CVS/JDK2/javasrc_1_4_scsl/j2se/src/solaris/native/java/net/Inet4AddressImpl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -u -r1.2 -r1.3
--- Inet4AddressImpl.c	16 Aug 2002 06:50:27 -0000	1.2
+++ Inet4AddressImpl.c	21 Oct 2002 16:51:50 -0000	1.3
@@ -27,10 +27,10 @@
 #define HENT_BUF_SIZE 1024
 #define BIG_HENT_BUF_SIZE 10240	 /* a jumbo-sized one */
 
-#ifndef __GLIBC__
-/* gethostname() is in libc.so but I can't find a header file for it */
-extern int gethostname(char *buf, int buf_len);
-#endif
+//#ifndef __GLIBC__
+///* gethostname() is in libc.so but I can't find a header file for it */
+//extern int gethostname(char *buf, int buf_len);
+//#endif
 
 /* reentrant BIND includes --billh */
 
@@ -41,11 +41,11 @@
 /* forward declarations --billh */
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr,
+JDK_gethostbyname_r(const char *name,  struct hostent *hptr,
 		HOST_R_ARGS);
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+JDK_gethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr,
 		HOST_R_ARGS);
 
@@ -85,16 +85,16 @@
 	int h_error=0;
 
 #ifdef __GLIBC__
-	gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+	JDK_gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else
-	hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+	hp = JDK_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 	if (hp) {
 #ifdef __GLIBC__
-	    gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
+	    JDK_gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 			    &res2, buf2, sizeof(buf2), &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
+	    hp = JDK_gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET,
 				 &res2, buf2, sizeof(buf2), &h_error);
 #endif
 	    if (hp) {
@@ -157,9 +157,9 @@
 
     /* Try once, with our static buffer. */
 #ifdef __GLIBC__
-    gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
+    JDK_gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error);
 #else    
-    hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
+    hp = JDK_gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error);
 #endif
 
     /* With the re-entrant system calls, it's possible that the buffer
@@ -170,10 +170,10 @@
     if (hp == NULL && errno == ERANGE) {
 	if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) {
 #ifdef __GLIBC__
-	    gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
+	    JDK_gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 			    &hp, &h_error);
 #else
-	    hp = gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
+	    hp = JDK_gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE,
 				 &h_error);
 #endif
 	}
@@ -255,10 +255,10 @@
     addr |= (caddr[3] & 0xff); 
     addr = htonl(addr);
 #ifdef __GLIBC__
-    gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
+    JDK_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 		    buf, sizeof(buf), &hp, &h_error);
 #else
-    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
+    hp = JDK_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent,
 			 buf, sizeof(buf), &h_error);
 #endif
     /* With the re-entrant system calls, it's possible that the buffer
@@ -269,10 +269,10 @@
     if (hp == NULL && errno == ERANGE) {
 	if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) {
 #ifdef __GLIBC__
-	    gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
+	    JDK_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 			    &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error);
 #else
-	    hp = gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
+	    hp = JDK_gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET,
 				 &hent, tmp, BIG_HENT_BUF_SIZE, &h_error);
 #endif
 	} else {
@@ -309,7 +309,7 @@
 copy_hostent(struct hostent *, struct hostent *, HOST_R_COPY_ARGS);
 
 HOST_R_RETURN
-gethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
+JDK_gethostbyname_r(const char *name,  struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyname(name);
 
 	HOST_R_ERRNO;
@@ -321,7 +321,7 @@
 }
 
 HOST_R_RETURN
-gethostbyaddr_r(const char *addr, int len, int type,
+JDK_gethostbyaddr_r(const char *addr, int len, int type,
 		struct hostent *hptr, HOST_R_ARGS) {
 	struct hostent *he = gethostbyaddr(addr, len, type);
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021125142633.A77963>