Need info on jni,heap,stack to solve jni problem, Blackdown-1.3.0-FCS

2001-02-04 Thread Barnet Wagman

I'm encountering a rather serious problem using the jni with
Blackdown-1.3.0-FCS (kernel 2.2.14, SuSE 6.4) .  The problem is actually
causing problems in my system as a whole.  I suspect it has to do with
memory allocation , and it would help to have some information about how
memory for jni is allocated.  I'd very much appreciate hearing from
someone who knows about these matters.

I've been using jni calls to C functions (which use malloc/free) for
several months without problems.  However, I just added another one and
it's wreaking havoc.  I'm fairly certain that the problem is not the
function itself.  When I call it from a test simple test program, is
seems fine.   I can run it on a loop (changing the data passed to it)
for hundreds of thousands of iterations without problems.  However, when
I call it from a larger Java program, all kinds of things get corrupted
(the larger Java program without this jni call can run for hours without
problems).  If I run it from an Xterminal under X, it causes X to
crash.  If I don't have X running at all (the larger java program
doesn't need it), getty gets interfered with and I can't login under
through virtual terminals.   I assume that memory is being corrupted.

A few questions:

- Where does the memory for a jni called function come from? Is, is
space allocated in the JVM heap (or stack)?
-  When a jni invoked function makes a malloc call, is memory allocated
from the JVM's memory, or directly from the operating system?
-  What is the default stack size for the jvm?  I've tried making this
larger (no effect), but have no idea what would be a 'large' amount of
memory for the stack.
- Is there anyway to get a core dump when a problem like this occurs?

Unfortuntely, I haven't been able to generate an isolated case of the
problem, which makes debugging difficult. So any comments or suggestions
would be appreciated.

Thanks,

Barnet Wagman



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




MultiThreading

2001-02-04 Thread Ezra Taylor

Hello everyone:
   My question is quick and simple, does Linux 
incorporate timeslicing.  If not, please direct me to a site that show 
code to that shows an alternative to performing  Multithreading  in a 
Linux environment. 

Thank You
Ezra


Shop online without a credit card
http://www.rocketcash.com
RocketCash, a NetZero subsidiary


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Javac Hangs

2001-02-04 Thread Wendy Schafer

I seem to have really messed up the JDK on my machine.  When I type
"javac xxx.java" and press Enter, nothing happens.  The java command
does not work either.  This problem originally started when I was using
IBM's JDK 1.1.8.  One day I went to use it and nothing worked. It seems
like it was after I went through and updated my machine based on all of
the Security Advisories from Red Hat.  I tried re-installing a couple of
times without any luck.  Now, I've tried installing Blackdown's JDK 1.3
and it does not work.  I am running Red Hat Linux 6.2, using Kernel
2.2.14-5.0, and glibc-2.1.3-21.  My path is correct because I can type
"java -fullversion" and get a correct response.

Something is obviously very wrong because "javac -verbose" and "javac
-g" also produce nothing.

Wendy



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




MultiThreading

2001-02-04 Thread Ezra Taylor


Hello everyone:
  My question is quick and simple, does Linux 
incorporate timeslicing.  If not, please direct me to a site that show 
code to that shows an alternative to performing  Multithreading  in a 
Linux environment.
Thank You
Ezra


Shop online without a credit card
http://www.rocketcash.com
RocketCash, a NetZero subsidiary


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Continued support for SPARC

2001-02-04 Thread Dr. Simon Read

Folks,

I have a SPARC  Station 20 that I use as my  Web and Mail server.  I'm
currently running the Blackdown JDK 1.2.2 on it.

I'm wondering whether Blackdown has plans to continue support for Java
on SPARC/Linux.  Anyone want to comment?

I know that  Sun will not support SPARC Linux in  the near future, but
can I run their SDK using the emulation library supplied with Linux?

Simon Read


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: MultiThreading

2001-02-04 Thread Uli Luckas

