hsbt_away changed the topic of #ruby-core to: check the latest release candidate for 1.9.1 release ftp.ruby-lang.org:/home/yugui/ruby-1.9.1-r26021+1.tar.bz2
idkazuma has joined #ruby-core
nurse has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby-core
nurse has quit [Ping timeout: 264 seconds]
idkazuma has quit [Remote host closed the connection]
nurse has joined #ruby-core
nurse has quit [Client Quit]
nurse has joined #ruby-core
agarie has joined #ruby-core
shiba1 has joined #ruby-core
shiba1 has quit [Quit: Leaving.]
charliesome has joined #ruby-core
agarie has quit [Ping timeout: 276 seconds]
nari has joined #ruby-core
agarie has joined #ruby-core
shiba___ has joined #ruby-core
agarie_ has joined #ruby-core
agarie_ has quit [Client Quit]
agarie has quit [Ping timeout: 276 seconds]
idkazuma has joined #ruby-core
nari has quit [Ping timeout: 240 seconds]
idkazuma has quit [Remote host closed the connection]
nari has joined #ruby-core
shiba___ has quit [Ping timeout: 258 seconds]
nari has quit [Ping timeout: 258 seconds]
shiba___ has joined #ruby-core
idkazuma has joined #ruby-core
shiba___ has quit [Ping timeout: 252 seconds]
<znz_jp> biff: [ruby-changes:28349] hsbt:r40401 (trunk): Replace use of obsolete variable `last-command-char` by @maser [fix GH-290] - http://mla.n-z.jp/?ruby-changes=28349
travis-ci has joined #ruby-core
<travis-ci> [travis-ci] The build was broken. by @hsbt: See http://travis-ci.org/ruby/ruby/builds/6510246
travis-ci has left #ruby-core [#ruby-core]
<charliesome> _ko1: are you there?
judofyr has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby-core
judofyr has quit [Remote host closed the connection]
idkazuma has quit [Remote host closed the connection]
idkazuma has joined #ruby-core
<znz_jp> biff: [ruby-changes:28350] charliesome:r40402 (trunk): * configure.in: Use sigsetjmp by default so jumping out of signal - http://mla.n-z.jp/?ruby-changes=28350
idkazuma has quit [Remote host closed the connection]
travis-ci has joined #ruby-core
<travis-ci> [travis-ci] The build was fixed. by @charliesome: See http://travis-ci.org/ruby/ruby/builds/6512266
travis-ci has left #ruby-core [#ruby-core]
nagachika has joined #ruby-core
rafaelfranca has quit [Read error: Connection reset by peer]
rafaelfranca has joined #ruby-core
shiba___ has joined #ruby-core
shiba___ has quit [Ping timeout: 246 seconds]
<_ko1> hi
<_ko1> charliesome?
<charliesome> hi _ko1
<_ko1> hi
<charliesome> _ko1: that's what i wanted to talk about too
<charliesome> _ko1: you go first
<_ko1> use sigsetjmp instead of all of setjmp?
<_ko1> sigsetjmp is slower than setjmp, so i had replaced them
<charliesome> _ko1: interesting
<_ko1> (old ruby 1.8 uses sigsetjmp everywhere)
<charliesome> i was seeing segfaults in ruby when the segv handler was called the second time
<charliesome> so if you have a C stack overflow, the segv handler is called and throws a SystemStackError
<charliesome> but the operating system still thinks ruby is using the alt stack
<_ko1> wait a miniut
<_ko1> r40402 changes all setjmp to sigsetjmp?
<charliesome> yes
<_ko1> i want to reject it because of performance perspective
<_ko1> your problem is too trivial, i think.
<charliesome> i did try a benchmark with many calls and i didn't notice any performance issues
<_ko1> ah, really?
<charliesome> let me double check now that you mention performance is an issue
<_ko1> sigsetjmp needs system calls
<_ko1> setjmp only need memory operations
<charliesome> _ko1: is that on linux?
<_ko1> linux
<charliesome> ah ok
<_ko1> please check strace
shiba___ has joined #ruby-core
<charliesome> _ko1: if i use dtruss (mac os x equivalent) i see no additional system calls
<charliesome> but on linux it's a problem
<_ko1> :(
<charliesome> actually
<_ko1> i'm not sure about newest linux, but i when measured, sigsetjmp is slower.
<_ko1> s/i when/when i/
<charliesome> _ko1: it's not noticeably slower for me
<_ko1> how about to make another solution for it?
<charliesome> i'm on a very new linux: 3.8.6
<charliesome> _ko1: that's what i wanted to ask about
<charliesome> _ko1: is there a reason ruby doesn't use libsigsegv? I believe it's used in a few other language implementations
<_ko1> what is livsigsegv?
<_ko1> i'm not sure
<charliesome> _ko1: http://www.gnu.org/software/libsigsegv/ cross platform segv/stack overflow handling
<_ko1> 23:04:51 ko1@sasada-8core:~/ruby/build$ time ./miniruby -ve '5_000_000.times{1.times{}}'
<_ko1> ruby 2.1.0dev (2013-04-21 trunk 40402) [x86_64-linux]
<_ko1> real 0m3.393s
<_ko1> user 0m1.904s
<_ko1> sys 0m1.488s
<_ko1> 23:04:58 ko1@sasada-8core:~/ruby/build$ time ../versions/install-trunk-daily_2013-04-16T12_00/bin/ruby -ve '5_000_000.times{1.times{}}'
<_ko1> ruby 2.1.0dev (2013-04-16 trunk 40318) [x86_64-linux]
<_ko1> real 0m1.221s
<_ko1> user 0m1.216s
<_ko1> sys 0m0.008s
<_ko1> significant impact for me
<_ko1> Linux 2.6.32-5-amd64
<charliesome> _ko1: i'll revert it then
<_ko1> maybe it seems Linux 3.?? solve this one :)
<charliesome> _ko1: i think so, however there are still many people using 2.6, so it's not acceptable
<_ko1> ok, so discussion is move to how to solve it.
<_ko1> (thank you for your acceptance)
<_ko1> libsigsegv solves this issue?
<charliesome> _ko1: or perhaps use sigsetjmp on platforms where it is not slower?
<_ko1> i believe ruby should not depend on sigsetjmp.
<_ko1> because ruby should not depend on signal status.
<_ko1> (for normal execution flow)
<_ko1> yet, i don't understand why sigsetjmp solve it
<_ko1> jump from where to where?
<charliesome> _ko1: the problem is that when ruby longjmps out of sigsegv, which is called on the alt stack
<_ko1> i believe there are no jump from segv handler to ruby codes.
<charliesome> _ko1: the operating system still thinks the signal handler is running
<_ko1> ah my god
<_ko1> i understand
<_ko1> i understand the problem
<_ko1> ohh
<_ko1> mmm
<_ko1> are there any way to restore signal status before longjmp?
<_ko1> (maybe nothing)
<charliesome> _ko1: it's very platform specific
<_ko1> yes.
<_ko1> it should be separate APIs.
<charliesome> _ko1: i think libsigsegv solves this well, but it needs further investigation
<_ko1> save_signal_status(&status); setjmp(jump) and siglongjmp(&status, jump)
<_ko1> ah, cool
<charliesome> _ko1: are you siglongjmp-ing to some code which performs a regular longjmp?
<charliesome> that could work
<_ko1> sorry i'm not sure what you want to say.
<charliesome> sigsetjmp and siglongjmp are only necessary to clear the SS_ONSTACK flag of the alt stack, so we could siglongjmp to a special piece of code that just raises a system stack error
<_ko1> i agree
<_ko1> [main] sigsetjmp(root) .... [foo] setjmp(bar) ...
<_ko1> [main] sigsetjmp(root) .... [foo] setjmp(bar) ... [segv handler] siglongjmp(root)
<_ko1> [main] longjmp(bar)
<charliesome> _ko1: yes
<_ko1> [main] sigsetjmp(root) .... [foo] setjmp(bar) ...
<_ko1> interesting!
<_ko1> but i'm not sure it can do (because jump to deeper place (longjmp(bar))
<charliesome> sigsetjmp would need to be on a separate stack
<_ko1> yes.
<charliesome> _ko1: do you think this is too complex?
<_ko1> not too complex, but i'm not sure it works fine
<_ko1> at least, i agree that current SEGV -> stack overflow flow has a bug if we use setjmp/longjmp.
<znz_jp> biff: [ruby-changes:28351] charliesome:r40403 (trunk): * configure.in: Revert using sigsetjmp by default due to performance - http://mla.n-z.jp/?ruby-changes=28351
<_ko1> on your Linux (3.8?), no system calls used by sigsetjmp?
<charliesome> _ko1: no
<_ko1> ah...
<_ko1> and i'm not sure we can use libsigsegv because of license
<charliesome> _ko1: ah that is annoyiong
<_ko1> i send a summary of this discussion.
<_ko1> thank you.
<charliesome> thank you too
shiba___ has quit [Ping timeout: 264 seconds]
<charliesome> goodnight
<_ko1> good night.
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
nagachika has quit [Remote host closed the connection]
nagachika has joined #ruby-core
shiba___ has joined #ruby-core
nagachika has quit [Remote host closed the connection]
shiba___ has quit [Read error: Operation timed out]
Caius has joined #ruby-core
Caius has quit [Quit: ""]
Caius has joined #ruby-core
shirokuro11 has joined #ruby-core
shirokuro11 has quit [Remote host closed the connection]
shirokuro11 has joined #ruby-core
knu has quit [Ping timeout: 264 seconds]
nokada has joined #ruby-core
nokada_ has quit [Read error: Connection reset by peer]
idkazuma has joined #ruby-core
idkazuma has quit [Ping timeout: 260 seconds]
idkazuma has joined #ruby-core
idkazuma has quit [Remote host closed the connection]
agarie has joined #ruby-core
xibbar has joined #ruby-core
charliesome has joined #ruby-core
tenderlove has joined #ruby-core
rafaelfranca has quit [Read error: Connection reset by peer]
rafaelfranca has joined #ruby-core
idkazuma has joined #ruby-core