ur5us has joined #jruby
victori has joined #jruby
meerohar has joined #jruby
ur5us_ has joined #jruby
ur5us has quit [Ping timeout: 258 seconds]
meerohar has quit [Quit: Leaving]
ur5us has joined #jruby
ur5us_ has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 240 seconds]
kalenp[m] has quit [Ping timeout: 246 seconds]
headius[m] has quit [Ping timeout: 246 seconds]
KarolBucekGitter has quit [Ping timeout: 246 seconds]
UweKuboschGitter has quit [Ping timeout: 246 seconds]
ravicious[m] has quit [Ping timeout: 246 seconds]
boc_tothefuture[ has quit [Ping timeout: 240 seconds]
byteit101[m] has quit [Ping timeout: 240 seconds]
kroth_lookout[m] has quit [Ping timeout: 240 seconds]
liamwhiteGitter[ has quit [Ping timeout: 240 seconds]
FlorianDoubletGi has quit [Ping timeout: 240 seconds]
kai[m] has quit [Ping timeout: 240 seconds]
MarcinMielyskiGi has quit [Ping timeout: 268 seconds]
CharlesOliverNut has quit [Ping timeout: 268 seconds]
TimGitter[m] has quit [Ping timeout: 240 seconds]
BlaneDabneyGitte has quit [Ping timeout: 240 seconds]
JulesIvanicGitte has quit [Ping timeout: 240 seconds]
jpsikorra[m] has quit [Ping timeout: 240 seconds]
codeponpon[m] has quit [Ping timeout: 240 seconds]
ChrisSeatonGitte has quit [Ping timeout: 240 seconds]
JesseChavezGitte has quit [Ping timeout: 260 seconds]
MattPattersonGit has quit [Ping timeout: 260 seconds]
TimGitter[m]1 has quit [Ping timeout: 260 seconds]
souravgoswami[m] has quit [Ping timeout: 244 seconds]
hopewise[m] has quit [Ping timeout: 265 seconds]
nhh[m] has quit [Ping timeout: 265 seconds]
rdubya[m] has quit [Ping timeout: 265 seconds]
XavierNoriaGitte has quit [Ping timeout: 265 seconds]
RomainManni-Buca has quit [Ping timeout: 265 seconds]
daveg_lookout[m] has quit [Ping timeout: 272 seconds]
enebo[m] has quit [Ping timeout: 260 seconds]
OlleJonssonGitte has quit [Ping timeout: 268 seconds]
ahorek[m] has quit [Ping timeout: 268 seconds]
lopex[m] has quit [Ping timeout: 240 seconds]
enebo[m] has joined #jruby
kalenp[m] has joined #jruby
headius[m] has joined #jruby
lopex[m] has joined #jruby
KarolBucekGitter has joined #jruby
UweKuboschGitter has joined #jruby
ravicious[m] has joined #jruby
MarcinMielyskiGi has joined #jruby
CharlesOliverNut has joined #jruby
byteit101[m] has joined #jruby
boc_tothefuture[ has joined #jruby
daveg_lookout[m] has joined #jruby
JesseChavezGitte has joined #jruby
TimGitter[m]1 has joined #jruby
MattPattersonGit has joined #jruby
hopewise[m] has joined #jruby
nhh[m] has joined #jruby
RomainManni-Buca has joined #jruby
rdubya[m] has joined #jruby
XavierNoriaGitte has joined #jruby
kroth_lookout[m] has joined #jruby
liamwhiteGitter[ has joined #jruby
FlorianDoubletGi has joined #jruby
kai[m] has joined #jruby
TimGitter[m] has joined #jruby
codeponpon[m] has joined #jruby
jpsikorra[m] has joined #jruby
ChrisSeatonGitte has joined #jruby
JulesIvanicGitte has joined #jruby
BlaneDabneyGitte has joined #jruby
souravgoswami[m] has joined #jruby
OlleJonssonGitte has joined #jruby
ahorek[m] has joined #jruby
ur5us has joined #jruby
ur5us has quit [Ping timeout: 264 seconds]
drbobbeaty has quit [Quit: Textual IRC Client: www.textualapp.com]
drbobbeaty has joined #jruby
drbobbeaty has quit [Quit: Textual IRC Client: www.textualapp.com]
barjac_ has joined #jruby
barjac_ has quit [Connection closed]
drbobbeaty has joined #jruby
peaches has joined #jruby
peaches has quit [Connection closed]
Shanmugamp7 has joined #jruby
Iota has joined #jruby
<Shanmugamp7> /!\ this channel has moved to ##hamradio /!\
<Iota> /!\ this channel has moved to ##hamradio /!\
Shanmugamp7 is now known as Guest1515
Iota has quit [Remote host closed the connection]
Guest1515 has quit [Remote host closed the connection]
Guest88756ao has joined #jruby
Guest88756ao has quit [Remote host closed the connection]
vdamewoodum has joined #jruby
<vdamewoodum> /!\ this channel has moved to #nyymit /!\
vdamewoodum has quit [Remote host closed the connection]
Geeky_BearOq has joined #jruby
<Geeky_BearOq> /!\ this channel has moved to #nyymit /!\
Geeky_BearOq has quit [Remote host closed the connection]
armindJ has joined #jruby
<armindJ> /!\ this channel has moved to #nyymit /!\
armindJ has quit [Remote host closed the connection]
victori has quit [Ping timeout: 256 seconds]
victori has joined #jruby
_whitelogger has joined #jruby
ruurd has joined #jruby
ruurd has quit [Client Quit]
<headius[m]> kalenp: sorry nobody got back to you, I was off most of yesterday
<headius[m]> kalenp: you don
<headius[m]> kalenp: you don't work with Freaky do you? We have been trying to sort out a json issue for him also
<headius[m]> boc_tothefuture: Hmm this could be due to LoadError hiding some exceptions... it wraps them and unless you can rescue it you can't figure out what the original was
<headius[m]> this particular error looks like it can't find a file though... could that file be missing or inaccessible?
<kalenp[m]> I don't believe I do. johnphillips31416 is my coworker who may have brought this up before.
<headius[m]> Freaky: did you ever open an issue for this?
<headius[m]> kalenp: last we chatted about it Freaky was working to narrow it down as it seemed intermittent
<headius[m]> I was suspecting character encoding issues in the passed in json
<kalenp[m]> character encoding is the best we can come up with as well
<headius[m]> the issue seemed to be that it didn't manage to pull any tokens during parse and the error shows unexpected token with the entire json
<headius[m]> which as far as I could tell would only be something odd about encoding
<kalenp[m]> we see that the "unexpected token" shows the entire rest of the json when it fails. but we also see that sometimes it partially succeeds, consuming at least the first part of the json
<kalenp[m]> * we also see that the "unexpected token" shows the entire rest of the json when it fails. but we also see that sometimes it partially succeeds, consuming at least the first part of the json
<Freaky> headius[m]: I didn't, seemed to be an OpenJDK 15 issue
<kalenp[m]> definitely also seeing the intermittent behavior
<Freaky> interesting to see it on 11
<Freaky> and permanent
<kalenp[m]> we recently updated from 8 to 11, and that's when we started seeing our json issues
<Freaky> I'm seeing it as a one-off early in the process, it either happens fairly quickly or not at all
<Freaky> and on static strings, not just payloads from services
<headius[m]> kalenp: we were down to wondering if it was some bug in JDK jit because it didn't seem to tie to anything else
<headius[m]> either of you tried rolling back to an earlier json?
<Freaky> I switched to jrjackson
<kalenp[m]> I don't think we've seen it on explicitly static strings, but pretty close, json files that we package in the jar, so that still works to take the user-input factor out
<Freaky> I threw in a tiny static JSON.parse('{ ... }') as a test and saw it trigger in that almost immediately
<Freaky> food, bbl
<headius[m]> kalenp: so this is an open mystery and we have no solid leads right now
<headius[m]> if you just recently started seeing this, were there any updates that might have brought in a new json?
<kalenp[m]> I'll double-check the timing, but I believe the json library update doesn't correlate with when we started seeing our issue
<kalenp[m]> our best correlation is the java 8 -> 11 switch, which fits with your "jdk jit bug" theory, as much as I hate blaming lower-level systems
<kalenp[m]> Confirmed: We updated the json gem from 2.2.0-java to 2.3.0-java back in May of last year, but we didn't start seeing these issues until this fall.
<headius[m]> we can review commits between there perhaps
<kalenp[m]> nothing jumping. don't see any java changes in that range at all https://github.com/flori/json/compare/v2.2.0..v2.3.0
<kalenp[m]> is there an open issue on the project github for this?
<headius[m]> not yet
<boc_tothefuture[> headius: It wasn't the actual error I was trying to debug, more about is there a way for me to configure so that the information (line number where its failing) shows up in the exception, like it does in STDOUT. In this system, people don't really have access to STDOUT which makes debugging tough.
<headius[m]> kalenp: open something on jruby and provide info you have
<kalenp[m]> will do
<headius[m]> boc_tothefuture: ahh I think we would need to look into how the embed stuff is handling that... perhaps the original exception is not being used as the cause of the EvalFailedException?
<boc_tothefuture[> Someone opened a discussion here showing the JRuby/Jython difference within the same framework: https://github.com/boc-tothefuture/openhab-jruby/discussions/129
<boc_tothefuture[> They get the offending line from Jython with roughly the same error, but not JRuby..
<boc_tothefuture[> And it could be in some way how I have configured the engine, but I didn't see anything I could change.
<headius[m]> well let's see
<headius[m]> EvalFailedException is a pretty straightforward subclass of RuntimeException and does appear to pass cause through
<headius[m]> boc_tothefuture: I think the difference in that python example must be that jython includes the file and line number in the exception message
<headius[m]> probably because they don't manipulate the stack trace like we do to include Ruby lines
<headius[m]> we generally try to match the format of the error messages in CRuby, which don't include the file or line where it happened (that would be in the stack trace)
<boc_tothefuture[> Ok. So, I guess one option would be for me to redirect STDOUT to the logger?
<boc_tothefuture[> or I guess that would be STDERR
<boc_tothefuture[> but I haven't checked
<headius[m]> yeah why it is going to stdout/stderr I am not sure
<boc_tothefuture[> Isn't that what ruby does?
<headius[m]> well it does when you run something at a command line and it bubbles all the way out and kills the process
<headius[m]> that may be the same logic here but we shouldn't print it to stdout if it is being rethrown for something else to handle
<boc_tothefuture[> the stack trace for the errors show up in STDOUT (or maybe STDERR I don't actually know).
<headius[m]> yeah I am looking to figure out how/why that happens
<headius[m]> boc_tothefuture: I don't see anything in the 223 or embedding logic that would be printing that trace out
<headius[m]> not yet anyway
<headius[m]> it definitely looks like JRuby exception output though
<boc_tothefuture[> let me go make sure I didn't do anything crazy...
<boc_tothefuture[> I don't see where I do anything at all
<headius[m]> nothing in embedding should be calling through there
<headius[m]> the top level in your example error above is `openhab/dsl/group.rb:5`, perhaps whatever is calling that logs errors using stderr?
<boc_tothefuture[> hmm.. like catching all exceptions?
<boc_tothefuture[> let me check for any puts statements
<headius[m]> yeah
<boc_tothefuture[> nope, no pp or puts statements in any of my code
<headius[m]> hmm
<headius[m]> I am looking for anywhere else we output this format
<headius[m]> aha I may have it
<headius[m]> well there are other places that call this same error printing but not sure which one might be affecting your calls
<headius[m]> what do you call on the 223 engine to get that failure above?
<headius[m]> boc_tothefuture: yeah no leads here... the 223 engine impl does not appear to call logic that would print this exception but I am still poking around
<boc_tothefuture[> sorry didnt' see the previous question.
<boc_tothefuture[> hmm, what do you mean what do I call in it? what is the code or how is the engine invoked?
<headius[m]> how is the engine invoked
<boc_tothefuture[> that has the code were JRuby is configured
<headius[m]> so pretty much engine.eval anywhere you call into it
<headius[m]> `logger.error("Error during evaluation of script '{}': {}", engineIdentifier, ex.getMessage());`
<boc_tothefuture[> yep, that is the line there.
<headius[m]> is that the logger you would expect to be giving the one liner with no line numbers?
<headius[m]> ok
<travis-ci> jruby/jruby (master:5d4dcf8 by Charles Oliver Nutter): The build is still failing. https://travis-ci.com/jruby/jruby/builds/216705167 [207 min 58 sec]
travis-ci has left #jruby [#jruby]
travis-ci has joined #jruby
<headius[m]> aha
<headius[m]> there is a rogue printStackTrace on 9.2 branch that was removed on master
<headius[m]> er printError, which is the format we output at command line
<headius[m]> so that explains that at least
<headius[m]> the rest of the logic there and on master just wraps and raises it
ur5us has joined #jruby
<headius[m]> only went into master as part of cleaning up test output
<boc_tothefuture[> Yeah, this is on 9.2.14.0
<headius[m]> so getting back to your issue, I think logging a stack trace would get you line numbers, but we may want to add something to the embedding logic that includes some file+line info in the message
<headius[m]> I don't see that we are doing anything wrong per se, we just don't include file and line information in the message because it should be in the trace
<boc_tothefuture[> well, except I don't own the core platform.. i can submit a PR of course, but we end up in a situation where one JSR223 implementation (Jython) has the offending line and Jruby does not.. At this point they have chosen not to log the stack trace, so would need to see if they would be open to that.
<boc_tothefuture[> yep, I get what you are saying from the matching the MRI perspective.
<boc_tothefuture[> Wonder if in a JSR223 perspective, it does make more sense to include it.
<boc_tothefuture[> In the mean time, is there anything I can do globally to catch the stack trace so I can log it from Ruby?
<headius[m]> in a JSR223 perspective I could see us enhancing that message
<headius[m]> if you need to log it for some debugging purpose there are noisy ways
<boc_tothefuture[> what would be the noisy way?
<headius[m]> jruby.log.backtraces=true will log every backtrace generated
<boc_tothefuture[> And should I open a PR for enhancing JSR223 exception logging with the offending line number?
<headius[m]> we use it to track swallowed exceptions
<headius[m]> since they can be expensive
<boc_tothefuture[> oh sorry.. I mean, is there a way for me inside of Ruby to hook in when the exception is happening so I can redirect to the framework log?
<headius[m]> there's also jruby.log.exceptions=true but it is only the exception type
<headius[m]> there is not a general purpose way to always hook exceptions getting raised
<boc_tothefuture[> Ok, so probably the best option is for me is to open a PR.
<headius[m]> a PR to enhance the message would be good yes
<headius[m]> enhance the message or enable/disable logging full exceptions somewhere
travis-ci has joined #jruby
<travis-ci> jruby/jruby (jruby-9.2:0013ec5 by Alexander Schwartz): The build is still failing. https://travis-ci.com/jruby/jruby/builds/216706067 [175 min 17 sec]
travis-ci has left #jruby [#jruby]
<boc_tothefuture[> thanks, I will open a PR.
<kalenp[m]> Created an issue for the json parsing errors: https://github.com/jruby/jruby/issues/6554
<kalenp[m]> @freak
<kalenp[m]> * Freaky: if you think this is the same issue, please add details on what you've seen
<boc_tothefuture[> I might just not understand what java_import is supposed to do
<headius[m]> boc_tothefuture: hmm I don't think those should behave differently
ur5us has quit [Ping timeout: 264 seconds]
<headius[m]> possibly a classloader difference but they should be using the same thing
ur5us has joined #jruby
ur5us has quit [Ping timeout: 272 seconds]
<boc_tothefuture[> some sort of OSGI thing?