<GitHub83>
jruby/master 9176fc8 Benoit Daloze: [Truffle] Move Array#unshift to Ruby.
<GitHub12>
[jruby] headius closed pull request #3833: Fixnum#bit_length - uses bit inversion when the value is negative (master...fixnum-bitlength) https://git.io/vwoIB
<GitHub108>
jruby/master 74d5312 Charles Oliver Nutter: When duping Struct accessor methods, ensure they actually dup....
<headius>
eregon: got a question for you about a spec
<headius>
I want to add a spec that cloned struct-based classes clone properly
skade has quit [Read error: Connection reset by peer]
<headius>
but the behavior of cloning a class is already specified...this was broken for us on struct mostly because of the way we constructed the struct class
<headius>
it is perhaps reasonable since the struct-based classes are kinda special weird entities
pawnbox has quit [Remote host closed the connection]
praveen has quit [Remote host closed the connection]
praveen has joined #jruby
pawnbox has joined #jruby
thedarkone2 has joined #jruby
praveen has quit [Remote host closed the connection]
praveen has joined #jruby
bbrowning has quit [Ping timeout: 265 seconds]
<enebo>
kares: how many versions of rails are supported in arjdbc?
pawnbox has quit [Remote host closed the connection]
<headius>
I have a question about how celluloid deals with stuck fibers/actors
<headius>
digitalextremist: hey there
<headius>
just trying to get a handle on this bug
<headius>
9.1 has a reimplemented Queue so that might change the game...but probably not
<digitalextremist>
Right on. What's the Celluloid issue you wondered about, is it related to the bug, or?
<headius>
mostly wondering how/if it kills actors in some specific way
<headius>
can you reproduce those exceptions at will?
<headius>
I need a run with -Xbacktrace.style=full
djellemah_ has joined #jruby
djellemah_ has quit [Max SendQ exceeded]
<digitalextremist>
Celluloid passes a Kill message into the mailbox of the actor to terminate it, and it kills itself... ideally. Or in this case, where an unhandled exception comes along.
<digitalextremist>
Running it with that argument now.
<headius>
so if you can't rescue it with Exception, you could try Object...but Exception should handle just about everything, even Java exceptions
<fuzzyhorns>
ive hit a wall with warbler — anyone used it?
djellemah_ has joined #jruby
<headius>
fuzzyhorns: there's several folks here, and codefinger wrote a book on it
<digitalextremist>
headius: I will also try Object after I get a full backtrace. That's a really novel idea.
<codefinger>
yo
<headius>
whether those folks are idle or not I'm not sure
<codefinger>
fuzzyhorns: what's up?
<headius>
digitalextremist: if that doesn't work it's possible it's a Ruby exception coming from some other JRuby instance in the same JVM...is that possible?
djellemah__ has joined #jruby
<fuzzyhorns>
codefinger: well, i have a small ruby project which warbles fine, but it has a dependency on a gem that has native extensions in java
<headius>
even then I think Object should get it
<codefinger>
fuzzyhorns: like JNI? is it oss, or can i see it?
<fuzzyhorns>
codefinger: when i try to run the jar i warbled into, it doesnt have the natively extended java
djellemah has quit [Ping timeout: 250 seconds]
<fuzzyhorns>
codefinger: i wish it was open source :c i can share bits and pieces of it
<digitalextremist>
headius: I didn't think there could be interaction between processes like that. Yes, there is a twin of this server running on the same machine, but how could I tell if it's an alien invasion of this process by another process?
<codefinger>
fuzzyhorns: the gem with the native extensions is closed source too?
<fuzzyhorns>
codefinger: yeah :c — i wrote both
<headius>
digitalextremist: if isolated by process boundaries it's not that
<headius>
this only happens with two jruby instances in the same JVM
<codefinger>
fuzzyhorns: i wonder, could you make a dead simple gem that has a dummy native extension to reproduce the problem?
<fuzzyhorns>
the gem with the native extensions uses a Jarfile to grab the relevant jars it depends on. idk if this was a poor choice on my part
<codefinger>
ah
<codefinger>
like jbundler
<codefinger>
like a jbundler Jarfile?
<fuzzyhorns>
im using lockjar but i imagine it is the same :x
<codefinger>
right. does the .gem you create include the JAR files from the Jarfile?
<codefinger>
warbler doesn't have any concept of jbundler or Jarfile. but if you have a fatgem (a gem with jar inside it), i think that should work
djellemah_ has quit [Ping timeout: 244 seconds]
<fuzzyhorns>
@codefinger ah, i guess i will need to switch. following lockjar, i'd relied on rake during install
<headius>
I think you might have seen similar reports
<fuzzyhorns>
codefinger: in the project that includes the gem with native extensions, i assumed i could vendor the installed gem and be ok
<bascule>
headius: not that specifically
<bascule>
headius: all of the fun odd exceptions I've seen were due to I/O, and AFAICT they're all fixed in 9.0.5.0
<headius>
where does that "Actor crashed" come from?
<bascule>
somewhere deep in the guts of Celluloid, heh
<codefinger>
fuzzyhorns: not sure. i suppose you could repeat the JAR dependency in the project that requires the gem...
<codefinger>
fuzzyhorns: ultimately, it would be nice if warbler has support for jbundler, lock_jar or something. I think there needs to be a standard first, though.
<fuzzyhorns>
codefinger: mm, that defeats the point to me, which is i wanted the project to not have to know what's in the gem in relies on
<codefinger>
fuzzyhorns: certainly. it would be a hack
<digitalextremist>
headius: yeah, we haven't really seen stuff like this. I'd try to run it on Rubinius or MRI just to see what they barf on, but this project is jRuby dependent ( and it runs the services extremely well )
<digitalextremist>
( yo, bascule, btw )
<headius>
sure, I understand
<headius>
bascule: ok thanks
<fuzzyhorns>
codefinger: do i misunderstand how vendoring works? why wouldnt warbler just pick up what's in the vendored folder? doesnt it include the native extensions there?
<headius>
digitalextremist: put your new trace in the bug please
<headius>
it should show us more lines at the top normally hidden
<digitalextremist>
About to do that right quick sir.
<codefinger>
fuzzyhorns: i'm not sure. does lock_jar put the JAR file(s) in the vendor dir?
<digitalextremist>
oh damn. Yep
<codefinger>
fuzzyhorns: I've not used lock_jar (this is actually the first i've seen of it)
<kares>
enebo: hey!
<fuzzyhorns>
codefinger: good question, i will investigate
<kares>
did some replies but you probably do not have a bouncer ...
<kares>
<kares> its a git issue on a non-case sensitive FS ... mac osx
<kares>
<kares> there's an issue somewhere closed with a resolution
<codefinger>
fuzzyhorns: does it work without `compiled`?
<digitalextremist>
headius: Object did not catch it.
<codefinger>
fuzzyhorns: also, does `tmp/gems/minitest-5.8.4/design_rationale.rb`, and does it have the right perms? seems like an odd file to be included (since it's a test dep and in a temp dir to boot)
<codefinger>
does `tmp/gems/minitest-5.8.4/design_rationale.rb` *exist?
<fuzzyhorns>
codefinger: yep, it warbles, but then when i try to execute, it barfs because it doesnt have the java dep it needs
<fuzzyhorns>
codefinger: it indeed exists. i assume given the structure of tmp that warbler is using this directory to build incrementally
<fuzzyhorns>
ls tmp/
<fuzzyhorns>
=> app config gems spec vendor
<headius>
digitalextremist: boo
<digitalextremist>
I didn't think that was possible headius
<headius>
digitalextremist: it shouldn't be
<digitalextremist>
Even stranger to me, is that the actor that's dying isn't even the actor where the exception occurs.
<headius>
digitalextremist: try this...make your own object that responds to === by logging everything
<headius>
see if it's even getting through the === part of the rescue
<codefinger>
fuzzyhorns: the compiled feature is pretty fickle. i would put that aside for now and focus on the java dep
<headius>
I suspect it's bubbling all the way out because we don't see it as a rescuable exception
<digitalextremist>
Right on. Am I overriding Object#=== then?
<headius>
anonException.setBaseName(null); // clear basename so it's anonymous when raising
<headius>
a Timeout exception is the only place where we have this "execution expired" message, and this anonymous exception apparently removes name
<headius>
but that doesn't explain why it can't be rescued
<headius>
digitalextremist: are these exceptions breaking something?
<headius>
digitalextremist: and yes, make a class that just overrides === that way and use an instance of it in your rescue
<digitalextremist>
Ahhhh, ok. And yes, it does break the calling actor, versus the failing actor.
<headius>
ok
<headius>
so an actor times out, and this exception bubbles back out to some other
<headius>
we do propagate exceptions out of fibers through yield...I'm guessing that's happening here...but perhaps we're not propagating it without making it unrescuable somehow
<fuzzyhorns>
codefinger: i figured the compiled option was the way to resolve that java dep
<fuzzyhorns>
codefinger: my logic being that i needed to compile all the gems (including their native extensions) along with the app itself
<digitalextremist>
analyzer.rb:52:in `process' is a 14.5 second timeout span starting, then get_json occurs in another actor, which is what actually times out the caller. I tried having that called actor timeout before the outer timeout had time to complain, but I can't remember the outcome -- it wasn't a solution from what I remember.
<codefinger>
fuzzyhorns: i see. no the compiled feature generates ahead-of-time compiled bytecode from the Ruby code. i don't think it will have any affect on Gem exts
<fuzzyhorns>
codefinger: ahhh ok, i misunderstood it
<codefinger>
fuzzyhorns: i think that if the vendored Gem has the JAR, then warbler will include the JAR. but not sure if it will put it on the classpath. you might need a Rake task in the parent project that runs lock_jar to vendor the JAR of the gem.
<codefinger>
maybe lock_jar can resolve JARs of dependent gems? that way you could use lock_jar with your parent project, and just ignore that the dependent gems have JAR deps
<fuzzyhorns>
codefinger: im unsure how to check if the vendored gem has the jar :/
<headius>
digitalextremist: is the timeout expected?
<headius>
I'm trying to formulate a repro based on the AnonymousException thing
<fuzzyhorns>
codefinger: im unsure how my project can even work if it doesn't have access to it somehow though — and it does run in its non jar form just fine
<digitalextremist>
headius: yes it is, the call is going out to an API which at times gets overloaded so we are simulating an overload scenario to reproduce the error
subbu|lunch is now known as subbu
<headius>
ok
<headius>
propagating timeout exception through Fiber has been a pain in my side before
<headius>
damn emulating threadlets with threads
<digitalextremist>
headius: strangely the dummy object didn't hit === ... it's #=== right? or is it self.===?
<digitalextremist>
It seems like it'd be #===
<digitalextremist>
class Debugger
<digitalextremist>
def ===(test)
<digitalextremist>
#de Throw in a logging process.
<digitalextremist>
error("Checking #{test} of type #{test.class.name}")
<digitalextremist>
false
<digitalextremist>
end
<digitalextremist>
end
yfeldblum has quit [Ping timeout: 250 seconds]
<fuzzyhorns>
oh wait i just realized it must be loading _some_ of the native dep files codefinger — unsure why not this one. will keep looking. really appreciate you talking to me though :x
<fuzzyhorns>
needed to verbalize some of my (wrong) thought processes :d
<headius>
digitalextremist: that should be right
<headius>
digitalextremist: yeah very odd
skade has quit [Quit: Computer has gone to sleep.]
<digitalextremist>
headius: changed the output to STDERR.puts to be sure, but yea-- doesn't get tested at all.
pawnbox_ has quit [Remote host closed the connection]
<headius>
ok
pawnbox has joined #jruby
<headius>
you could try a run with -Xjit.threshold=0 -Xjit.background=false
<digitalextremist>
Roger that.
<headius>
with the full trace it may give us some lines we can't see with just the interpreter
<headius>
that plus full backtrace
<headius>
I'm trying to reproduce
<headius>
digitalextremist: also could try java.lang.Throwable in your rescue but I suspect it would still get missed
<headius>
hey can you add an ensure to see that it fires?
<headius>
feel like we're chasing our tails
<digitalextremist>
headius: that seems to prolong instantiation of new actors so long it can't even start the app
<headius>
digitalextremist: mmm ok
<digitalextremist>
headius: good idea on the ensure. Will add
<GitHub88>
jruby/master cd1120f Benoit Daloze: Travis: jt check_ambiguous_arguments is working now.
djellemah_ has joined #jruby
pitr-ch has quit [Ping timeout: 246 seconds]
pawnbox has quit [Ping timeout: 260 seconds]
praveen__ has quit []
djellemah__ has quit [Ping timeout: 276 seconds]
pitr-ch has joined #jruby
<headius>
digitalextremist: so the next thing I'd try would be to modify code around the Queue pop to log all exceptions that bubble out
brightball has joined #jruby
<headius>
or if I could reproduce, step debug the same
<digitalextremist>
headius: is that something I can do? I'm trying to see if another actor can perform the call, and see if the intermediate actor dies vs. the ultimate originator of the call, like now.
bbrowning has joined #jruby
cprice has joined #jruby
skade has joined #jruby
<fuzzyhorns>
codefinger: i think the questionable thing i did was actually im relying on a compiled java class file in the gem with the native extensions. i probably should just have that as a jar i guess?
<headius>
digitalextremist: this won't make 9.1 at this point, we want to release it Monday or Tuesday
<codefinger>
fuzzyhorns: not sure if that matters, of the top of my head. mostly matters whether its on the classpath, and either a .class or .jar could be on the path. i suspect warbler will pull either .class or .jar into the WAR if it's in the vendor dir. but i'm not sure if it will put them on the classpath
<digitalextremist>
headius: so it's a confirmed jRuby bug, but you need to return to polishing 9.1?
<headius>
digitalextremist: I'll continue this in the bug and provide a patch you can try
<headius>
well it's not really confirmed until I can reproduce it, but I trust you
<headius>
it's just not something we can diagnose and fix in the next day most likely
<digitalextremist>
headius: I don't mind rolling my own jRuby if needed.
<digitalextremist>
headius: right on. I will also try to put together a bare metal repro for the team
<headius>
ok, right now or later?
<fuzzyhorns>
codefinger: mmm, it seems as if it is not for this class, but for all the jars it's fine
<enebo>
kares: something to think about…Rails 5 is 2.x+ so some APIs use keyword arguments
<codefinger>
fuzzyhorns: i'm thinking there's a part of warbler were it search for jar files and moves them into the WEB-INF/lib (but can't find it). if that exists, that would explain it
<enebo>
kares: not sure how much that will affect stuff internally in our impl but it might imply we cannot support both <5 and >=5 in same arjdbc release without some serious pain
<enebo>
kares: like doing version protected loads
<digitalextremist>
headius: just saw your prognosis
<headius>
digitalextremist: I'll update bug with more suggestions for you to look into
<digitalextremist>
headius: thanks a lot, really man. Is there a documented way to preselect you beer to try, or chip into the beer fund?
camlow325 has joined #jruby
<headius>
hah we should probably set that up
<headius>
if you have any funky local beers you can ship some to us :-)
<digitalextremist>
headius: that's like at emergency level
<digitalextremist>
headius: I'm in downtown San Diego so that is a definite can-do
<headius>
ahh ok...I forget where you're based...I keep thinking Germany because of "de"
<headius>
don't suppose you'll be at RailsConf
<digitalextremist>
headius: haha, and locally people think I'm latino ( in Guatemala they call me "The" ) ... unfortunately not this year :(
<headius>
I added tips on how to start debugging with some exception logging
<headius>
seems like the best place to start
<digitalextremist>
headius: Awesome. Thanks a lot for your time and insights today, and per usual.
<headius>
sure...good luck on debugging and coming up with repro
<headius>
bascule: # TODO: Determine why infinite thread leakage happens under jRuby, if `Fiber.yield` is used:
<headius>
Fiber.yield expects to get a return value and I'm betting this may not