Thread issues with ruby 1.8.0 on OpenBSD 3.3

I’m seeing problems with threading using ruby 1.8.0 on OpenBSD 3.3.

When I use threads, I get

longjump botch.
Illegal instruction (core dumped)

Following is a short script that reproduces the problem.
This script runs fine using ruby 1.8.0 on Solaris 8.

Are there known issues with ruby threading on OpenBSD?

Thanks,
Rick

···

require 'thread’
threads = []
q = Queue.new
threads << Thread.new { puts q.pop }
q.push(“gronk”)
threads.each { |t| t.join }


Rick Nooner
rick@nooner.net
http://www.nooner.net

I'm seeing problems with threading using ruby 1.8.0 on OpenBSD 3.3.
When I use threads, I get

Can you give a stack trace ?

Run your script under gdb and when it crash use the command `bt'

Guy Decoux

Guy,

Here is the gdb session after the crash:

(gdb) bt
#0 0x8f29ae8 in _longjmp ()
#1 0x8f29aec in _longjmp ()
#2 0x7 in ?? ()
(gdb) quit

This is on a Sparc 5 which I didn’t mention earlier.

Rick

···

On Sat, Nov 22, 2003 at 10:14:32PM +0900, ts wrote:

I’m seeing problems with threading using ruby 1.8.0 on OpenBSD 3.3.
When I use threads, I get

Can you give a stack trace ?

Run your script under gdb and when it crash use the command `bt’

Guy Decoux


Rick Nooner
rick@nooner.net

This is on a Sparc 5 which I didn't mention earlier.

Perhaps best to see on a OpenBSD mailing list : there were well know
problems with Alpha for longjmp

   http://archives.neohapsis.com/archives/openbsd/2003-01/2142.html

I don't know for sparc

Guy Decoux

I don’t think that it’s a sparc issue since the same code runs fine
under Solaris. I have several other architecture/OS combinations
available that work fine as well. It is probably related to OpenBSD.

I’ll dig into it further this afternoon.

Thanks for your thoughts.

Rick

···

On Sun, Nov 23, 2003 at 02:18:37AM +0900, ts wrote:

This is on a Sparc 5 which I didn’t mention earlier.

Perhaps best to see on a OpenBSD mailing list : there were well know
problems with Alpha for longjmp

http://archives.neohapsis.com/archives/openbsd/2003-01/2142.html

I don’t know for sparc

Guy Decoux


Rick Nooner
rick@nooner.net

I don't think that it's a sparc issue since the same code runs fine
under Solaris. I have several other architecture/OS combinations
available that work fine as well. It is probably related to OpenBSD.

I'm agree with you

moulon% ruby -v
ruby 1.8.0 (2003-08-04) [sparc-solaris2.7]
moulon%

This is why I've said

Perhaps best to see on a OpenBSD mailing list

                            ^^^^^^^^^^^^^^^^^^^^

Guy Decoux