Compiling Kaffe 1.0.5 on Alpha running OSF
Godmar Back
gback at cs.utah.edu
Wed Dec 1 11:12:07 PST 1999
The F_SETOWN is needed on BSD and I think also Linux systems in order to
get asynchronous (SIGIO) notifications on sockets. On some (most?) systems,
it's only needed and legal for sockets. I think that's why at some
point I decided to ignore a failure of the fcntl.
However, if it fails, it shouldn't affect the state of the filedescriptor
or make it unusable, should it?
You could also verify that the jthread_write() method is being called.
Maybe the problem is there.
I think if you run with -vmdebug, it will leave fd 2 in standard mode,
so you should always see debugging output generated with write(2, ...).
- Godmar
>
> I have taken a closer look at the problem that we have observed
> in the multithread java programs in test/regression (ttest.java).
>
> The threading appears to be working on the Alpha. When I "-vmdebug
> JTHREAD", I can see the processor switching between the threads. I
> also wrote some simple test cases code that showed that the child
> threads were actually doing something.
>
> The problem apprears to the the input/output code and no output is
> being generated. When I turned on the "-vmdebug JTHREAD", I got a
> number of error messages:
>
> F_SETOWN: Not a typewriter
>
> The DEC unix does not like the way the some of the file handling is
> being performed for multithreaded programs. This error message is
> coming from line 2020 of
> kaffe/kaffevm/systems/unix-jthreads/jthread.c:
>
> #elif defined(F_SETOWN)
> /* On some systems, this will flag an error if fd is not a socket */
> r = fcntl(fd, F_SETOWN, pid);
> if (r < 0) {
> DBG(JTHREAD, perror("F_SETOWN"); )
> }
> #endif
>
> I am not sure this is the root cause of why multithreaded programs
> such as ttest do not produce any output. However, it is a suspect.
> Any suggestions?
>
More information about the kaffe
mailing list