SlideShare ist ein Scribd-Unternehmen logo
1 von 42
BioRuby
Running Ruby on Solaris
Naohisa Goto / 後藤直久
Genome Information Research Center, Research
Institute for Microbial Diseases, Osaka Univ.
大阪大学微生物病研究所附属遺伝情報実験センター
Email: ngoto@gen-info.osaka-u.ac.jp
Twitter: @ngotogenome
GitHub: ngoto
BioRuby
Who am I ? / 自己紹介
 Name: Naohisa Goto / 名前: 後藤 直久
 Affiliation: Genome Information Research Center,
Research Institute for Microbial Diseases, Osaka University
所属: 大阪大学微生物病研究所附属遺伝情報実験センター
 Position: Assistant Professor / 役職: 助教
 Twitter: @ngotogenome
 GitHub: ngoto
 Email: ngoto@gen-info.osaka-u.ac.jp
 First Ruby experience: 1.2.6 (compiled in 22/Jun/1999)
BioRuby
Who am I ? / 自己紹介
 First Ruby experience: 1.2.6
 compiled in 22/Jun/1999
 Using Ruby for genome data analysis
 BioRuby developer since 2001
 CRuby committer since July/2011
 as a platform maintainer of Solaris
 RubySpec committer since Oct/2015.
BioRuby
My Activities: BioRuby
 Bioinformatics software library and tools written
in the Ruby Language
Rubyで書かれた生物情報科学(バイオインフォマティ
クス)用ライブラリとツール集
 Free software (Ruby License)
 http://bioruby.org/
 https://github.com/bioruby/bioruby
 % gem install bio
BioRuby
Next-Generation DNA Sequencers
Performance: > 50Gb/day!
次世代シークエンサー
BioRuby
Our Servers for Genome Data Analysis
Fujitsu PRIMEQUEST1800E2
CPU: Xeon E7-8870 x 8 (80 cores)
Memory: 2TB
OS: RedHat Enterprise Linux 6.5
Fujitsu SPARC Enterprise M5000
CPU: SPARC64VII 2.66GHz x 4
Memory: 512GB
OS: Solaris10
Fujitsu PRIMERGY RX200 x 18
CPU: Xeon X5690 x2 (12 cores)
Memory: 96GB
OS: RedHat Enterprise Linux 6.5
DDN GridScaler
3TB SATA HDD x 600 = 1.8PB
(Actual capacity 1.2PB)
BioRuby
What is Solaris?
 "Solaris is a Unix operating system originally developed
by Sun Microsystems."
「Solaris(ソラリス)はサン・マイクロシステムズ(サン)によって
開発され、UNIXとして認証を受けたオペレーティングシステム
(OS) である。」
 "Oracle Solaris, as it is named as of 2010, has been
owned by Oracle Corporation since the Sun acquisition
by Oracle in January 2010."
「2010年1月27日のオラクルによるサン買収に伴い、現在の
開発は同社が担っている。」
 Proprietary, closed source / 商用、ソース非公開
https://en.wikipedia.org/wiki/Solaris_%28operating_system%29
https://ja.wikipedia.org/wiki/Solaris
BioRuby
History of Solaris
 1983 SunOS 1.0
…
 1988/12 SunOS 4.0
 1992/6 Solaris 2.0 (= SunOS 5.0)
…
 1997/7 Solaris 2.6
 1998/11 Solaris 7 (= Solaris 2.7 = SunOS 5.7)
…
 2005/1 Solaris 10
 2011/11 Solaris 11
BioRuby
Features of Solaris / 特徴
 Cutting-edge features / 先端機能
 Solaris Container (Zone)
 ZFS
 DTrace
 RBAC (Role-Based Access Control)
 …
 Backward compatibility / 後方互換性
 Old binary can be run without changes
 古いバイナリがそのまま動く
BioRuby
Demo: Binary in 1999 works!
The old binary "ruby_1.2.6" build in Jun 22 1999
works on Solaris 10 today without modification!
BioRuby
Supported Architecture
 SPARC
 Original hardware sold by Oracle, Fujitsu, etc.
"SPARC Solaris"
 x64 (x86-64, AMD64, Intel 64)
 PC (IBM PC/AT compatible architecture)
"Intel Solaris"
BioRuby
SPARC Processor
 RISC instruction set architecture
 Big-endian
 Developed by Sun Microsystems since 1987
 SPARC is a registered trademark of SPARC
International, Inc. since 1989
 The SPARC architecture is fully open, non-
proprietary and royalty free.
 Current versions:
SPARC V8 (32-bit) and SPARC V9 (64-bit)
BioRuby
Why I started using Solaris?
 I've been using Solaris on SPARC since 1999,
simply because they have been available in our
institute. / 所属組織にあったから、1999年から使用。
 In 1990's, Solaris and SPARC was the best choice
of scientific computing.
1990年代、SolarisとSPARCは科学技術演算に最適だった。
 De-facto standard / 事実上の標準
 Availability of software was good / ソフトの入手が容易
BioRuby
Why do I still use Solaris?
 Today, our main machines are Linux.
 We still maintain a SPARC Solaris server
 For the past software / 昔のソフトを使うため
 For reproducibility of science / 科学の再現性のため
BioRuby
How I became a Ruby Committer
1. Report a bug on Solaris / バグを報告
• Including build failure, test failure/error
2. Report patch for the bug / パッチを書いて送る
3. Repeat 1..2 several times / 1,2 を数回繰り返す
BioRuby
How to build Ruby on Solaris
 Recommended requirements
 GNU Tar
 GNU Bash
 GNU Make
 GNU Binutils
 OpenSSL
 Requirements to build from SVN head
 GNU Autoconf
 GNU Bison
 Libffi
 Ruby
BioRuby
PATH is important
 Two or more variants for a command may exist
