Re: Insane stack trace with no reference to my code

2016-09-27 Thread Colin Yates
Narrowing the problem down, on an error the error handler serialises
the current UI state (which can be very large) to EDN and persists that
in a DB. I am thinking something in there is throwing an exception
which, when I try to log it out, causes the recursion. This throws
another exception and only the top 1024 frames of the secondary
exception is printed.

Thanks all, this is really helpful.

Digging continues.

On Tue, 27 Sep 2016, at 11:41 AM, Ragnar Dahlén wrote:
> Hi Colin,
>
> I think you're correct in that something is calling print on a largish
> data structure (possibly due to "loops" like Thomas points out), and
> due to the recursive nature of print you're running out of stack
> space. The JVM (hotspot anyway) will by default only keep the top 1024
> stack frames which is likely why you're not seeing your code anywhere:
>
> $ java -XX:+PrintFlagsFinal -version | grep MaxJavaStackTraceDepth
>  intx MaxJavaStackTraceDepth= 1024
>  {product}
>
> You could try increasing that value, or increasing the stack size (-
> Xss), or possibly binding *print-length* to something small to
> troubleshoot this problem.
>
> /Ragnar
>
> On Tuesday, 27 September 2016 11:16:15 UTC+1, Colin Yates  wrote:
>> Thanks Thomas. The NREPL is a red herring as that is a printout from
>> my local machine - the production error doesn't reference any REPLs -
>> I should have stated that. Unfortunately I can't get it from
>> production as it is a very locked down environment (no copy and
>> paste, no internet connection etc.).
>>
>> To be clear, I get this behaviour from a web request.
>>
>> I might be doing something stupid with components referencing
>> themselves but I don't think so - good call though and somewhere to
>> reference. Still mystified as to why there is no reference to my code
>> though.
>>
>> Thanks Thomas.
>
> --
>  You received this message because you are subscribed to the Google
>  Groups "Clojure" group.
>  To post to this group, send email to clojure@googlegroups.com
>  Note that posts from new members are moderated - please be patient
>  with your first post.
>  To unsubscribe from this group, send email to
>  clojure+unsubscr...@googlegroups.com
>  For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>  ---
>  You received this message because you are subscribed to the Google
>  Groups "Clojure" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to clojure+unsubscr...@googlegroups.com.
>  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Insane stack trace with no reference to my code

2016-09-27 Thread Colin Yates
Great tip - thanks Ragnar

On Tue, 27 Sep 2016, at 11:41 AM, Ragnar Dahlén wrote:
> Hi Colin,
>
> I think you're correct in that something is calling print on a largish
> data structure (possibly due to "loops" like Thomas points out), and
> due to the recursive nature of print you're running out of stack
> space. The JVM (hotspot anyway) will by default only keep the top 1024
> stack frames which is likely why you're not seeing your code anywhere:
>
> $ java -XX:+PrintFlagsFinal -version | grep MaxJavaStackTraceDepth
>  intx MaxJavaStackTraceDepth= 1024
>  {product}
>
> You could try increasing that value, or increasing the stack size (-
> Xss), or possibly binding *print-length* to something small to
> troubleshoot this problem.
>
> /Ragnar
>
> On Tuesday, 27 September 2016 11:16:15 UTC+1, Colin Yates  wrote:
>> Thanks Thomas. The NREPL is a red herring as that is a printout from
>> my local machine - the production error doesn't reference any REPLs -
>> I should have stated that. Unfortunately I can't get it from
>> production as it is a very locked down environment (no copy and
>> paste, no internet connection etc.).
>>
>> To be clear, I get this behaviour from a web request.
>>
>> I might be doing something stupid with components referencing
>> themselves but I don't think so - good call though and somewhere to
>> reference. Still mystified as to why there is no reference to my code
>> though.
>>
>> Thanks Thomas.
>
> --
>  You received this message because you are subscribed to the Google
>  Groups "Clojure" group.
>  To post to this group, send email to clojure@googlegroups.com
>  Note that posts from new members are moderated - please be patient
>  with your first post.
>  To unsubscribe from this group, send email to
>  clojure+unsubscr...@googlegroups.com
>  For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>  ---
>  You received this message because you are subscribed to the Google
>  Groups "Clojure" group.
>  To unsubscribe from this group and stop receiving emails from it,
>  send an email to clojure+unsubscr...@googlegroups.com.
>  For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Insane stack trace with no reference to my code

2016-09-27 Thread Ragnar Dahlén
Hi Colin,

I think you're correct in that something is calling print on a largish data 
structure (possibly due to "loops" like Thomas points out), and due to the 
recursive nature of print you're running out of stack space. The JVM 
(hotspot anyway) will by default only keep the top 1024 stack frames which 
is likely why you're not seeing your code anywhere:

$ java -XX:+PrintFlagsFinal -version | grep MaxJavaStackTraceDepth
 intx MaxJavaStackTraceDepth= 1024 
   {product}

You could try increasing that value, or increasing the stack size (-Xss), 
or possibly binding *print-length* to something small to troubleshoot this 
problem.

/Ragnar

