[#23231] What do you think about changing the return value of Kernel#require and Kernel#load to the source encoding of the required file? — =?ISO-8859-15?Q?Wolfgang_N=E1dasi-Donner?= <ed.odanow@...>

Dear Ruby developers and users!

8 messages 2009/04/17

[#23318] [Feature #1408] 0.1.to_r not equal to (1/10) — Heesob Park <redmine@...>

Feature #1408: 0.1.to_r not equal to (1/10)

19 messages 2009/04/26

[ruby-core:23095] [Bug #1345] Ruby 1.9.1-p0 is incomatible with linux distributions that do not have NPTL thearding enabled.

From: Ville Mattila <redmine@...>
Date: 2009-04-01 09:45:17 UTC
List: ruby-core #23095
Bug #1345: Ruby 1.9.1-p0 is incomatible with linux distributions that do not have NPTL thearding enabled.
http://redmine.ruby-lang.org/issues/show/1345

Author: Ville Mattila
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]

For example older redhat's upto RH enterprise linux 2.1 do not have NPTL.
The symptom is that the ruby just hangs.
If I've understood correctly the old linux posix thread implementation do not support
forking, exec* functions in threads.

Here is what is happening
cat rubythreadtest.rb:
File = File.new("threadtest_result.txt", "w")
file.puts "Calling Process.daemon"
file.flush
Process.daemon(true, false)
file.puts "Running external program with `"
file.flush
file.puts `./ruby -v`
file.flush
exit

[root@pike ruby-1.9.1-p0]# ./ruby threadtest.rb   
[root@pike ruby-1.9.1-p0]# ps -aef | grep ruby
root     23828     1  0 11:02 ?        00:00:00 ./ruby threadtest.rb
root     23832 17257  0 11:03 pts/2    00:00:00 grep ruby
[root@pike ruby-1.9.1-p0]# cat threadtest_result.txt 
Calling Process.daemon
Running external program with `
[root@pike ruby-1.9.1-p0]# kill 23828
[root@pike ruby-1.9.1-p0]# ps -aef | grep ruby
root     23828     1  0 11:02 ?        00:00:00 ./ruby threadtest.rb
root     23835 17257  0 11:03 pts/2    00:00:00 grep ruby
[root@pike ruby-1.9.1-p0]# kill -9 23828
[root@pike ruby-1.9.1-p0]# ps -aef | grep ruby
root     23837 17257  0 11:03 pts/2    00:00:00 grep ruby
[root@pike ruby-1.9.1-p0]# cat /etc/issue
Red Hat Linux release 7.2 (Enigma)
Kernel \r on an \m

root@atf:/data/ruby/bin# ./ruby threadtest.rb 
root@atf:/data/ruby/bin# ps -aef | grep ruby
root      5700  5509  0 12:14 pts/0    00:00:00 grep ruby
root@atf:/data/ruby/bin# cat threadtest_result.txt 
Calling Process.daemon
Running external program with `
ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-linux]
root@atf:/data/ruby/bin# cat /etc/issue
Ubuntu 8.10 \n \l


Fro RH 7.2 I needed to disable ext/openssl and patch the
vm_dump.c as follows:
--- vm_dump_orig.c	Wed Apr  1 11:32:06 2009
+++ vm_dump.c	Wed Apr  1 08:41:52 2009
@@ -10,7 +10,7 @@
 
 
 #include "ruby/ruby.h"
-#include "vm_core.h" 
+#include "vm_core.h"
 
 #define MAX_POSBUF 128
 
@@ -564,7 +564,9 @@
 }
 
 VALUE rb_make_backtrace(void);
-
+#if HAVE_BACKTRACE
+#include <execinfo.h>
+#endif
 void
 rb_vm_bugreport(void)
 {
@@ -589,7 +591,6 @@
     }
 
 #if HAVE_BACKTRACE
-/*  #in */clude <execinfo.h>
 #define MAX_NATIVE_TRACE 1024
     {
 	static void *trace[MAX_NATIVE_TRACE];


----------------------------------------
http://redmine.ruby-lang.org

In This Thread

Prev Next