public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Thread difficulties
  2000-04-01  0:00 Thread difficulties Evan Turnbull
  2000-04-01  0:00 ` Bryce McKinlay
@ 2000-04-01  0:00 ` Joerg Brunsmann
  1 sibling, 0 replies; 6+ messages in thread
From: Joerg Brunsmann @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Evan Turnbull; +Cc: java-discuss, Andrew Zahra

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 530 bytes --]

Evan Turnbull wrote:

> the second thread and then I hang. I'm using wait/notify to coordinate
> the threads. I've noticed a few other problems in the mailing lists
> associated with the use of wait/notify. Does anyone have any advice?
> Should I be avoiding wait/notify?

If you use Solaris 7, yes. Solaris 7 does have a bug. Linux should be ok.

> I have built libgcj with posix threads and am using the -lposix compile
> option. Is there anything else I need to do to successfully use threads?

Not that I'm aware of.

Jörg

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Thread difficulties
  2000-04-01  0:00 Thread difficulties Evan Turnbull
@ 2000-04-01  0:00 ` Bryce McKinlay
  2000-04-01  0:00   ` Evan Turnbull
  2000-04-01  0:00   ` Tom Tromey
  2000-04-01  0:00 ` Joerg Brunsmann
  1 sibling, 2 replies; 6+ messages in thread
From: Bryce McKinlay @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Evan Turnbull; +Cc: java-discuss, Andrew Zahra

Evan Turnbull wrote:

> I have runtime error occuring in a program I compiled with gcj. I'm
> trying to run some TCP/IP performance tests with a compiled Java client
> and server. The server is hanging when the main thread requests a second
> thread to send a TCP/IP message. In the debugger I can see the call to
> the second thread and then I hang. I'm using wait/notify to coordinate
> the threads. I've noticed a few other problems in the mailing lists
> associated with the use of wait/notify. Does anyone have any advice?
> Should I be avoiding wait/notify?

wait/notify should work fine, except on Solaris 7 due to a bug in its recursive
mutex implementation. More information is needed to diagnose your problem -
which OS? what version of libgcj? Can you provide a test case that demonstrates
the problem?

regards

  [ bryce ]


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Thread difficulties
@ 2000-04-01  0:00 Evan Turnbull
  2000-04-01  0:00 ` Bryce McKinlay
  2000-04-01  0:00 ` Joerg Brunsmann
  0 siblings, 2 replies; 6+ messages in thread
From: Evan Turnbull @ 2000-04-01  0:00 UTC (permalink / raw)
  To: java-discuss; +Cc: Andrew Zahra

Hi,

I have runtime error occuring in a program I compiled with gcj. I'm
trying to run some TCP/IP performance tests with a compiled Java client
and server. The server is hanging when the main thread requests a second
thread to send a TCP/IP message. In the debugger I can see the call to
the second thread and then I hang. I'm using wait/notify to coordinate
the threads. I've noticed a few other problems in the mailing lists
associated with the use of wait/notify. Does anyone have any advice?
Should I be avoiding wait/notify?

I have built libgcj with posix threads and am using the -lposix compile
option. Is there anything else I need to do to successfully use threads?

Thanks,
Evan



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Thread difficulties
  2000-04-01  0:00 ` Bryce McKinlay
  2000-04-01  0:00   ` Evan Turnbull
@ 2000-04-01  0:00   ` Tom Tromey
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Tromey @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: Evan Turnbull, java-discuss, Andrew Zahra

>>>>> "Bryce" == Bryce McKinlay <bryce@albatross.co.nz> writes:

Bryce> wait/notify should work fine, except on Solaris 7 due to a bug
Bryce> in its recursive mutex implementation.

We can detect Solaris 7 and enable our own recursive mutexes.  This
was discussed before, but I didn't have active Java hacking time then.
I'll try to dig it out of the archives and see if we did anything
about it.

Tom

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Thread difficulties
  2000-04-01  0:00 ` Bryce McKinlay
@ 2000-04-01  0:00   ` Evan Turnbull
  2000-04-01  0:00     ` Joerg Brunsmann
  2000-04-01  0:00   ` Tom Tromey
  1 sibling, 1 reply; 6+ messages in thread
From: Evan Turnbull @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: java-discuss, Andrew Zahra

I'm using Solaris v2.6 (uname -a gave me SunOS v5.6 = Solaris 2.6 right?). So it's
well before Solaris 7. Should I assume that threads will be fine on this version of
solaris?

Evan

Bryce McKinlay wrote:

> Evan Turnbull wrote:
>
> > I have runtime error occuring in a program I compiled with gcj. I'm
> > trying to run some TCP/IP performance tests with a compiled Java client
> > and server. The server is hanging when the main thread requests a second
> > thread to send a TCP/IP message. In the debugger I can see the call to
> > the second thread and then I hang. I'm using wait/notify to coordinate
> > the threads. I've noticed a few other problems in the mailing lists
> > associated with the use of wait/notify. Does anyone have any advice?
> > Should I be avoiding wait/notify?
>
> wait/notify should work fine, except on Solaris 7 due to a bug in its recursive
> mutex implementation. More information is needed to diagnose your problem -
> which OS? what version of libgcj? Can you provide a test case that demonstrates
> the problem?
>
> regards
>
>   [ bryce ]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Thread difficulties
  2000-04-01  0:00   ` Evan Turnbull
@ 2000-04-01  0:00     ` Joerg Brunsmann
  0 siblings, 0 replies; 6+ messages in thread
From: Joerg Brunsmann @ 2000-04-01  0:00 UTC (permalink / raw)
  To: Evan Turnbull; +Cc: Bryce McKinlay, java-discuss, Andrew Zahra

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 751 bytes --]

Evan Turnbull wrote:
 
> I'm using Solaris v2.6 (uname -a gave me SunOS v5.6 = Solaris 2.6 right?). So it's
> well before Solaris 7. Should I assume that threads will be fine on this version of
> solaris?

No. Today I was able to produce a gcj/libgcj combination on Solaris 2.6 (egcs-20000110,
libgcj-snapshot-2000-01-12). I can report that wait/notify on Solaris 2.6 does not
work for me either. To reproduce the problem one can use the WebServer java code 
which I used to demonstrate the problem on Solaris 2.7. With the help of `truss`
I can see that the behaviour is a bit different. On Solaris 2.6 signotifywait() 
and lwp_cond_wait() are never executed. Unfortunately right now I don't have the 
time to dive into that further. Sorry.

Jörg

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-04-01  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-01  0:00 Thread difficulties Evan Turnbull
2000-04-01  0:00 ` Bryce McKinlay
2000-04-01  0:00   ` Evan Turnbull
2000-04-01  0:00     ` Joerg Brunsmann
2000-04-01  0:00   ` Tom Tromey
2000-04-01  0:00 ` Joerg Brunsmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).