On Tuesday, 27 September 2016 11:16:15 UTC+1, Colin Yates wrote:
>
> Thanks Thomas. The NREPL is a red herring as that is a printout from my 
> local machine - the production error doesn't reference any REPLs - I should 
> have stated that. Unfortunately I can't get it from production as it is a 
> very locked down environment (no copy and paste, no internet connection 
> etc.).
>
> To be clear, I get this behaviour from a web request.
>
> I might be doing something stupid with components referencing themselves 
> but I don't think so - good call though and somewhere to reference. Still 
> mystified as to why there is no reference to my code though.
>
> Thanks Thomas.
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Insane stack trace with no reference to my code

2016-09-27 Thread Colin Yates
Thanks Thomas. The NREPL is a red herring as that is a printout from my 
local machine - the production error doesn't reference any REPLs - I should 
have stated that. Unfortunately I can't get it from production as it is a 
very locked down environment (no copy and paste, no internet connection 
etc.).

To be clear, I get this behaviour from a web request.

I might be doing something stupid with components referencing themselves 
but I don't think so - good call though and somewhere to reference. Still 
mystified as to why there is no reference to my code though.

Thanks Thomas.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Insane stack trace with no reference to my code

2016-09-27 Thread Colin Yates
Hi all,

I have a problem that has been hounding me for a while but has increased in 
frequency. Basically, something goes wrong with my code and I get a mother 
of all stack traces, but my code isn't referenced in it anywhere. 

My gut is telling me it is to do with schema validation - when that fails 
and it tries to print out the error, something gets confused and ends up 
with the stack trace. I had a similar problem using the Component library 
when I printed out a system map which included a heavily populated cache. 
If I recall it was a slightly different stack trace though.

Any ideas as to where to go with this?

The stack trace is:

java.lang.StackOverflowError: null
 at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
 at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
 at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
 at java.util.regex.Pattern$BranchConn.match(Pattern.java:4568)
 at java.util.regex.Pattern$GroupTail.match(Pattern.java:4717)
 at java.util.regex.Pattern$Curly.match0(Pattern.java:4279)
 at java.util.regex.Pattern$Curly.match(Pattern.java:4234)
 at java.util.regex.Pattern$GroupHead.match(Pattern.java:4658)
 at java.util.regex.Pattern$Branch.match(Pattern.java:4604)
 at java.util.regex.Pattern$Branch.match(Pattern.java:4602)
 at java.util.regex.Pattern$BmpCharProperty.match(Pattern.java:3798)
 at java.util.regex.Pattern$Start.match(Pattern.java:3461)
 at java.util.regex.Matcher.search(Matcher.java:1248)
 at java.util.regex.Matcher.find(Matcher.java:664)
 at java.util.Formatter.parse(Formatter.java:2549)
 at java.util.Formatter.format(Formatter.java:2501)
 at java.util.Formatter.format(Formatter.java:2455)
 at java.lang.String.format(String.java:2940)
 at clojure.core$format.invokeStatic(core.clj:5533)
 at clojure.core$print_tagged_object.invokeStatic(core_print.clj:106)
 at clojure.core$print_object.invokeStatic(core_print.clj:110)
 at clojure.core$fn__6044.invokeStatic(core_print.clj:113)
 at clojure.core$fn__6044.invoke(core_print.clj:113)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_map$fn__6094.invoke(core_print.clj:212)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$print_map.invokeStatic(core_print.clj:208)
 at clojure.core$fn__6097.invokeStatic(core_print.clj:217)
 at clojure.core$fn__6097.invoke(core_print.clj:217)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_map$fn__6094.invoke(core_print.clj:212)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$print_map.invokeStatic(core_print.clj:208)
 at clojure.core$fn__6115.invokeStatic(core_print.clj:271)
 at clojure.core$fn__6115.invoke(core_print.clj:268)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_map$fn__6094.invoke(core_print.clj:212)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$print_map.invokeStatic(core_print.clj:208)
 at clojure.core$fn__6115.invokeStatic(core_print.clj:271)
 at clojure.core$fn__6115.invoke(core_print.clj:268)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_map$fn__6094.invoke(core_print.clj:212)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$print_map.invokeStatic(core_print.clj:208)
 at clojure.core$fn__6115.invokeStatic(core_print.clj:271)
 at clojure.core$fn__6115.invoke(core_print.clj:268)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_map$fn__6094.invoke(core_print.clj:212)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$print_map.invokeStatic(core_print.clj:208)
 at clojure.core$fn__6115.invokeStatic(core_print.clj:271)
 at clojure.core$fn__6115.invoke(core_print.clj:268)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr_on.invoke(core.clj:3566)
 at clojure.core$print_sequential.invokeStatic(core_print.clj:59)
 at clojure.core$fn__6092.invokeStatic(core_print.clj:204)
 at clojure.core$fn__6092.invoke(core_print.clj:204)
 at clojure.lang.MultiFn.invoke(MultiFn.java:233)
 at clojure.core$pr_on.invokeStatic(core.clj:3572)
 at clojure.core$pr.invokeStatic(core.clj:3575)
 at clojure.core$pr.invoke(core.clj:3575)
 at clojure.lang.AFn.applyToHelper(AFn.java:154)
 at clojure.lang.RestFn.applyTo(RestFn.java:132)
 at clojure.core$apply.invokeStatic(core.clj:646)
 at clojure.core$pr_str.invokeStatic(core.clj:4580)
 at