Hi Ezra,
Short answer:
Java on Linux does support "timeslicing".
Long answer:
Java knows two threading models: Green threads and native threads.
Green threads are implemented by the virtual machine (vm) and native 
threading uses the operating system's threading implementation.
Green threads are implemented as cooperative threads which means, if you 
don't cooperate you can starve the other threads.
Native threads depend on the OS and as Linux threasds get sceduled by 
the kernel like processes, java's "native threads" on linux do 
"timeslicing".
The java 1.3 implementation defaults to using native threads. If you use 
an older jdk please read the README and look for "threads" to find out, 
how to select the threading model.

Uli

Ezra Taylor wrote:

> 
> Hello everyone:
>  My question is quick and simple, does Linux 
> incorporate timeslicing.  If not, please direct me to a site that show 
> code to that shows an alternative to performing  Multithreading  in a 
> Linux environment.
> Thank You
> Ezra
> 
> 
> Shop online without a credit card
> http://www.rocketcash.com
> RocketCash, a NetZero subsidiary
> 
> 
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Continued support for SPARC

2001-02-04 Thread Johan Vos

On Sun, 4 Feb 2001, Dr. Simon Read wrote:

> Folks,
>
> I have a SPARC  Station 20 that I use as my  Web and Mail server.  I'm
> currently running the Blackdown JDK 1.2.2 on it.
>
> I'm wondering whether Blackdown has plans to continue support for Java
> on SPARC/Linux.  Anyone want to comment?

Yes, we will continue the SPARC/Linux port.

kr,

- Johan

===
Johan Vos   [EMAIL PROTECTED]
Sesuad'ra Projects  http://www.sesuadra.org



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: Javac Hangs

2001-02-04 Thread Joi Ellis

On Sun, 4 Feb 2001, Wendy Schafer wrote:

> I seem to have really messed up the JDK on my machine.  When I type
> "javac xxx.java" and press Enter, nothing happens.  The java command
> does not work either.  This problem originally started when I was using
> IBM's JDK 1.1.8.  One day I went to use it and nothing worked. It seems
> like it was after I went through and updated my machine based on all of
> the Security Advisories from Red Hat.  I tried re-installing a couple of
> times without any luck.  Now, I've tried installing Blackdown's JDK 1.3
> and it does not work.  I am running Red Hat Linux 6.2, using Kernel
> 2.2.14-5.0, and glibc-2.1.3-21.  My path is correct because I can type
> "java -fullversion" and get a correct response.
> 
> Something is obviously very wrong because "javac -verbose" and "javac
> -g" also produce nothing.

Check your rpm list to see if the Red Hat installer added the kawa 
packages to your machine.  Those can cause all sorts of strange 
problems if they were present when you are trying to use Sun or Blackdown
java on the same machine.

-- 
Joi EllisSoftware Engineer
Aravox Technologies  [EMAIL PROTECTED], [EMAIL PROTECTED]

No matter what we think of Linux versus FreeBSD, etc., the one thing I
really like about Linux is that it has Microsoft worried.  Anything
that kicks a monopoly in the pants has got to be good for something.
   - Chris Johnson


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




Re: MultiThreading

2001-02-04 Thread Nathan Meyers

Ezra Taylor wrote:

> Hello everyone:
>My question is quick and simple, does Linux
> incorporate timeslicing.  If not, please direct me to a site that show
> code to that shows an alternative to performing  Multithreading  in a
> Linux environment.

Linux is a true multitasking system with support for kernel-based
management and scheduling of threads in a multithreaded program. The JVMs
available from Blackdown and Sun run, depending on launch options, with
kernel-managed threads or user-space "green" threads.

Nathan Meyers
[EMAIL PROTECTED]

>
>
> Thank You
> Ezra
>
> Shop online without a credit card
> http://www.rocketcash.com
> RocketCash, a NetZero subsidiary
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]