travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:c406290 by Charles Oliver Nutter): The build passed. (http://travis-ci.org/jruby/jruby/builds/65325528)
travis-ci has left #jruby [#jruby]
pietr0 has quit [Ping timeout: 264 seconds]
yfeldblum has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 246 seconds]
sholden_ has joined #jruby
sholden has quit [Ping timeout: 252 seconds]
sholden_ is now known as sholden
baroquebobcat has quit [Quit: baroquebobcat]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
sholden has quit [Ping timeout: 265 seconds]
sholden has joined #jruby
_djbkd has quit [Remote host closed the connection]
mrmargolis has joined #jruby
yokolet has joined #jruby
camlow325 has quit []
e_dub has quit [Quit: Leaving]
dinfuehr has joined #jruby
e_dub has joined #jruby
havenwood has quit [Ping timeout: 264 seconds]
dinfuehr has quit [Ping timeout: 244 seconds]
Locke23rus has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobogrammer has joined #jruby
nirvdrum has quit [Ping timeout: 246 seconds]
mrmargolis has quit [Remote host closed the connection]
havenwood has joined #jruby
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
subbu has joined #jruby
mrmargolis has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 264 seconds]
subbu has quit [Quit: Leaving]
deobalds has joined #jruby
iamjarvo_ has joined #jruby
iamjarvo_ has quit [Max SendQ exceeded]
iamjarvo_ has joined #jruby
iamjarvo has quit [Ping timeout: 265 seconds]
iamjarvo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
simi has quit [Ping timeout: 272 seconds]
vikaton has quit []
<Antiarc> The new mongodb driver calls Process.pid on every message to make sure the host process hasn't changed (sigh), which has substantial overhead on JRuby due to the whole JNR/FFI thing. Is there a faster way to check this that I could suggest?
yokolet has quit []
mrmargolis has quit [Remote host closed the connection]
chamila has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 245 seconds]
yfeldblum has joined #jruby
havenwood has quit [Ping timeout: 240 seconds]
chamila has quit [Ping timeout: 246 seconds]
djbkd has joined #jruby
havenwood has joined #jruby
dabradley has quit [Ping timeout: 246 seconds]
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 265 seconds]
<projectodd-ci> Project jruby-master-dist build #297: STILL FAILING in 25 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-dist/297/
havenwood has quit [Ping timeout: 264 seconds]
dabradley has joined #jruby
yfeldblum has quit [Ping timeout: 256 seconds]
skade has joined #jruby
deobalds has quit [Quit: Computer has gone to sleep.]
simi has joined #jruby
sholden has quit [Quit: sholden]
eonwe has quit [Remote host closed the connection]
rsim has joined #jruby
dinfuehr has joined #jruby
deobalds has joined #jruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
chamila has joined #jruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
dinfuehr has quit [Ping timeout: 272 seconds]
deobalds has quit [Client Quit]
skade has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #jruby
skade has joined #jruby
skade has quit [Client Quit]
eonwe has joined #jruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
djbkd has quit [Ping timeout: 256 seconds]
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 240 seconds]
simi has quit [Ping timeout: 265 seconds]
skade has joined #jruby
temporal_ has joined #jruby
temporalfox has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 256 seconds]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares pushed 1 new commit to jruby-1_7: http://git.io/vkjxc
<JRubyGithub> jruby/jruby-1_7 98cab87 kares: [travis-ci] test-extended on jdk8
JRubyGithub has left #jruby [#jruby]
mister_solo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares closed issue #2039: jruby 1.7.10 raises unexpected arity error (1 for 0) when creating a java.math.BigDecimal http://git.io/vIeeJ
JRubyGithub has left #jruby [#jruby]
yfeldblum has joined #jruby
simi has joined #jruby
vtunka has joined #jruby
vtunka is now known as vtunka_mtgs
vtunka_mtgs is now known as vtunka
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares pushed 4 new commits to jruby-1_7: http://git.io/vIeL3
<JRubyGithub> jruby/jruby-1_7 a11eb7a kares: pass around context in BigDecimal impl + simplify cmp method's code
<JRubyGithub> jruby/jruby-1_7 f8a17c1 kares: move JI java.mat.BigDecimal test out of Ruby's BigDecimal tests
<JRubyGithub> jruby/jruby-1_7 0ab74b7 kares: handle BigDecimal cmp failure compatibly with MRI (fixes #2539)
JRubyGithub has left #jruby [#jruby]
dinfuehr has joined #jruby
cprice404 has joined #jruby
dinfuehr has quit [Ping timeout: 265 seconds]
shellac has joined #jruby
shellac has quit [Ping timeout: 246 seconds]
shellac has joined #jruby
shellac has quit [Client Quit]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares pushed 1 new commit to master: http://git.io/vIeWH
<JRubyGithub> jruby/master c30264c Genadi Samokovarov: Don't warn on private attribute accessors to match CRuby...
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares closed pull request #3002: Don't warn on private attribute accessors to match CRuby (master...private-attrs-no-longer-produce-warnings) http://git.io/vk4gX
JRubyGithub has left #jruby [#jruby]
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 264 seconds]
palacz has joined #jruby
ponga has joined #jruby
<projectodd-ci> Project jruby-master-spec-ji build #1493: STILL FAILING in 7.2 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1493/
shellac has joined #jruby
mister_s_ has joined #jruby
<projectodd-ci> Project jruby-master-test-slow_suites build #1470: STILL FAILING in 8.4 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1470/
mister_solo has quit [Ping timeout: 250 seconds]
<projectodd-ci> Project jruby-master-spec-compiler build #1469: STILL FAILING in 7.8 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1469/
rjnienaber has joined #jruby
<rjnienaber> just saw this comment in github: https://github.com/jruby/jruby/issues/2390#issuecomment-108770415
<rjnienaber> were the jira tickets exported before the services were terminated?
gaustin has quit [Ping timeout: 240 seconds]
Antiarc has quit [Ping timeout: 256 seconds]
mister_s_ has quit [Quit: So long, and thanks for all the fish!]
phlebas has joined #jruby
mister_solo has joined #jruby
Antiarc has joined #jruby
gaustin has joined #jruby
dinfuehr has joined #jruby
drbobbeaty has joined #jruby
mike___1234 has quit [Ping timeout: 244 seconds]
mike___1234 has joined #jruby
phlebas has quit [Ping timeout: 264 seconds]
dinfuehr has quit [Ping timeout: 250 seconds]
mister_s_ has joined #jruby
yfeldblum has quit [Ping timeout: 265 seconds]
mister_solo has quit [Ping timeout: 256 seconds]
vikaton has joined #jruby
phlebas has joined #jruby
shellac has quit [Read error: Connection reset by peer]
shellac has joined #jruby
dinfuehr has joined #jruby
dinfuehr has quit [Ping timeout: 276 seconds]
mister_s_ has quit [Quit: So long, and thanks for all the fish!]
phlebas has quit [Ping timeout: 276 seconds]
mister_solo has joined #jruby
rsim1 has joined #jruby
rsim has quit [Ping timeout: 265 seconds]
nirvdrum has joined #jruby
mister_solo has quit [Ping timeout: 272 seconds]
phlebas has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares pushed 4 new commits to jruby-1_7: http://git.io/vIv3C
<JRubyGithub> jruby/jruby-1_7 fb4d26b kares: some more (internal) RubyBigDecimal dry-ing / tidy-ing
<JRubyGithub> jruby/jruby-1_7 46ae07b kares: BigDecimal should not raise error on pow/** with float arg (under 1.9 #1967)
<JRubyGithub> jruby/jruby-1_7 7daf537 kares: static-ize and simplify private helpers
JRubyGithub has left #jruby [#jruby]
dinfuehr has joined #jruby
Locke23rus has joined #jruby
bbrowning_away is now known as bbrowning
dinfuehr has quit [Ping timeout: 276 seconds]
brightball has quit [Remote host closed the connection]
erikhatcher has joined #jruby
rsim1 has quit [Quit: Leaving.]
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> [jruby] kares closed issue #1967: Error when raising to a BigDecimal http://git.io/vIvlO
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> [jruby] kares closed issue #2538: BigDecimal does not coerce properly during division http://git.io/FKnA
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares closed issue #2539: Incorrect error message when BigDecimal fails to coerce during comparison http://git.io/FKlk
JRubyGithub has left #jruby [#jruby]
phlebas has quit [Ping timeout: 255 seconds]
phlebas has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 2 new commits to master: http://git.io/vIvRx
<JRubyGithub> jruby/master 95fa59c Kevin Menard: [Truffle] Prevent initialization of Regexp literal.
<JRubyGithub> jruby/master ab853cd Kevin Menard: [Truffle] Added a missing transfer.
JRubyGithub has left #jruby [#jruby]
<projectodd-ci> Project jruby-master-spec-compiler build #1470: STILL FAILING in 21 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1470/
nateberkopec has joined #jruby
iamjarvo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 2 new commits to master: http://git.io/vIvgC
<JRubyGithub> jruby/master 4504477 Kevin Menard: [Truffle] Introduced RegexpGuards.
<JRubyGithub> jruby/master f73877b Kevin Menard: [Truffle] Completed Regexp#initialize.
JRubyGithub has left #jruby [#jruby]
tcrawley-away is now known as tcrawley
mister_solo has joined #jruby
phlebas has quit [Ping timeout: 264 seconds]
JohnBat26 has joined #jruby
Aethenelle has joined #jruby
JohnBat26 has quit [Client Quit]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dinfuehr has joined #jruby
mrmargolis has joined #jruby
dinfuehr has quit [Ping timeout: 264 seconds]
iamjarvo has joined #jruby
mister_solo has quit [Ping timeout: 264 seconds]
mister_solo has joined #jruby
imperator has joined #jruby
<imperator> good morning
<imperator> having trouble with a bundler task, trying to get a rails app going with jruby
<imperator> NoMethodError: undefined method `blame_file!' for java.lang.OutOfMemoryError: Java heap space:Java::JavaLang::OutOfMemoryError
<imperator> that's with pre2 on yosemite
<nirvdrum> imperator: How big is your max heap?
<projectodd-ci> Project jruby-master-spec-ji build #1494: STILL FAILING in 18 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1494/
<imperator> nirvdrum, not sure what my default is, i also tried setting it to 1024
<imperator> jruby -J-Xmx1024m -S bundle exec rake some_task # that right?
<nirvdrum> Yeah.
<nirvdrum> 1GB really should be enough. When headius is around, maybe he can look at a heap dump.
<nirvdrum> He fixed a big memory issue last night. If you're able to build master, it'd be useful to see if that maybe fixes your problem as well.
<nirvdrum> Otherwise, I think RC1 is slated for early next week and you could test then, too.
<imperator> ooh boy, ok, i'll try
<nirvdrum> Actually, you don't even need to build master. The nightlies should have it.
<nirvdrum> rbenv or rvm should be able to install it for you, as well.
<imperator> hm, how do i get a nightly with rbenv?
<imperator> that's what i'm using
<imperator> well, the undefined method error would indicate there's a bug wouldn't it? i mean, regardless of my heap problems
<nirvdrum> Assuming you have the ruby-build plugin installed, I think it's just "rbenv install jruby-9.0.0.0-dev"
<nirvdrum> You ran out of memory. All bets are off.
<imperator> ok
<nirvdrum> I think the error just really means the Java exception wasn't translated to a Ruby one.
<nirvdrum> I'm not sure if that's even doable at that stage.
<imperator> yep, that seems to be working for rbenv, thanks!
* imperator files that one away for future use
<nirvdrum> When it's installed and you've activated it, just paste the output of "ruby -v" so I can verify the fix is in there.
mrmargolis has quit [Remote host closed the connection]
mrmargolis has joined #jruby
<imperator> jruby 9.0.0.0-SNAPSHOT (2.2.2) 2015-06-02 798fd22 Java HotSpot(TM) 64-Bit Server VM 25.45-b02 on 1.8.0_45-b14 +jit [darwin-x86_64]
<imperator> looks right to me
asuka has left #jruby ["WeeChat 1.1.1"]
<projectodd-ci> Project jruby-master-test-slow_suites build #1471: STILL FAILING in 17 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1471/
Aethenelle has quit [Read error: Connection reset by peer]
<projectodd-ci> Project jruby-master-spec-compiler build #1471: STILL FAILING in 18 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1471/
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
iamjarvo has joined #jruby
<imperator> is this coming from bundler? uri:classloader:/jruby/kernel/kernel.rb:28: warning: unsupported exec option: close_others
<nirvdrum> Yes.
<imperator> no joy with snapshot - same error
<imperator> tried 2gb heap even
<nirvdrum> It detects if running in 2.0 mode and tries to set close_others, which JRuby doesn't support.
<imperator> no idea what this task is doing, gonna have to investigate
<imperator> alrighty, not a huge deal on the warning then
<imperator> (unless maybe this task is spawning stuff that isn't getting closed or something)
<bbrowning> headius: I'm still seeing OOMs running rubocop with a default 512MB heap after your change
<imperator> how can you tell what the default heap size is?
<nirvdrum> imperator: I guess the fix wasn't sufficient, based on what bbrowning is saying :-)
<bbrowning> imperator: the default heap size is 512MB
<imperator> bbrowning, thanks
<bbrowning> nirvdrum: yeah but I can at least tweak jit.maxSize to see if it can fix things I guess
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bbrowning> headius: you forget to adjust the default Constants.JIT_MAX_SIZE_LIMIT from 30k down to something smaller
<bbrowning> imperator: what if you run your program with "-Xjit.maxsize=2000" ?
<bbrowning> ie "jruby -Xjit.maxsize=2000 -S bundle exec foo"
<bbrowning> hmm actually if using bundle exec you probably need to use $JRUBY_OPTS
<bbrowning> export JRUBY_OPTS="-Xjit.maxsize=2000"
<bbrowning> then run your stuff
<bbrowning> imperator: if that fixes things then you're probably hitting the same issue I was yesterday and that will be fixed soon on master
pitr-ch has quit [Ping timeout: 258 seconds]
travis-ci has joined #jruby
<travis-ci> kares/jruby (test-big-decimal2:4ac1c5d by kares): The build passed. (http://travis-ci.org/kares/jruby/builds/65406992)
travis-ci has left #jruby [#jruby]
<imperator> bbrowning, no joy
<bbrowning> imperator: oh - also "jruby -J-Xmx1024m -S bundle exec rake some_task" isn't actually right
mrmargol_ has joined #jruby
<bbrowning> you have to export JRUBY_OPTS="-J-Xmx1024m" and then run it since bundle exec spawns a new process
pitr-ch has joined #jruby
<bbrowning> or, alternative, jruby -J-Xmx1024m -rbundler/setup -S rake some_task
<imperator> ah, thanks
<bbrowning> that 2nd command doesn't do exactly the same thing, but something quite similar
havenwood has joined #jruby
<imperator> maybe if i do both? $JRUBY_OPTS => -Xjit.maxsize=2000 -J-Xmx1024m
<bbrowning> perhaps - it depends on what your specific OOM cause is
mrmargolis has quit [Ping timeout: 258 seconds]
* imperator tries
<bbrowning> in my case it was an overly complex method from a dependency that was blowing up the JIT compiler
<imperator> eh, still not working, i'll have to dig into the task
<bbrowning> The only way to really track down why it's running out of memory is to take and analyze / share a heap dump
<bbrowning> you can have it automatically spit out a heap dump when it OOMs by adding "-J-XX:+HeapDumpOnOutOfMemoryError" to your $JRUBY_OPTS
<bbrowning> then it will spit out a java_pidxxxx.hprof file in the current directory after an OOM
subbu has joined #jruby
enebo has joined #jruby
<imperator> oh? ok, i'll try that
iamjarvo has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] enebo pushed 1 new commit to master: http://git.io/vIftu
<JRubyGithub> jruby/master f0a9ce8 Thomas E. Enebo: Adjust JIT_MAX_SIZE_LIMIT down to 2000
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 1 new commit to master: http://git.io/vIfmb
<JRubyGithub> jruby/master e6d947e Kevin Menard: [Truffle] Fixed Regexp subclass creation.
JRubyGithub has left #jruby [#jruby]
erikhatcher has quit [Quit: erikhatcher]
<imperator> wow, big file
<imperator> how do i analyze it?
<imperator> special program or just text editor?
<bbrowning> imperator: you'll need to use a special program - some people like jhat (http://docs.oracle.com/javase/7/docs/technotes/tools/share/jhat.html)
<bbrowning> I prefer MemoryAnalyzer (http://www.eclipse.org/mat/)
tcrawley is now known as tcrawley-away
<bbrowning> there's a bit of a learning curve here - basically you want to figure out what's taking up all your heap memory
<projectodd-ci> Project jruby-master-spec-ji build #1495: STILL FAILING in 43 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1495/
<bbrowning> it could be a few really large objects or many small ones
<imperator> dang, no brew package
<bbrowning> jhat comes as part of most jdk installs
<imperator> good to know, thanks!
<imperator> yep have it
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:f0a9ce8 by Thomas E. Enebo): The build was broken. (http://travis-ci.org/jruby/jruby/builds/65417454)
travis-ci has left #jruby [#jruby]
<enebo> booo what is that
<imperator> opened browser up on port 7000, i see some stuff
<imperator> mmm.....yes.....i know some of these words
<bbrowning> imperator: http://petermodzelewski.blogspot.com/2013/06/short-jhat-tutorial-diagnosing.html may be helpful for a brief jhat tutorial
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 1 new commit to master: http://git.io/vIfGh
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> jruby/master fb6a39a Kevin Menard: [Truffle] Retagged suspicious spec.
<bbrowning> the heap histogram is usually quite useful to see what's in there
<bbrowning> instance counts can be as well
<enebo> OQL can be too if you can ever figure out how to use it
<bbrowning> imperator: analyzing heaps can be a bit tricky, so if you can't figure anything out you can zip up the .hprof file and share it
<bbrowning> the heap dump is a memory dump from your app, so don't share it if there are secrets in there you don't want getting out
<imperator> 384 instances of class org.bouncycastle.asn1.ASN1ObjectIdentifier - something tells me that's not enough to cause a problem
<projectodd-ci> Project jruby-master-test-slow_suites build #1472: STILL FAILING in 9.5 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1472/
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] enebo pushed 1 new commit to master: http://git.io/vIfn4
<JRubyGithub> jruby/master 4248eab Thomas E. Enebo: Combine these two tests so we are not hard-coding our defaults in a test file and failing when we decide to change defaults
JRubyGithub has left #jruby [#jruby]
<bbrowning> imperator: if you're looking at the histogram, look at Total Size column
<bbrowning> with an OOM situation there is quite often something fishy in the first 10-20 rows there
<projectodd-ci> Project jruby-master-spec-compiler build #1472: STILL FAILING in 5.6 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1472/
<bbrowning> ie with my leak the top item was 300MB of int arrays
<bbrowning> represented in jhat as class [I
tcrawley-away is now known as tcrawley
donV has joined #jruby
<imperator> class [B and class [C are top 2
<imperator> followed by class [Ljava.lang.Object; and class [Ljava.lang.String;
<bbrowning> that's pretty typical so far
<bbrowning> byte and char arrays followed by objects and strings
<imperator> first jruby instance is class [Lorg.jruby.ir.operands.Operand; at fifth most
<imperator> s/instance/mention
<bbrowning> what's the instance count there?
<bbrowning> my leak had a high Operand count as well
<bbrowning> 139k
<imperator> 149273 - 4011024
<imperator> count - size
donV has quit [Client Quit]
<bbrowning> enebo: do you know what a reasonable count of Operands would be? would we expect them to be hundreds of thousands in a typical small app?
<imperator> well, this is a large-ish rails app
<bbrowning> 149k I'd guess is one of the highest # of instances of any class in imperator's heap
<bbrowning> imperator: if you look at the query "Show instance counts for all classes (including platform)" from the jhat home page, does it show Operand near the top there?
<enebo> bbrowning: operands are the most common way we represent data in IR so tons of operands is normal
<bbrowning> imperator: well my app was quite small and still had tons of operands
<bbrowning> hmm
<imperator> bbrowning, yep, operand is 2nd
<bbrowning> probably only behind string
<imperator> right
<bbrowning> enebo: but holy cow this many? :)
<enebo> a = 1+1 is 4+ operands
<bbrowning> Operands take up more memory in my heaps than Strings ;)
<enebo> bbrowning: but with that said I did spend time making common operands share like Variable
<bbrowning> imperator: so in your case Operands are only taking up 4MB of your 1024MB heap
<enebo> bbrowning: oh you mean Operand[] too though right?
<bbrowning> imperator: is there something with a total size of many hundreds of MB?
<enebo> Every instr is backed by a single Operand[]
<bbrowning> enebo: class [Lorg.jruby.ir.operands.Operand;
<bbrowning> so yeah I guess that is an array of them?
<enebo> bbrowning: yeah
<enebo> so 1 array per instr instance
<bbrowning> imperator: one of the 4 above your operand - byte, char, object, or string arrays
<bbrowning> one of those must be taking up a huge amount of heap
<enebo> bbrowning: actually one issue we have is we duplicate every instr when we JIT (or full build in -X-C) so we can end up with 2x as many instrs
<enebo> bbrowning: we keep both copies because we want to be able to deopt
<imperator> char 106130 - 6674192
<bbrowning> imperator: that's still only 6MB :/
<imperator> object 94929 - 6039136
<bbrowning> a long way away from blowing up a 1024MB heap
<enebo> bbrowning: if we get rid of ipc/rpc info from instr we can prevent most of our instr dup’ing and it will help but we JIT too much atm too so either fix will reduce memory
<imperator> yeah, this must be something else
<imperator> i need to do some task inspection i think
<imperator> i also sort of blindly replaced thin with puma as a gem dep just trying to get it to work
<imperator> but, as far as i can tell this task is just doing a drop/create/migrate
<bbrowning> imperator: it's odd that the heap dumped on OOM if there's nothing big in the heap :/
<bbrowning> I'd expect to see something at the top of that heap histogram with hundreds of MB
<imperator> yah, curious
bbrowning is now known as bbrowning_away
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:e6d947e by Kevin Menard): The build was broken. (http://travis-ci.org/jruby/jruby/builds/65418410)
travis-ci has left #jruby [#jruby]
mrmargol_ has quit [Ping timeout: 244 seconds]
mrmargolis has joined #jruby
rcvalle has joined #jruby
camlow325 has joined #jruby
skade has quit [Quit: Computer has gone to sleep.]
x1337807x has joined #jruby
palacz has quit [Ping timeout: 240 seconds]
phlebas has joined #jruby
<projectodd-ci> Project jruby-master-spec-ji build #1496: STILL FAILING in 11 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1496/
pjammer has joined #jruby
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:fb6a39a by Kevin Menard): The build is still failing. (http://travis-ci.org/jruby/jruby/builds/65420489)
travis-ci has left #jruby [#jruby]
baroquebobcat has joined #jruby
<projectodd-ci> Project jruby-master-test-slow_suites build #1473: STILL FAILING in 10 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1473/
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] jtulach opened pull request #3017: Adopting to Redesigned Truffle Inter-operability API (truffle-head...NewInterOpAPI) http://git.io/vIf9X
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 2 new commits to master: http://git.io/vIfQO
<JRubyGithub> jruby/master e0668e3 Kevin Menard: [Truffle] Fixed an NPE when evaluating empty interpolation (#{}).
<JRubyGithub> jruby/master ee6b66c Kevin Menard: [Truffle] All Regexp#encoding specs now passing.
JRubyGithub has left #jruby [#jruby]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drguildo has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 1 new commit to master: http://git.io/vIfdS
<JRubyGithub> jruby/master 361d393 Kevin Menard: [Truffle] All Regexp#compile specs are now passing.
JRubyGithub has left #jruby [#jruby]
<nirvdrum> enebo: It looks like there are specs that verify the Regexp#source encoding. I'll see if I can find a cheap way to handle it.
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] pitr-ch pushed 18 new commits to master: http://git.io/vIfpq
<JRubyGithub> jruby/master 8156e58 Petr Chalupa: [Truffle] BigDecimal: add special value handling to :/, :quo
<JRubyGithub> jruby/master c3cc29e Petr Chalupa: [Truffle] BigDecimal: add :exponent
<JRubyGithub> jruby/master 0398913 Petr Chalupa: [Truffle] BigDecimal: add :abs
JRubyGithub has left #jruby [#jruby]
vtunka has quit [Quit: Leaving]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] pitr-ch closed pull request #3012: [Truffle] BigDecimal more features (master...master) http://git.io/vk9zx
JRubyGithub has left #jruby [#jruby]
phlebas has quit [Ping timeout: 276 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
temporalfox has joined #jruby
mister_solo has quit [Ping timeout: 245 seconds]
temporal_ has quit [Ping timeout: 276 seconds]
<enebo> nirvdrum: cool
x1337807x has joined #jruby
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
erikhatcher has joined #jruby
<nirvdrum> enebo: Do you guys have any helpers for running rubyspecs? Or do you just run mspec directly?
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<enebo> nirvdrum: I typeically just run it directly and without tags
<projectodd-ci> Project jruby-master-spec-ji build #1497: STILL FAILING in 6.1 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1497/
<enebo> nirvdrum: sometimes I will find things not broken or other oddities not found with tagfile stuff applied
chamila has quit [Quit: Page closed]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
djbkd has joined #jruby
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 1 new commit to master: http://git.io/vIJmp
<JRubyGithub> jruby/master 393e64f Kevin Menard: [Truffle] Pull in Regexp#match from Rubinius.
JRubyGithub has left #jruby [#jruby]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
<projectodd-ci> Project jruby-master-test-slow_suites build #1474: STILL FAILING in 5.7 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1474/
<projectodd-ci> Project jruby-master-spec-compiler build #1473: STILL FAILING in 5.8 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1473/
djbkd has quit [Remote host closed the connection]
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:4248eab by Thomas E. Enebo): The build was fixed. (http://travis-ci.org/jruby/jruby/builds/65421309)
travis-ci has left #jruby [#jruby]
bbrowning_away is now known as bbrowning
sholden has joined #jruby
skade has joined #jruby
djbkd has joined #jruby
<bbrowning> enebo: so imperator showed me how to reproduce his OOM error on latest 9k master and I was able to do it locally
<bbrowning> I see a 364MB RubyArray in the heap
<bbrowning> that's a big one!
<bbrowning> but I think it's just the app loading some big array of strings into memory
djbkd has quit [Read error: Connection reset by peer]
_djbkd has joined #jruby
mister_solo has joined #jruby
mister_solo has quit [Client Quit]
colinsurprenant has joined #jruby
x1337807_ has joined #jruby
x1337807_ has quit [Max SendQ exceeded]
x1337807_ has joined #jruby
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:ee6b66c by Kevin Menard): The build was fixed. (http://travis-ci.org/jruby/jruby/builds/65432706)
travis-ci has left #jruby [#jruby]
x1337807x has quit [Ping timeout: 250 seconds]
colinsurprenant_ has joined #jruby
colinsurprenant has quit [Ping timeout: 272 seconds]
colinsurprenant_ is now known as colinsurprenant
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] MSNexploder opened issue #3018: LoadError with 'compiled' ruby files with JRuby9000 http://git.io/vIJoq
JRubyGithub has left #jruby [#jruby]
<projectodd-ci> Project jruby-master-spec-ji build #1498: STILL FAILING in 9.9 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1498/
phlebas has joined #jruby
subbu is now known as subbu|away
colinsurprenant_ has joined #jruby
colinsurprenant has quit [Ping timeout: 264 seconds]
colinsurprenant_ is now known as colinsurprenant
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pjammer has joined #jruby
djbkd has joined #jruby
_djbkd has quit [Ping timeout: 276 seconds]
shellac has quit [Ping timeout: 246 seconds]
iamjarvo has joined #jruby
phlebas has quit [Ping timeout: 245 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bbrowning> enebo: so the little script at https://gist.github.com/bbrowning/90c2296e048fb806b4a1 takes GBs of memory under 9k but can run without issue in a 128m heap under 1.7.20
<bbrowning> sounds like a bug of some kind? :)
<bbrowning> when I say GBs I mean under 9k it OOMs at 1GB, 1.5GB, but not at 2GB
<nirvdrum> So, not actually gigabytes then ;-)
<bbrowning> this is reducing imperator's OOM issue with his app down to the simplest reproducer I can find so far
<bbrowning> > 1GB
<nirvdrum> If you have less than 2, it's still singular!
<imperator> smarty ;)
<bbrowning> well I have another .po file that OOMs at 4GB but not at 8GB ;)
<imperator> binders full of bytes
<nirvdrum> That's marketing, baby.
<nirvdrum> bbrowning: Out of curiosity, what do you need gettext for?
<bbrowning> nirvdrum: I don't, but imperator's app uses it for translations
iamjarvo has joined #jruby
<nirvdrum> Oh, you two are working together on this.
<bbrowning> hmm maybe I can simplify this a bit more and create a much smaller in-memory .po file
<imperator> nirvdrum, he has very kindly been helping me
<bbrowning> for a self-contained reprocuder
baroquebobcat has quit [Quit: baroquebobcat]
<nirvdrum> imperator: Are you djberg96?
<imperator> yup
baroquebobcat has joined #jruby
<nirvdrum> Funky. I just came across one of your win32 gems a couple days ago.
<nirvdrum> I thought it'd be helpful to get some of it into jnr-posix. But I didn't know what the Artistic 2.0 license entailed and whether it was compatible, so I left for the time being.
<imperator> oh? any issues, lemme know, i'll be happy to help
<nirvdrum> Small world.
<imperator> ah, yeah, some people don't like that license
<imperator> it's fairly permissive
<imperator> the stuff i've written for RH is Apache 2.0
<nirvdrum> I think RedHat lawyers just combed jnr-posix recently. Corporate lawyers aren't fond of anythin off the beaten path. Not really your problem. Like I said, it just needs to be looked at.
<nirvdrum> So you work for RH, too?
skade has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bbrowning> nirvdrum: imperator enebo: updated the gist to be self-contained - https://gist.github.com/bbrowning/90c2296e048fb806b4a1
<bbrowning> 1.7.20 can run that in 64mb heap, 9k OOMs w/ 1.5gb
<nirvdrum> bbrowning: Impressive.
djbkd has quit [Remote host closed the connection]
<bbrowning> 96% of the heap is a single RubyArray
<imperator> that was with 2.0.0p645'
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] chrisseaton pushed 2 new commits to master: http://git.io/vIJxg
<JRubyGithub> jruby/master 2b41e2c Chris Seaton: [Truffle] Fix dead node in translation of rescue.
<JRubyGithub> jruby/master 4667136 Chris Seaton: [Truffle] Add racc to stdlib.
JRubyGithub has left #jruby [#jruby]
<imperator> 155k calls to Regexp#=== wow
djbkd has joined #jruby
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> [jruby] chrisseaton closed issue #2996: [Truffle] UnsupportedOperationException with empty rescue statement http://git.io/vkmMm
<imperator> when i try to run jruby --debug potest.rb it just...dies
x1337807_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yfeldblum has joined #jruby
<projectodd-ci> Project jruby-master-spec-ji build #1499: STILL FAILING in 5.9 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1499/
erikhatcher has quit [Quit: erikhatcher]
<enebo> bbrowning: went for bike ride after eating
<enebo> bbrowning: I wonder if we have temp vars retaining intermediate copies of large objects in some way…still does not seem like it would explain it
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
subbu|away is now known as subbu
x1337807x has joined #jruby
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:b628851 by Petr Chalupa): The build is still failing. (http://travis-ci.org/jruby/jruby/builds/65436034)
travis-ci has left #jruby [#jruby]
colinsurprenant has quit [Ping timeout: 245 seconds]
<projectodd-ci> Project jruby-master-test-slow_suites build #1475: STILL FAILING in 10 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1475/
<bbrowning> enebo: I'm looking into the poparser code now to see what it's doing
<projectodd-ci> Project jruby-master-spec-compiler build #1474: STILL FAILING in 10 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1474/
<subbu> bbrowning, are lines 13-17 essential to the reproduction (in your gist)?
<enebo> bbrowning: is it dying in .parse?
<enebo> bbrowning: I mean I hope so
<bbrowning> enebo: yes, it is
<bbrowning> subbu: it only dies when parsing a large string
<bbrowning> subbu: and lines 13-17 is just generating a large string
<enebo> bbrowning: I am debugging changes to the parser right now and “almost” have it
<enebo> bbrowning: but I am not looking at this leak atm
<subbu> bbrowning, ok .. so, something is holding onto memory which prevents the large string from parsing.
subbu is now known as subbu|lunch
colinsurprenant has joined #jruby
<bbrowning> enebo: subbu|lunch: edited the gist to remove the fast_gettext dep, simplified some more - https://gist.github.com/bbrowning/90c2296e048fb806b4a1
<bbrowning> now there are no deps and the entirety of the heap-blowing-up code is visible there
<enebo> bbrowning: can some whens go or did you just get to this point and stop?
<bbrowning> I took out all the irrelevant whens
<bbrowning> perhaps I can take out another one or two by changing my string actually
djbkd has quit [Remote host closed the connection]
djbkd has joined #jruby
djbkd has quit [Remote host closed the connection]
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bbrowning> enebo: ok - maybe it a tiny bit smaller by removing one more when clause - https://gist.github.com/bbrowning/90c2296e048fb806b4a1
<bbrowning> this script ends up with a RubyArray taking up 97% of the heap
<enebo> bbrowning: I wonder if that lib actually is working with smaller values
<enebo> e.g. we have some other bug and this is not even acting correct
<bbrowning> this string is quite a bit smaller than the real-world one imperator's app was blowing up on
<enebo> yeah
<bbrowning> the actual results of the @q array look identical b/w 1.7.20 and 9k with just a spot-check
<enebo> ok
<enebo> It would have been nicer had that been the case :)
<bbrowning> so in 9k this @q array is a 406MB RubyArray before it OOMs with my 512MB heap
<bbrowning> 4,618 entries in it
<bbrowning> I'd expect 10k entries if it ran without OOMing
<bbrowning> each entry is another RubyArray with 2 values
<bbrowning> the first value is a symbol as we'd expect - :MSGID or :STRING
<bbrowning> the 2nd value is the problematic one
<enebo> douns like correctness problem to me
<bbrowning> 2nd value is a RubyString with a bytelist containing the bytes of the entire file
<enebo> $& or $1 maybe are not correct values while running but produces the right result?
<bbrowning> it looks like the line "@q.push [:STRING, $1]" is pushing a ByteList with an offset and length into the array
<bbrowning> the ByteList contains the bytes of the entire string, but uses the offset and length to only "store" the right part
<bbrowning> so every time we push a string into this array we're pushing a RubyString backed by a ByteList containing a MUCH larger byte[] with an offset and length into a tiny bit of that byte[]
<enebo> hmmm but looking at nth_match it apepars we makeShared19 on it
<enebo> since 2013
<enebo> bbrowning: and if they are sharing the same big string then it does not matter
dinfuehr has joined #jruby
<enebo> 1.7 appears to also makeShared
pjammer has joined #jruby
<bbrowning> enebo: all I can say is in the heap different RubyStrings are backed by different ByteLists
<bbrowning> each ByteList containing a ton of text and an index/length
<enebo> perhaps some indirect way we are making a non-shared bytelist and then backing that
<enebo> Have I mentioned how much I hate COW?
<imperator> how much?
<enebo> It seems like such a clever way of saving space until you have to debug it :)
<enebo> imperator: 6'
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<imperator> many feets worth of hate, got it
<enebo> So I would guess something is making a new string without continuing to share it but the regexp nth ref is sharing that so we get n massive backing bytelists. Sound about right bbrowning ?
<bbrowning> enebo: yessir
<bbrowning> I'm still trying to work on an even simpler reproducer to really understand how it's triggered
<enebo> I would try converting the case/when to if/elsif
<bbrowning> still OOMs with if/elsif
<enebo> now eliminate $_
<enebo> :)
<enebo> oh unless you did
<enebo> you make it str =~ /\A\s+/
<bbrowning> it only uses $', $1, $&
travis-ci has joined #jruby
<travis-ci> jruby/jruby (master:393e64f by Kevin Menard): The build was fixed. (http://travis-ci.org/jruby/jruby/builds/65440616)
travis-ci has left #jruby [#jruby]
<enebo> heh…I keep fixing all parser bugs in spec run and when I finish I get a new set
<enebo> but I am slowly fixing descrepencies
<bbrowning> somehow I think the newline is involved
iamjarvo has joined #jruby
<bbrowning> if I replace the "\n" on https://gist.github.com/bbrowning/90c2296e048fb806b4a1#file-po_memory-rb-L8 with " " it doesn't crash
<bbrowning> that one change can get it running in a 64mb heap on 9k
<bbrowning> imperator: so as a workaround you can strip all newlines out of your .po files perhaps? heh
<imperator> hah, dunno
<enebo> wow
<enebo> bbrowning: sounds like we are matching too much then
<bbrowning> enebo: but remember the part that ultimately gets captured, $1, is "correct"
<bbrowning> correct in the sense that the RubyString displays correctly - incorrect in that it's backed by a gigantic ByteList where most of those bytes are wasted
<enebo> yeah
<enebo> nirvdrum: is it possible we changed COW and made something shared no longer shared with regexps?
<enebo> bbrowning: It sounds like it describes the observed behavior well enough
subbu|lunch is now known as subbu
<nirvdrum> enebo: I don't think I touched anything related to that. But doing a checkout from 3 days ago would be sufficient to check.
<enebo> bbrowning: but we would need to copy it as a whole valid substring
<nirvdrum> I haven't been working on this too long.
<enebo> nirvdrum: yeah I mean we have had these divergent so long I am not sure we can know if we might have earlier too
<enebo> bbrowning: if we were non sharing something smaller it would become the smaller string
<enebo> bbrowning: in that snnd $’ is most likely to be bad guy
<nirvdrum> This is the first I've really looked at JRuby regexp. I obviously did a lot of String work, but I don't think anything to affect CoW.
<nirvdrum> Maybe something in joni? I can't tell what version 1.7.20 is using.
<bbrowning> enebo: I can eliminate $' and still get the error
<enebo> bbrowning: cool…I will stop looking at that then :)
<nirvdrum> bbrowning: So, it's the capture that's problematic?
<bbrowning> perhaps - I guess I can hack it to remove the $1 usage as well
<nirvdrum> Not just the $1, but the (.*)
<bbrowning> right the parens too
<enebo> something in Match?
<bbrowning> nirvdrum: $1 and (.*) removed and still hit it - https://gist.github.com/bbrowning/90c2296e048fb806b4a1
<bbrowning> so not capture
simi has quit [Ping timeout: 250 seconds]
<nirvdrum> Interesting.
<bbrowning> yeah I dunno - worth filing a bug, at least :)
* bbrowning does that
<nirvdrum> enebo: FWIW, this doesn't blow up with Truffle and we're using very similar matching logic.
<enebo> nirvdrum: ok good to know. I will concentrate on this once I get parsing green again
<nirvdrum> I'll take a quick poke myself. It might be instructive.
<nirvdrum> All of Regexp has been trial by fire for me thus far.
<enebo> nirvdrum: we have had these errors in the past as well and I sort of wish we had some extra heuristiuc like don’t share off anything bigger than 1000 bytes
<enebo> which would hurt some people but perhaps greatly reduce COW weirdness
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<imperator> perhaps look to other languages for guidance? what do they do?
<enebo> yeah at some point we should revisit our impl.
<enebo> our COW impl is largely modelled after MRIs
7GHAAD1RG has joined #jruby
<7GHAAD1RG> kares/jruby (test-big-decimal2:53acf9a by kares): The build has errored. (http://travis-ci.org/kares/jruby/builds/65461307)
7GHAAD1RG has left #jruby [#jruby]
<bbrowning> enebo: if my rambling on https://github.com/jruby/jruby/issues/3019 doesn't make sense, feel free to correct me
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] bbrowning opened issue #3019: Small string values backed by HUGE non-shared ByteList leading to large memory usage under 9k http://git.io/vIU2k
JRubyGithub has left #jruby [#jruby]
<enebo> bbrowning: sounds fine
<enebo> bbrowning: thanks for simplifying this
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
<nirvdrum> enebo: FWIW, we don't do any CoW with our Strings yet.
<bbrowning> enebo: no problem - not sure if this is some obscure edge case or will be a common memory usage bomb under 9k
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
<enebo> bbrowning: I sure hope this is just a simple mistake easily corrected
<enebo> bbrowning: nothing weird about this pattern of code
iamjarvo has joined #jruby
<imperator> forgive my ignorance, but does CoW negatively affect performance in multithreaded code?
<imperator> btw, thank you very much bbrowning enebo and nirvdum - this has been interesting
<imperator> didn't realize how far the rabbit hole went when i started this
<bbrowning> imperator: jruby 9k is bound to run into a couple of interesting bugs like this :)
<nirvdrum> imperator: I haven't benchmarked, but it shouldn't be too bad. The first thread mutating the object makes the copy and all other threads work with that new copy. You'll need to lock of course.
dinfuehr has quit [Remote host closed the connection]
dinfuehr has joined #jruby
<enebo> imperator: well if you modify a string you need to make a copy so offthread mutation will just copy the first copy down to what it needs
<enebo> imperator: original thread won’t realize it and if it needs to mutate it will copy as well
<enebo> imperator: then original byte[] will just GC
<enebo> imperator: unless something else is retaining a reference
<nirvdrum> I guess that's the case where you don't lock :-)
<enebo> yeah the backing array is immutable itself if shared
dinfuehr has quit [Ping timeout: 256 seconds]
cschneid has quit [Ping timeout: 256 seconds]
cschneid has joined #jruby
<bbrowning> enebo: nirvdrum: so I think I see what happens here - https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/RubyRegexp.java#L1147 calls str.strDup(runtime).freeze(context);
<bbrowning> strDup creates a new string with a shared bytelist
<nirvdrum> Maybe this the freeze optimization creating problems?
<enebo> that line is in both 1.7 and 9k so it would have to be strDup or freeze
<bbrowning> freeze calls resize which calls modify
<bbrowning> so when resize calls modify now we've copy that large shared bytelist
<bbrowning> and then freeze sets its realLength without anything ever pruning that bytelist to be smaller
skade has joined #jruby
<bbrowning> String#freeze is new as of Jan 2015
<enebo> bbrowning: this looks like a reasonable find
<enebo> bbrowning: by reasonable I mean it definitely looks lie the source of the problem but it does not lead me to an immediate solution
<enebo> bbrowning: I think this was related to not pinning large memory to dedup’d strings
<enebo> bbrowning: wow lots of commits in that PR
ponga has quit [Quit: Leaving...]
<enebo> bbrowning: I am guessing the reason for this was if a string is frozen already you should return it
<enebo> bbrowning: perhaps the resize is not needed
<bbrowning> I dunno
<enebo> if (!STR_EMBED_P(str) && !FL_TEST(str, STR_SHARED|STR_NOFREE)) {
<enebo> ruby_sized_xfree(STR_HEAP_PTR(str), STR_HEAP_SIZE(str));
<enebo> heh free not freeze
<enebo> ok I was thining why is it deleting data :)
<enebo> bbrowning: you try this on MRI?
<nirvdrum> enebo: Wouldn't freeze always return the same object though?
<bbrowning> enebo: imperator ran the original real app on MRI and didn't see any large memory usage
<enebo> I don’t see the value of this override
<enebo> I am guessing it was to kill the COW
<enebo> err copy
<enebo> make a copy
<bbrowning> which I'm fine with, but if you do that then also prune all the extra crap out of the bytelist ;)
<enebo> if (OBJ_FROZEN(str)) return str;
<enebo> rb_str_resize(str, RSTRING_LEN(str));
<enebo> return rb_obj_freeze(str);
<enebo> So it is the same
<enebo> bur perhaps they freeze their map str differently
<nirvdrum> It looks like the size should be set before the modify() call. Of course, it's not that easy.
<enebo> match
<nirvdrum> But the dup call is working with the original size.
<nirvdrum> Actually, it's using the same value. So I don't think that's quite it either.
tcrawley is now known as tcrawley-away
<enebo> rb_str_resize will not resize if they are the same size
<enebo> but it also has a lot of cases
<nirvdrum> I think the resize is a red herring.
<nirvdrum> Looking in a debugger, the real size and the byte[] size are the the same +/- a byte from what I can tell.
<nirvdrum> But the modify() call is causing twice as many of these buffers to be allocated due to all the ByteList duping.
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] enebo closed issue #3015: Syntax Error on nested hash that parses with MRI 2.0 but not with JRuby 9000 http://git.io/vkNCH
JRubyGithub has left #jruby [#jruby]
<bbrowning> nirvdrum: looking in my heap dumps I have ByteLists with a realSize of 5 but a byte[] size of 128,819
<bbrowning> each one is from this match data
<bbrowning> and the addition of the new RubyString#freeze would explain why 1.7.20 and 9k differ here
<bbrowning> guess I can just comment out resize locally to verify
<enebo> bbrowning: you can also comment out freeze and verify
<bbrowning> they are essentially the same thing, so I will just comment out the whole override
<bbrowning> the original commit surely exists for a reason so this probably isn't the right fix
<nirvdrum> bbrowning: I'm not looking at a heap dump. But I set a break point for when real size and the byte array didn't match and the one time it happened, it was off by 1 byte.
<bbrowning> nirvdrum: and that was when running against my test script?
rsim has joined #jruby
<nirvdrum> Yeap. And then I ran out of memory.
<bbrowning> hrm
<bbrowning> yeah commenting out freeze doesn't fix things :/
<nirvdrum> Same here.
<bbrowning> nirvdrum: so you're on to something there - there is some point where realSize and the byte size differ by a lot
<projectodd-ci> Project jruby-master-spec-ji build #1500: STILL FAILING in 5.6 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1500/
<bbrowning> but apparently not by this code path
<enebo> bbrowning: tbh this particular commit might not have been for a reason or perhaps the reason that MRI defines a String#freeze
<enebo> bbrowning: it was with so many other commits at the same time
<nirvdrum> bbrowning: Let me bump my heap. I'm not hitting it with the default heap size anyway.
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] kares pushed 5 new commits to jruby-1_7: http://git.io/vIUHM
<JRubyGithub> jruby/jruby-1_7 fdf5201 kares: minor BigDecimal code cleanup
<JRubyGithub> jruby/jruby-1_7 2b990bc kares: [bigdecimal] backport simplified newInstance impl from master
<JRubyGithub> jruby/jruby-1_7 4ac1c5d kares: [bigdecimal] keep the simplified newInstance backport 1.8 compatible
JRubyGithub has left #jruby [#jruby]
<nirvdrum> bbrowning: Sorry, if you said this before, but I only see the issue when trying to retain a copy of $&
<bbrowning> nirvdrum: so when $&, $', etc are called it hits RubyRegexp.last_match, match_post, etc
<nirvdrum> Yeah.
<projectodd-ci> Project jruby-master-test-slow_suites build #1476: STILL FAILING in 7.3 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1476/
<bbrowning> last_match calls nth_match which ends up calling str.makeShared19
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bbrowning> but that's all old, I think
<projectodd-ci> Project jruby-master-spec-compiler build #1475: STILL FAILING in 8.9 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1475/
<nirvdrum> The makeShared19 is where I'm seeing your disparity though.
<nirvdrum> The real size is 5 and the underlying ByteList is 120K.
<bbrowning> huh
<bbrowning> nirvdrum: well that makes sense in this case I think
<bbrowning> since it's sharing the bytelist
x1337807x has joined #jruby
<nirvdrum> I have no clue how this wasn't a problem in 1.7. I'd need to step through that.
x1337807x has quit [Max SendQ exceeded]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] chrisseaton pushed 1 new commit to master: http://git.io/vIUNv
<JRubyGithub> jruby/master 73035f8 Chris Seaton: [Truffle] Try reverting RubyArray one step further.
JRubyGithub has left #jruby [#jruby]
<bbrowning> yeah now that I think about it, COW is flawed here anyway
<bbrowning> we have a large string str and every iteration through this loop it makes it a bit smaller
x1337807x has joined #jruby
<nirvdrum> Yeah. If you were using the same original string and getting a different view in it, this would be fantastic.
<nirvdrum> Well, save for the fact the string is also being dup'd, which undoes all that.
<bbrowning> so in 1.7 somehow it must have been sharing the same string with different views into it
<bbrowning> or either not using COW
<nirvdrum> Yeah, I'm just not sure how. The strip! call in your script should have been enough to force a copy.
<lopex> nirvdrum: not necessarily, ruby methods track sometimes if bang had an effect
<lopex> it's to return self or nil in bang versions
<nirvdrum> lopex: If not that, then the string reassignment.
<nirvdrum> Unless that's somehow viewing into the same ByteList.
<nirvdrum> If so, bravo :-)
<lopex> nirvdrum: in the past, I thought if the bang method didnt change anything the string would remaing shared
<lopex> wel, wrt correctness sharing, COW and mutations are all bag ideas anyways
<nirvdrum> lopex: Did you see the gist?
<bbrowning> I've got to run. Good luck :)
bbrowning is now known as bbrowning_away
<lopex> nirvdrum: strip! ?
<lopex> does str = str.strip help ?
<enebo> why would strip! matter?
<enebo> it happens outside the loop
<lopex> I thought you already ruled out String#[]
<lopex> enebo: some String bang methods might remain the string shared
<enebo> lopex: original script did not use String#[]
<nirvdrum> enebo: Good point. I quickly glanced at it.
<enebo> lopex: yeah but it does not really matter does it? all actions after that strp! whether it is still sharing or not may share as new strings
<enebo> lopex: this doesn ot recursively call this parse method
<enebo> I actually think bbrowning_away explanation of resize completely explains the behavior
<nirvdrum> So I guess the real question is was = somehow smart enough to view into a string in 1.7.20? I somehow doubt that.
<enebo> our resize assumes you will stop sharing
<nirvdrum> enebo: I was still seeing the problem after I removed both the strDup and the freeze call, however.
<lopex> enebo: so it's ultimately modify/modifyCheck issue ?
<enebo> we should just perhaps make subset resizes not stop sharing and then we can match MRI logic but that would be the same to me as just removing it since this is only for a reduced backing store change
<enebo> nirvdrum: oh
<enebo> nirvdrum: so that new freeze being removed does not fix the issue
<nirvdrum> Correct.
<enebo> nirvdrum: ah I was not paying attention :)
<nirvdrum> Where I'm seeing the leak is Regexp.nth_match calls makeShared19. That's causing what should by a 5 byte string to keep a 120K ByteList around.
<nirvdrum> s/should by/should be/
<lopex> is it ultimately the new freeze thingy issues ?
<nirvdrum> And the result is retained in @q.
<nirvdrum> That seems to support the large values he was seeing in the heap dump, too.
JRubyGithub has joined #jruby
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> jruby/master 5f93f4c Thomas E. Enebo: Fixes #2744. Syntax error with file that has OK syntax with MRI 2.2
<JRubyGithub> [jruby] enebo pushed 1 new commit to master: http://git.io/vITfk
<nirvdrum> But, this code doesn't look like it's changed in 6 or 7 years, so I'm not sure why it doesn't blow up in 1.7.20.
<enebo> yeah this has to be something deciding to stop sharing a larger view and really copy the backing byte array
<lopex> like what ?
<lopex> there's not thresholds on that :)
<enebo> lopex: originally I suspected $’ was not sharing and just making a smaller one with new byte[] and then $1 was sharing that but ben figured out that was not the case
<lopex> oh the $ ones mght be the leak definitely
<lopex> I need to move where your time zone is
<lopex> it's always midnight when some on irc comes up here
<lopex> something
<enebo> lopex: it would be double cool if you have also been drinking
SuperTaz_ has quit [Ping timeout: 248 seconds]
<lopex> enebo: I only drink on weekends if only
<lopex> enebo: last weekend we drank all that american beer with my brothers
<nirvdrum> enebo: I still think in the Regexp.nth_match case, it makes sense to extract a copy of the string rather than share it. Maybe you could use a heuristic to determine.
<lopex> enebo: what the status of those $ now ?
<lopex> thread locals or scoped ?
<lopex> I remember $ were an endless nightmare
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] bjfish pushed 1 new commit to master: http://git.io/vITUz
<JRubyGithub> jruby/master e1f7abb Brandon Fish: [Truffle] Unexcluding some running Regex specs
JRubyGithub has left #jruby [#jruby]
colinsurprenant has quit [Quit: colinsurprenant]
SuperTaz_ has joined #jruby
marr has joined #jruby
pitr-ch has quit [Ping timeout: 265 seconds]
pitr-ch has joined #jruby
pitr-ch_ has joined #jruby
<projectodd-ci> Project jruby-master-spec-ji build #1501: STILL FAILING in 10 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1501/
pitr-ch has quit [Ping timeout: 276 seconds]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
<projectodd-ci> Project jruby-master-test-slow_suites build #1477: STILL FAILING in 9.9 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1477/
yfeldblum has quit [Remote host closed the connection]
imperator has quit [Quit: Leaving]
mrmargolis has quit [Remote host closed the connection]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] bjfish pushed 1 new commit to master: http://git.io/vITOr
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> jruby/master 03b2f3d Brandon Fish: [Truffle] Unexcluding passing file socket spec
<projectodd-ci> Project jruby-master-spec-compiler build #1476: STILL FAILING in 6.7 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1476/
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #jruby
cpuguy83 has quit [Quit: ZNC - http://znc.in]
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
cpuguy83 has joined #jruby
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsim has quit [Quit: Leaving.]
pjammer has joined #jruby
baroquebobcat has quit [Quit: baroquebobcat]
baroquebobcat has joined #jruby
enebo has quit [Quit: enebo]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] bjfish pushed 1 new commit to master: http://git.io/vITn1
<JRubyGithub> jruby/master fa7c98c Brandon Fish: [Truffle] Unexcluding additional specs.
JRubyGithub has left #jruby [#jruby]
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] camlow325 opened issue #3020: Attempt to get output from PTY.spawn periodically hangs http://git.io/vITcp
JRubyGithub has left #jruby [#jruby]
AlHafoudh has quit [Ping timeout: 245 seconds]
subbu is now known as subbu|busy
AlHafoudh has joined #jruby
flori_ has quit [Ping timeout: 245 seconds]
flori has joined #jruby
pjammer has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pjammer has joined #jruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has quit [Quit: Computer has gone to sleep.]
sholden_ has joined #jruby
sholden has quit [Ping timeout: 276 seconds]
sholden_ is now known as sholden
ale_ has quit [Ping timeout: 245 seconds]
ale has joined #jruby
nirvdrum has quit [Ping timeout: 265 seconds]
iamjarvo has joined #jruby
iamjarvo has quit [Max SendQ exceeded]
iamjarvo has joined #jruby
yfeldblum has joined #jruby
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 2 new commits to master: http://git.io/vITBu
<JRubyGithub> jruby/master 845fe74 Kevin Menard: [Truffle] Fix git for Rubinius in regexp.rb.
<JRubyGithub> jruby/master f9ece65 Kevin Menard: [Truffle] All Regexp#match specs passing.
JRubyGithub has left #jruby [#jruby]
kstuart has quit [Quit: WeeChat 1.2]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
iamjarvo has quit [Remote host closed the connection]
iamjarvo has joined #jruby
sholden has quit [Quit: sholden]
<projectodd-ci> Project jruby-master-spec-ji build #1502: STILL FAILING in 5.4 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1502/
nirvdrum has joined #jruby
subbu|busy is now known as subbu
<projectodd-ci> Project jruby-master-test-slow_suites build #1478: STILL FAILING in 9.8 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-test-slow_suites/1478/
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<projectodd-ci> Project jruby-master-spec-compiler build #1477: STILL FAILING in 10 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-compiler/1477/
JRubyGithub has joined #jruby
<JRubyGithub> [jruby] nirvdrum pushed 1 new commit to master: http://git.io/vITgF
JRubyGithub has left #jruby [#jruby]
<JRubyGithub> jruby/master b0995c6 Kevin Menard: [Truffle] No need to use iterateFrames.
mcclurmc has quit [Remote host closed the connection]
mcclurmc has joined #jruby
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #jruby
rcvalle has quit [Quit: rcvalle]
havenwood has quit [Ping timeout: 244 seconds]
<projectodd-ci> Project jruby-master-spec-ji build #1503: STILL FAILING in 9.8 sec: https://projectodd.ci.cloudbees.com/job/jruby-master-spec-ji/1503/
kfpratt has quit []