in different directories
 e.g. make
 /usr/ccs/bin/make
 /usr/xpg4/bin/make
 /usr/sfw/bin/gmake
 /usr/local/bin/make (installed by system admin)
 …
 Setting appropriate PATH is important!
 The order of directories in PATH is also important
BioRuby
C/C++ Compilers on Solaris
 Oracle Solaris Studio
 Latest version: 12.4 (Nov/2014)
 Former names: Sun Studio, Sun Workshop
 /opt/SolarisStudio12.4/bin/cc
 GCC
 /usr/sfw/bin/gcc (version 3.4.3)
 /opt/csw/bin/gcc, /usr/local/bin/gcc, …
 Fujitsu C Compiler (fcc)
 Latest version: ??? (I'm using 5.6 (Nov/2006))
 /opt/FSUNf90/bin/fcc
BioRuby
Standards
 Solaris supports multiple standards, including:
 System V Interface Definition Edition 3 (SVID)
 X/Open
 ANSI C (C90)
 POSIX.1-2001 (SUSv3)
 ISO C (C99)
 Compile-time options for selecting some standards
 e.g. -D_XOPEN_SOURCE=500 for SUSv2.
 Since Ruby 2.3, -D_XOPEN_SOURCE=xxx is automatically added.
 Behaviors may be changed with the selected standards.
 See "man standards"
 For libm (Math) functions, see
http://docs.oracle.com/cd/E37069_01/html/E39019/z4000ac610479.html
BioRuby
64-bit compile
 Solaris is 64-bit OS, but most binaries are 32-bit
 For keeping backward compatibility?
 Compiler's default: 32-bit compile
 64-bit compile option in CFLAGS
 GCC: -m64
 Oracle Solaris Studio (Sun Studio) 12.x: -m64
 Sun Studio (Sun Workshop) 11 or earlier:
 SPARC: -xarch=v9
 x86 (Intel): -xarch=generic64
 Fujitsu C Compiler (fcc): -KV9
BioRuby
64-bit compile: 64-bit Library
 Solaris is 64-bit OS, but most binaries are 32-bit
 All major compiler's defaults are 32-bit
 64-bit libraries are often forgotten to be
installed, especially for installation by hand
without using package management system.
パッケージ管理システムを使わない手動インストールの場合、
64ビットのライブラリはインスールされ忘れている事が多い。
BioRuby
Default Library Search Path
 "crle" shows default library search path
 Equivalent of "ldconfig" in Linux and *BSD.
 "crle" for 32-bit, "crle -64" for 64-bit
% crle
Default configuration file (/var/ld/ld.config) not found
Platform: 32-bit MSB SPARC
Default Library Path (ELF): /lib:/usr/lib (system default)
Trusted Directories (ELF): /lib/secure:/usr/lib/secure
(system default)
% crle -64
Default configuration file (/var/ld/64/ld.config) not found
Platform: 64-bit MSB SPARCV9
Default Library Path (ELF): /lib/64:/usr/lib/64 (system
default)
Trusted Directories (ELF): /lib/secure/64:/usr/lib/secure/64
(system default)
BioRuby
Extra Libraries
 Library locations (not in the default search path)
should be specified in LDFLAGS
 -L for static libraries, -R for shared libraries.
 Example for GCC and Oracle Solaris Studio 12:
LDFLAGS="-m64 -L/usr/local/64/lib -R/usr/local/64/lib"
 C header file locations should also be specified
in CPPFLAGS
 e.g. CPPFLAGS="-I/usr/local/64/include"
BioRuby
LD_LIBRARY_PATH considered harmful
 LD_LIBRARY_PATH and derivatives for runtime
shared library path.
 LD_LIBRARY_PATH for both 32- and 64-bit
 LD_LIBRARY_PATH_32 for 32-bit
 LD_LIBRARY_PATH_64 for 64-bit
 They should only be used for temporary use.
 Don't set LD_LIBRARY_PATH globally
 Don't set in .cshrc, .login, .profile, etc.
BioRuby
64-bit build name
 Even when setting 64-bit compile option, build name
guessed by ./configure would be the same as that of 32-
bit compile.
 (32-bit) SPARC Solaris 10: sparc-sun-solaris2.10
 (32-bit) Intel Solaris 10: i386-pc-solaris2.10
 Setting build name for 64-bit compile is recommended.
 SPARC Solaris 10: --build=sparc64-sun-solaris2.10
 Intel Solaris 10: --build=x86_64-pc-solaris2.10
% ./configure --help
(snip)
System types:
--build=BUILD configure for building on BUILD [guessed]
BioRuby
Example of ./configure
 Compiler: Oracle Solaris Studio 12.4
 64-bit compile
% setenv PATH /opt/SolarisStudio12.4/bin:/usr/local/64/bin:/usr/l
ocal/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/bin:/bin:/usr/openwin/
bin:/usr/dt/bin:/usr/X11/bin:/usr/sbin
% unsetenv LD_LIBRARY_PATH
% unsetenv LD_LIBRARY_PATH_32
% unsetenv LD_LIBRARY_PATH_64
% setenv CC "cc"
% setenv CXX "CC"
% setenv CPPFLAGS "-I/usr/local/64/include"
% setenv CFLAGS "-xO3 -m64"
% setenv CXXFLAGS $CFLAGS
% setenv LDFLAGS "-m64 -L/usr/local/64/lib -R/usr/local/64/lib"
% setenv DLDFLAGS $LDFLAGS
% ./configure --prefix=/home/xxxx/testruby/2.3.0
--build=sparc64-sun-solaris2.10
--with-tclConfig-dir=/usr/local/64/lib
--with-tkConfig-dir=/usr/local/64/lib
BioRuby
make
checking if make is GNU make... yes
checking for nroff... /usr/bin/nroff
.ext/include/sparc64-solaris2.10/ruby/config.h updated
configure: ruby library version = 2.3.0
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating Makefile
config.status: creating ruby-2.3.pc
% make V=1
cc -xO3 -xtarget=sparc64viiplus -m64 -DRUBY_EXPORT -I/usr/local/64/i
nclude -I. -I.ext/include/sparc64-solaris2.10 -I./include -I. -o p
arse.o -c parse.c
"parse.y", line 1256: operands have incompatible types:
void ":" int
(snip)
cc: acomp failed for parse.c
make: *** [parse.o] Error 2
BioRuby
Reporting Bug via bugs.ruby-lang.org
BioRuby
Typical Bugs on Solaris, SPARC
 Typo inside #if .. #endif conditions
 Conflict of names
 File name, function, macro, …
 Endian
 Word alignment
BioRuby
Simple Bug Fix: Typo
(r36290) [Bug #6689][ruby-dev:45904]
 Only affected on Solaris, because it was inside #if.
 The person who wrote the original line (@nobu) did not
(and could not) test the code on 64-bit Solaris.
 Even for the super programmer, it is difficult to check
such code without building and running on the platform.
#elif defined(__sun)
#include <atomic.h>
# if SIZEOF_SIZE_T == SIZEOF_LONG
# define ATOMIC_SIZE_ADD(var, val) atomic_add_long(&(var), (val))
# define ATOMIC_SIZE_SUB(var, val) atomic_add_long(&(var), -(val))
# define ATOMIC_SIZE_INC(var) atomic_inc_ulong(&(var))
# define ATOMIC_SIZE_DEC(var) atomic_dec_ulong(&(var))
-# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_long(&(var),
(val))
+# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_ulong(&(var),
(val))
BioRuby
Simple Fix: Conflict of names
(r37604) [ruby-dev:46414] [Bug #7287]
 Solaris has "atomic.h" in /usr/include
 There was "atomic.h" in Ruby source
 Only the latter was loaded, but both were needed
 Renamed "atomic.h" to "ruby_atomic.h" in Ruby
source code
BioRuby
Big-Endian and Little-Endian
1A
2B
3C
4D
4D
3C
2B
1A
Big-Endian
(SPARC, etc.)
Little-Endian
(x86_64, etc.)
x
x+1
x+2
x+3
(32-bit integer)
1A 2B 3C 4D
x
x+1
x+2
x+3
BioRuby
Big-Endian and Little-Endian
00
00
00
00
1A
2B
3C
4D
4D
3C
2B
1A
00
00
00
00
Big-Endian
(SPARC, etc.)
Little-Endian
(x86_64, etc.)
x
x+1
x+2
x+3
x+4
x+5
x+6
x+7
(64-bit integer)
00 00 00 00 1A 2B 3C 4D
x
x+1
x+2
x+3
x+4
x+5
x+6
x+7
BioRuby
Endian Bug Fix
(r37996) [ruby-core:50292] [Bug #7463]
--- a/ext/openssl/ossl_ssl.c
+++ b/ext/openssl/ossl_ssl.c
@@ -569,10 +569,12 @@ static VALUE
ssl_npn_encode_protocol_i(VALUE cur, VALUE encoded)
{
int len = RSTRING_LENINT(cur);
+ char len_byte;
if (len < 1 || len > 255)
ossl_raise(eSSLError, "Advertised protocol must have length 1..255");
/* Encode the length byte */
- rb_str_buf_cat(encoded, (const char *) &len, 1);
+ len_byte = len;
+ rb_str_buf_cat(encoded, &len_byte, 1);
rb_str_buf_cat(encoded, RSTRING_PTR(cur), len);
return Qnil;
}
BioRuby
Word Alignment
 On SPARC, n-byte (= n * 8 bit) integer or float
data must be put at a memory address equal to
some multiple of the word size n.
1A 2B 3C 4D
Address: 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107
1A 2B 3C 4D
1A 2B 3C 4D
1A 2B 3C 4D
1A 2B 3C 4D
OK
OK
Bus Error
Bus Error
Bus Error
BioRuby
Alignment Bug Fix
+#if !defined(INFINITY) || !defined(NAN)
+union bytesequence4_or_float {
+ unsigned char bytesequence[4];
+ float float_value;
+};
+#endif
#ifdef HAVE_INFINITY
#elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */
-const unsigned char rb_infinity[] = "x00x00x80x7f";
+const union bytesequence4_or_float rb_infinity = { 0x00, 0x00,
0x80, 0x7f };
#else
-const unsigned char rb_infinity[] = "x7fx80x00x00";
+const union bytesequence4_or_float rb_infinity = { 0x7f, 0x80,
0x00, 0x00 };
#endif
-RUBY_EXTERN const unsigned char rb_infinity[];
-# define INFINITY (*(float *)rb_infinity)
+RUBY_EXTERN const union bytesequence4_or_float rb_infinity;
+# define INFINITY (rb_infinity.float_value)
(r33502) [Bug #5469] [ruby-dev: 44657]
BioRuby
Most Bugs are non-specific
 Most bugs occurred on Solaris were NOT specific
to the platform but would affect all platforms.
 Difference of platform can reveal hidden bugs
 Different OS
 Different memory management
 Different CPU architecture
 Endian
 Alignment
 Different compiler
BioRuby
Integer Overflow
(r32757) [ruby-dev:43284] [Bug #4456]
 s+(n) overflows when n is very large
 s: pointer; n: value coming from user's Ruby code
 On i386 Linux, it overflows with very large n such as (2**31-1)
 On 32-bit SPARC Solaris, it overflows with relatively smaller
value, due to the different memory management.
 Calculation order was changed to prevent overflow
BioRuby
Forgotten "+1"
(r48999) [ruby-dev:48779] [Bug #10646]
 The allocated memory size of ptr includes the region to
record its size, and thus "+1" must be needed.
 During make test-all, SEGV observed only on Solaris, but
apparently all platforms should be affected.
--- a/gc.c
+++ b/gc.c
@@ -7674,5 +7674,5 @@ wmap_final_func(st_data_t *key, st_data_t
*value, st_data_t arg, int existing)
if (j < i) {
- ptr = ruby_sized_xrealloc2(ptr, j, sizeof(VALUE), i);
+ ptr = ruby_sized_xrealloc2(ptr, j + 1, sizeof(VALUE), i);
ptr[0] = j;
*value = (st_data_t)ptr;
}
BioRuby
transcode.c: fix race condition
(r51037) [ruby-dev:49106] [Bug #11277]
https://bugs.ruby-lang.org/issues/11277
Summary:
 The bug was first observed only on Solaris.
 I found that it also occurred on Linux, after investigation.
 I found a simple reproduction code.
 Fixed by @nobu
% ruby --disable=gems -e '(0..2).collect { |_| Thread.new { p
"u3042".encode("EUC-JP") }}.each { |t| t.join }'
-e:1: warning: failed to load encoding (EUC-JP); use ASCII-8BIT
instead
-e:1:in `encode': code converter not found (UTF-8 to EUC-JP)
(Encoding::ConverterNotFoundError)
from -e:1:in `block (2 levels) in <main>'
BioRuby
make test-all: 0 failures, 0 errors
% make test-all TESTS=-v V=1
(snip)
XMLRPC::ClientTest#test_new2_ssl_custom_port = 0.00 s = .
XMLRPC::ClientTest#test_new2_user_password = 0.00 s = .
XMLRPC::ClientTest#test_request = 0.03 s = .
Finished tests in 1537.222241s, 10.3446 tests/s, 1451.5078 assertions/s.
15902 tests, 2231290 assertions, 0 failures, 0 errors, 49 skips
ruby -v: ruby 2.3.0dev (2015-12-01) [sparc64-solaris2.10]
make: Nothing to be done for `test-all'.
BioRuby
Conclusions
 It is very difficult to write code with no bugs
without building and running the code, even for
super programmers.
たとえ神プログラマであっても、ビルド・実行せずにバグの無
いコードを書くのは難しい。
 Running on different platforms would reveal
hidden bugs. That's one of the reasons why it is
good to maintain various platforms.
異なる環境で実行したら、隠れたバグが見つかることがある
のが、多様な環境をサポートするのが良い理由の一つ。

Weitere ähnliche Inhalte

Was ist angesagt?

RubyKaigi2015 making robots-with-mruby
RubyKaigi2015 making robots-with-mrubyRubyKaigi2015 making robots-with-mruby
RubyKaigi2015 making robots-with-mrubyyamanekko
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015Charles Nutter
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mrubyHiroshi SHIBATA
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHiroshi SHIBATA
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしHiroshi SHIBATA
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web DevelopmentKoichi ITO
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Hiroshi SHIBATA
 
The secret of programming language development and future
The secret of programming  language development and futureThe secret of programming  language development and future
The secret of programming language development and futureHiroshi SHIBATA
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mrubyHiroshi SHIBATA
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for RubyHiroshi SHIBATA
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015Fernando Hamasaki de Amorim
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mrubyHiroshi SHIBATA
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018Charles Nutter
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGuillaume Laforge
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHiroshi SHIBATA
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Masahiro Nagano
 
Improve extension API: C++ as better language for extension
Improve extension API: C++ as better language for extensionImprove extension API: C++ as better language for extension
Improve extension API: C++ as better language for extensionKouhei Sutou
 

Was ist angesagt? (20)

RubyKaigi2015 making robots-with-mruby
RubyKaigi2015 making robots-with-mrubyRubyKaigi2015 making robots-with-mruby
RubyKaigi2015 making robots-with-mruby
 
JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015JRuby 9000 - Taipei Ruby User's Group 2015
JRuby 9000 - Taipei Ruby User's Group 2015
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
mruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなしmruby で mackerel のプラグインを作るはなし
mruby で mackerel のプラグインを作るはなし
 
Gate of Agile Web Development
Gate of Agile Web DevelopmentGate of Agile Web Development
Gate of Agile Web Development
 
Practical ngx_mruby
Practical ngx_mrubyPractical ngx_mruby
Practical ngx_mruby
 
Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0Gemification for Ruby 2.5/3.0
Gemification for Ruby 2.5/3.0
 
The secret of programming language development and future
The secret of programming  language development and futureThe secret of programming  language development and future
The secret of programming language development and future
 
How to test code with mruby
How to test code with mrubyHow to test code with mruby
How to test code with mruby
 
Ruby meets Go
Ruby meets GoRuby meets Go
Ruby meets Go
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
 
Middleware as Code with mruby
Middleware as Code with mrubyMiddleware as Code with mruby
Middleware as Code with mruby
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018
 
Going to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific LanguagesGoing to Mars with Groovy Domain-Specific Languages
Going to Mars with Groovy Domain-Specific Languages
 
How to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rbHow to develop Jenkins plugin using to ruby and Jenkins.rb
How to develop Jenkins plugin using to ruby and Jenkins.rb
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
 
Improve extension API: C++ as better language for extension
Improve extension API: C++ as better language for extensionImprove extension API: C++ as better language for extension
Improve extension API: C++ as better language for extension
 

Andere mochten auch

Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageSATOSHI TAGOMORI
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container EraSadayuki Furuhashi
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsSadayuki Furuhashi
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupSadayuki Furuhashi
 
"fireap" - fast task runner on consul
"fireap" - fast task runner on consul"fireap" - fast task runner on consul
"fireap" - fast task runner on consulIKEDA Kiyoshi
 
grifork - fast propagative task runner -
grifork - fast propagative task runner -grifork - fast propagative task runner -
grifork - fast propagative task runner -IKEDA Kiyoshi
 
DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?Sadayuki Furuhashi
 
Introduction to poloxy - proxy for alerting
Introduction to poloxy - proxy for alertingIntroduction to poloxy - proxy for alerting
Introduction to poloxy - proxy for alertingIKEDA Kiyoshi
 
TRICK2015 results
TRICK2015 resultsTRICK2015 results
TRICK2015 resultsmametter
 

Andere mochten auch (9)

Data Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby UsageData Analytics Service Company and Its Ruby Usage
Data Analytics Service Company and Its Ruby Usage
 
Logging for Production Systems in The Container Era
Logging for Production Systems in The Container EraLogging for Production Systems in The Container Era
Logging for Production Systems in The Container Era
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
Fluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes MeetupFluentd at Bay Area Kubernetes Meetup
Fluentd at Bay Area Kubernetes Meetup
 
"fireap" - fast task runner on consul
"fireap" - fast task runner on consul"fireap" - fast task runner on consul
"fireap" - fast task runner on consul
 
grifork - fast propagative task runner -
grifork - fast propagative task runner -grifork - fast propagative task runner -
grifork - fast propagative task runner -
 
DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?DigdagはなぜYAMLなのか?
DigdagはなぜYAMLなのか?
 
Introduction to poloxy - proxy for alerting
Introduction to poloxy - proxy for alertingIntroduction to poloxy - proxy for alerting
Introduction to poloxy - proxy for alerting
 
TRICK2015 results
TRICK2015 resultsTRICK2015 results
TRICK2015 results
 

Ähnlich wie Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)

Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Workhorse Computing
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemLinaro
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)RuggedBoardGroup
 
First Seminar
First SeminarFirst Seminar
First SeminarChudack
 
Chw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsChw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsBalazs Bucsay
 
One RubyStack to Rule them All
One RubyStack to Rule them AllOne RubyStack to Rule them All
One RubyStack to Rule them Allelliando dias
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsGergely Szabó
 
repositor.io - Simple Repository Management
repositor.io - Simple Repository Managementrepositor.io - Simple Repository Management
repositor.io - Simple Repository Managementinovex GmbH
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceSUSE Labs Taipei
 
An Introduction to RISC-V bootflow
An Introduction to RISC-V bootflowAn Introduction to RISC-V bootflow
An Introduction to RISC-V bootflowAtish Patra
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Vincent Batts
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdatedoscon2007
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerunidsecconf
 
BOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containersBOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containersBenjamin Gandon
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linuxchinkshady
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpowebuploader
 

Ähnlich wie Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015) (20)

Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
 
6202942
62029426202942
6202942
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
First Seminar
First SeminarFirst Seminar
First Seminar
 
Chw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutionsChw00t: How to break out from various chroot solutions
Chw00t: How to break out from various chroot solutions
 
My ROS Experience
My ROS ExperienceMy ROS Experience
My ROS Experience
 
One RubyStack to Rule them All
One RubyStack to Rule them AllOne RubyStack to Rule them All
One RubyStack to Rule them All
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native Environments
 
161110
161110161110
161110
 
repositor.io - Simple Repository Management
repositor.io - Simple Repository Managementrepositor.io - Simple Repository Management
repositor.io - Simple Repository Management
 
Convert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build ServiceConvert your package to multibuild on Open Build Service
Convert your package to multibuild on Open Build Service
 
An Introduction to RISC-V bootflow
An Introduction to RISC-V bootflowAn Introduction to RISC-V bootflow
An Introduction to RISC-V bootflow
 
Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]Slackware Demystified [SELF 2011]
Slackware Demystified [SELF 2011]
 
Os Grossupdated
Os GrossupdatedOs Grossupdated
Os Grossupdated
 
Linux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - WonokaerunLinux kernel-rootkit-dev - Wonokaerun
Linux kernel-rootkit-dev - Wonokaerun
 
BOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containersBOSH deploys distributed systems, and Diego runs any containers
BOSH deploys distributed systems, and Diego runs any containers
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux9 steps to install and configure postgre sql from source on linux
9 steps to install and configure postgre sql from source on linux
 
FreeBSD - LinuxExpo
FreeBSD - LinuxExpoFreeBSD - LinuxExpo
FreeBSD - LinuxExpo
 

Kürzlich hochgeladen

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Kürzlich hochgeladen (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)

  • 1. BioRuby Running Ruby on Solaris Naohisa Goto / 後藤直久 Genome Information Research Center, Research Institute for Microbial Diseases, Osaka Univ. 大阪大学微生物病研究所附属遺伝情報実験センター Email: ngoto@gen-info.osaka-u.ac.jp Twitter: @ngotogenome GitHub: ngoto
  • 2. BioRuby Who am I ? / 自己紹介  Name: Naohisa Goto / 名前: 後藤 直久  Affiliation: Genome Information Research Center, Research Institute for Microbial Diseases, Osaka University 所属: 大阪大学微生物病研究所附属遺伝情報実験センター  Position: Assistant Professor / 役職: 助教  Twitter: @ngotogenome  GitHub: ngoto  Email: ngoto@gen-info.osaka-u.ac.jp  First Ruby experience: 1.2.6 (compiled in 22/Jun/1999)
  • 3. BioRuby Who am I ? / 自己紹介  First Ruby experience: 1.2.6  compiled in 22/Jun/1999  Using Ruby for genome data analysis  BioRuby developer since 2001  CRuby committer since July/2011  as a platform maintainer of Solaris  RubySpec committer since Oct/2015.
  • 4. BioRuby My Activities: BioRuby  Bioinformatics software library and tools written in the Ruby Language Rubyで書かれた生物情報科学(バイオインフォマティ クス)用ライブラリとツール集  Free software (Ruby License)  http://bioruby.org/  https://github.com/bioruby/bioruby  % gem install bio
  • 5. BioRuby Next-Generation DNA Sequencers Performance: > 50Gb/day! 次世代シークエンサー
  • 6. BioRuby Our Servers for Genome Data Analysis Fujitsu PRIMEQUEST1800E2 CPU: Xeon E7-8870 x 8 (80 cores) Memory: 2TB OS: RedHat Enterprise Linux 6.5 Fujitsu SPARC Enterprise M5000 CPU: SPARC64VII 2.66GHz x 4 Memory: 512GB OS: Solaris10 Fujitsu PRIMERGY RX200 x 18 CPU: Xeon X5690 x2 (12 cores) Memory: 96GB OS: RedHat Enterprise Linux 6.5 DDN GridScaler 3TB SATA HDD x 600 = 1.8PB (Actual capacity 1.2PB)
  • 7. BioRuby What is Solaris?  "Solaris is a Unix operating system originally developed by Sun Microsystems." 「Solaris(ソラリス)はサン・マイクロシステムズ(サン)によって 開発され、UNIXとして認証を受けたオペレーティングシステム (OS) である。」  "Oracle Solaris, as it is named as of 2010, has been owned by Oracle Corporation since the Sun acquisition by Oracle in January 2010." 「2010年1月27日のオラクルによるサン買収に伴い、現在の 開発は同社が担っている。」  Proprietary, closed source / 商用、ソース非公開 https://en.wikipedia.org/wiki/Solaris_%28operating_system%29 https://ja.wikipedia.org/wiki/Solaris
  • 8. BioRuby History of Solaris  1983 SunOS 1.0 …  1988/12 SunOS 4.0  1992/6 Solaris 2.0 (= SunOS 5.0) …  1997/7 Solaris 2.6  1998/11 Solaris 7 (= Solaris 2.7 = SunOS 5.7) …  2005/1 Solaris 10  2011/11 Solaris 11
  • 9. BioRuby Features of Solaris / 特徴  Cutting-edge features / 先端機能  Solaris Container (Zone)  ZFS  DTrace  RBAC (Role-Based Access Control)  …  Backward compatibility / 後方互換性  Old binary can be run without changes  古いバイナリがそのまま動く
  • 10. BioRuby Demo: Binary in 1999 works! The old binary "ruby_1.2.6" build in Jun 22 1999 works on Solaris 10 today without modification!
  • 11. BioRuby Supported Architecture  SPARC  Original hardware sold by Oracle, Fujitsu, etc. "SPARC Solaris"  x64 (x86-64, AMD64, Intel 64)  PC (IBM PC/AT compatible architecture) "Intel Solaris"
  • 12. BioRuby SPARC Processor  RISC instruction set architecture  Big-endian  Developed by Sun Microsystems since 1987  SPARC is a registered trademark of SPARC International, Inc. since 1989  The SPARC architecture is fully open, non- proprietary and royalty free.  Current versions: SPARC V8 (32-bit) and SPARC V9 (64-bit)
  • 13. BioRuby Why I started using Solaris?  I've been using Solaris on SPARC since 1999, simply because they have been available in our institute. / 所属組織にあったから、1999年から使用。  In 1990's, Solaris and SPARC was the best choice of scientific computing. 1990年代、SolarisとSPARCは科学技術演算に最適だった。  De-facto standard / 事実上の標準  Availability of software was good / ソフトの入手が容易
  • 14. BioRuby Why do I still use Solaris?  Today, our main machines are Linux.  We still maintain a SPARC Solaris server  For the past software / 昔のソフトを使うため  For reproducibility of science / 科学の再現性のため
  • 15. BioRuby How I became a Ruby Committer 1. Report a bug on Solaris / バグを報告 • Including build failure, test failure/error 2. Report patch for the bug / パッチを書いて送る 3. Repeat 1..2 several times / 1,2 を数回繰り返す
  • 16. BioRuby How to build Ruby on Solaris  Recommended requirements  GNU Tar  GNU Bash  GNU Make  GNU Binutils  OpenSSL  Requirements to build from SVN head  GNU Autoconf  GNU Bison  Libffi  Ruby
  • 17. BioRuby PATH is important  Two or more variants for a command may exist in different directories  e.g. make  /usr/ccs/bin/make  /usr/xpg4/bin/make  /usr/sfw/bin/gmake  /usr/local/bin/make (installed by system admin)  …  Setting appropriate PATH is important!  The order of directories in PATH is also important
  • 18. BioRuby C/C++ Compilers on Solaris  Oracle Solaris Studio  Latest version: 12.4 (Nov/2014)  Former names: Sun Studio, Sun Workshop  /opt/SolarisStudio12.4/bin/cc  GCC  /usr/sfw/bin/gcc (version 3.4.3)  /opt/csw/bin/gcc, /usr/local/bin/gcc, …  Fujitsu C Compiler (fcc)  Latest version: ??? (I'm using 5.6 (Nov/2006))  /opt/FSUNf90/bin/fcc
  • 19. BioRuby Standards  Solaris supports multiple standards, including:  System V Interface Definition Edition 3 (SVID)  X/Open  ANSI C (C90)  POSIX.1-2001 (SUSv3)  ISO C (C99)  Compile-time options for selecting some standards  e.g. -D_XOPEN_SOURCE=500 for SUSv2.  Since Ruby 2.3, -D_XOPEN_SOURCE=xxx is automatically added.  Behaviors may be changed with the selected standards.  See "man standards"  For libm (Math) functions, see http://docs.oracle.com/cd/E37069_01/html/E39019/z4000ac610479.html
  • 20. BioRuby 64-bit compile  Solaris is 64-bit OS, but most binaries are 32-bit  For keeping backward compatibility?  Compiler's default: 32-bit compile  64-bit compile option in CFLAGS  GCC: -m64  Oracle Solaris Studio (Sun Studio) 12.x: -m64  Sun Studio (Sun Workshop) 11 or earlier:  SPARC: -xarch=v9  x86 (Intel): -xarch=generic64  Fujitsu C Compiler (fcc): -KV9
  • 21. BioRuby 64-bit compile: 64-bit Library  Solaris is 64-bit OS, but most binaries are 32-bit  All major compiler's defaults are 32-bit  64-bit libraries are often forgotten to be installed, especially for installation by hand without using package management system. パッケージ管理システムを使わない手動インストールの場合、 64ビットのライブラリはインスールされ忘れている事が多い。
  • 22. BioRuby Default Library Search Path  "crle" shows default library search path  Equivalent of "ldconfig" in Linux and *BSD.  "crle" for 32-bit, "crle -64" for 64-bit % crle Default configuration file (/var/ld/ld.config) not found Platform: 32-bit MSB SPARC Default Library Path (ELF): /lib:/usr/lib (system default) Trusted Directories (ELF): /lib/secure:/usr/lib/secure (system default) % crle -64 Default configuration file (/var/ld/64/ld.config) not found Platform: 64-bit MSB SPARCV9 Default Library Path (ELF): /lib/64:/usr/lib/64 (system default) Trusted Directories (ELF): /lib/secure/64:/usr/lib/secure/64 (system default)
  • 23. BioRuby Extra Libraries  Library locations (not in the default search path) should be specified in LDFLAGS  -L for static libraries, -R for shared libraries.  Example for GCC and Oracle Solaris Studio 12: LDFLAGS="-m64 -L/usr/local/64/lib -R/usr/local/64/lib"  C header file locations should also be specified in CPPFLAGS  e.g. CPPFLAGS="-I/usr/local/64/include"
  • 24. BioRuby LD_LIBRARY_PATH considered harmful  LD_LIBRARY_PATH and derivatives for runtime shared library path.  LD_LIBRARY_PATH for both 32- and 64-bit  LD_LIBRARY_PATH_32 for 32-bit  LD_LIBRARY_PATH_64 for 64-bit  They should only be used for temporary use.  Don't set LD_LIBRARY_PATH globally  Don't set in .cshrc, .login, .profile, etc.
  • 25. BioRuby 64-bit build name  Even when setting 64-bit compile option, build name guessed by ./configure would be the same as that of 32- bit compile.  (32-bit) SPARC Solaris 10: sparc-sun-solaris2.10  (32-bit) Intel Solaris 10: i386-pc-solaris2.10  Setting build name for 64-bit compile is recommended.  SPARC Solaris 10: --build=sparc64-sun-solaris2.10  Intel Solaris 10: --build=x86_64-pc-solaris2.10 % ./configure --help (snip) System types: --build=BUILD configure for building on BUILD [guessed]
  • 26. BioRuby Example of ./configure  Compiler: Oracle Solaris Studio 12.4  64-bit compile % setenv PATH /opt/SolarisStudio12.4/bin:/usr/local/64/bin:/usr/l ocal/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/bin:/bin:/usr/openwin/ bin:/usr/dt/bin:/usr/X11/bin:/usr/sbin % unsetenv LD_LIBRARY_PATH % unsetenv LD_LIBRARY_PATH_32 % unsetenv LD_LIBRARY_PATH_64 % setenv CC "cc" % setenv CXX "CC" % setenv CPPFLAGS "-I/usr/local/64/include" % setenv CFLAGS "-xO3 -m64" % setenv CXXFLAGS $CFLAGS % setenv LDFLAGS "-m64 -L/usr/local/64/lib -R/usr/local/64/lib" % setenv DLDFLAGS $LDFLAGS % ./configure --prefix=/home/xxxx/testruby/2.3.0 --build=sparc64-sun-solaris2.10 --with-tclConfig-dir=/usr/local/64/lib --with-tkConfig-dir=/usr/local/64/lib
  • 27. BioRuby make checking if make is GNU make... yes checking for nroff... /usr/bin/nroff .ext/include/sparc64-solaris2.10/ruby/config.h updated configure: ruby library version = 2.3.0 configure: creating ./config.status config.status: creating GNUmakefile config.status: creating Makefile config.status: creating ruby-2.3.pc % make V=1 cc -xO3 -xtarget=sparc64viiplus -m64 -DRUBY_EXPORT -I/usr/local/64/i nclude -I. -I.ext/include/sparc64-solaris2.10 -I./include -I. -o p arse.o -c parse.c "parse.y", line 1256: operands have incompatible types: void ":" int (snip) cc: acomp failed for parse.c make: *** [parse.o] Error 2
  • 28. BioRuby Reporting Bug via bugs.ruby-lang.org
  • 29. BioRuby Typical Bugs on Solaris, SPARC  Typo inside #if .. #endif conditions  Conflict of names  File name, function, macro, …  Endian  Word alignment
  • 30. BioRuby Simple Bug Fix: Typo (r36290) [Bug #6689][ruby-dev:45904]  Only affected on Solaris, because it was inside #if.  The person who wrote the original line (@nobu) did not (and could not) test the code on 64-bit Solaris.  Even for the super programmer, it is difficult to check such code without building and running on the platform. #elif defined(__sun) #include <atomic.h> # if SIZEOF_SIZE_T == SIZEOF_LONG # define ATOMIC_SIZE_ADD(var, val) atomic_add_long(&(var), (val)) # define ATOMIC_SIZE_SUB(var, val) atomic_add_long(&(var), -(val)) # define ATOMIC_SIZE_INC(var) atomic_inc_ulong(&(var)) # define ATOMIC_SIZE_DEC(var) atomic_dec_ulong(&(var)) -# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_long(&(var), (val)) +# define ATOMIC_SIZE_EXCHANGE(var, val) atomic_swap_ulong(&(var), (val))
  • 31. BioRuby Simple Fix: Conflict of names (r37604) [ruby-dev:46414] [Bug #7287]  Solaris has "atomic.h" in /usr/include  There was "atomic.h" in Ruby source  Only the latter was loaded, but both were needed  Renamed "atomic.h" to "ruby_atomic.h" in Ruby source code
  • 32. BioRuby Big-Endian and Little-Endian 1A 2B 3C 4D 4D 3C 2B 1A Big-Endian (SPARC, etc.) Little-Endian (x86_64, etc.) x x+1 x+2 x+3 (32-bit integer) 1A 2B 3C 4D x x+1 x+2 x+3
  • 33. BioRuby Big-Endian and Little-Endian 00 00 00 00 1A 2B 3C 4D 4D 3C 2B 1A 00 00 00 00 Big-Endian (SPARC, etc.) Little-Endian (x86_64, etc.) x x+1 x+2 x+3 x+4 x+5 x+6 x+7 (64-bit integer) 00 00 00 00 1A 2B 3C 4D x x+1 x+2 x+3 x+4 x+5 x+6 x+7
  • 34. BioRuby Endian Bug Fix (r37996) [ruby-core:50292] [Bug #7463] --- a/ext/openssl/ossl_ssl.c +++ b/ext/openssl/ossl_ssl.c @@ -569,10 +569,12 @@ static VALUE ssl_npn_encode_protocol_i(VALUE cur, VALUE encoded) { int len = RSTRING_LENINT(cur); + char len_byte; if (len < 1 || len > 255) ossl_raise(eSSLError, "Advertised protocol must have length 1..255"); /* Encode the length byte */ - rb_str_buf_cat(encoded, (const char *) &len, 1); + len_byte = len; + rb_str_buf_cat(encoded, &len_byte, 1); rb_str_buf_cat(encoded, RSTRING_PTR(cur), len); return Qnil; }
  • 35. BioRuby Word Alignment  On SPARC, n-byte (= n * 8 bit) integer or float data must be put at a memory address equal to some multiple of the word size n. 1A 2B 3C 4D Address: 0x100 0x101 0x102 0x103 0x104 0x105 0x106 0x107 1A 2B 3C 4D 1A 2B 3C 4D 1A 2B 3C 4D 1A 2B 3C 4D OK OK Bus Error Bus Error Bus Error
  • 36. BioRuby Alignment Bug Fix +#if !defined(INFINITY) || !defined(NAN) +union bytesequence4_or_float { + unsigned char bytesequence[4]; + float float_value; +}; +#endif #ifdef HAVE_INFINITY #elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */ -const unsigned char rb_infinity[] = "x00x00x80x7f"; +const union bytesequence4_or_float rb_infinity = { 0x00, 0x00, 0x80, 0x7f }; #else -const unsigned char rb_infinity[] = "x7fx80x00x00"; +const union bytesequence4_or_float rb_infinity = { 0x7f, 0x80, 0x00, 0x00 }; #endif -RUBY_EXTERN const unsigned char rb_infinity[]; -# define INFINITY (*(float *)rb_infinity) +RUBY_EXTERN const union bytesequence4_or_float rb_infinity; +# define INFINITY (rb_infinity.float_value) (r33502) [Bug #5469] [ruby-dev: 44657]
  • 37. BioRuby Most Bugs are non-specific  Most bugs occurred on Solaris were NOT specific to the platform but would affect all platforms.  Difference of platform can reveal hidden bugs  Different OS  Different memory management  Different CPU architecture  Endian  Alignment  Different compiler
  • 38. BioRuby Integer Overflow (r32757) [ruby-dev:43284] [Bug #4456]  s+(n) overflows when n is very large  s: pointer; n: value coming from user's Ruby code  On i386 Linux, it overflows with very large n such as (2**31-1)  On 32-bit SPARC Solaris, it overflows with relatively smaller value, due to the different memory management.  Calculation order was changed to prevent overflow
  • 39. BioRuby Forgotten "+1" (r48999) [ruby-dev:48779] [Bug #10646]  The allocated memory size of ptr includes the region to record its size, and thus "+1" must be needed.  During make test-all, SEGV observed only on Solaris, but apparently all platforms should be affected. --- a/gc.c +++ b/gc.c @@ -7674,5 +7674,5 @@ wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) if (j < i) { - ptr = ruby_sized_xrealloc2(ptr, j, sizeof(VALUE), i); + ptr = ruby_sized_xrealloc2(ptr, j + 1, sizeof(VALUE), i); ptr[0] = j; *value = (st_data_t)ptr; }
  • 40. BioRuby transcode.c: fix race condition (r51037) [ruby-dev:49106] [Bug #11277] https://bugs.ruby-lang.org/issues/11277 Summary:  The bug was first observed only on Solaris.  I found that it also occurred on Linux, after investigation.  I found a simple reproduction code.  Fixed by @nobu % ruby --disable=gems -e '(0..2).collect { |_| Thread.new { p "u3042".encode("EUC-JP") }}.each { |t| t.join }' -e:1: warning: failed to load encoding (EUC-JP); use ASCII-8BIT instead -e:1:in `encode': code converter not found (UTF-8 to EUC-JP) (Encoding::ConverterNotFoundError) from -e:1:in `block (2 levels) in <main>'
  • 41. BioRuby make test-all: 0 failures, 0 errors % make test-all TESTS=-v V=1 (snip) XMLRPC::ClientTest#test_new2_ssl_custom_port = 0.00 s = . XMLRPC::ClientTest#test_new2_user_password = 0.00 s = . XMLRPC::ClientTest#test_request = 0.03 s = . Finished tests in 1537.222241s, 10.3446 tests/s, 1451.5078 assertions/s. 15902 tests, 2231290 assertions, 0 failures, 0 errors, 49 skips ruby -v: ruby 2.3.0dev (2015-12-01) [sparc64-solaris2.10] make: Nothing to be done for `test-all'.
  • 42. BioRuby Conclusions  It is very difficult to write code with no bugs without building and running the code, even for super programmers. たとえ神プログラマであっても、ビルド・実行せずにバグの無 いコードを書くのは難しい。  Running on different platforms would reveal hidden bugs. That's one of the reasons why it is good to maintain various platforms. 異なる環境で実行したら、隠れたバグが見つかることがある のが、多様な環境をサポートするのが良い理由の一つ。