[ 
https://issues.apache.org/jira/browse/GEODE-1842?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16715859#comment-16715859
 ] 

Anilkumar Gingade edited comment on GEODE-1842 at 12/12/18 9:42 PM:
--------------------------------------------------------------------

Talking to [~klund] TypedJson is still in the product. And GEODE-629 is meant 
to replace geode-json and TypedJason with Jackson. We could close this ticket 
as it address the issue related to the ticket.

 

Added sub-task in GEODE-629 to remove TypedJson.


was (Author: agingade):
Talking to [~klund] TypedJson is still in the product. And GEODE-629 is meant 
to replace geode-json and TypedJason with Jackson. We could close this ticket 
as it address the issue related to the ticket.

 

> Execution of query from GFSH or Pulse may kill a Server with 
> StackOverflowError
> -------------------------------------------------------------------------------
>
>                 Key: GEODE-1842
>                 URL: https://issues.apache.org/jira/browse/GEODE-1842
>             Project: Geode
>          Issue Type: Bug
>          Components: gfsh, pulse
>            Reporter: Kirk Lund
>            Assignee: Jinmei Liao
>            Priority: Critical
>              Labels: SmallFeature, StackOverflowError, gfsh, json, 
> pull-request-available, starter
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> TypedJson is prone to StackOverflowErrors which results in SystemFailure 
> shutdown of any Geode server that hits this problem. Below is the latest 
> error stack reported against TypedJson:
> {noformat}
> java.lang.StackOverflowError
> at java.lang.Class.getEnclosingMethodInfo(Class.java:1072)
> at java.lang.Class.getEnclosingClass(Class.java:1272)
> at java.lang.Class.getSimpleBinaryName(Class.java:1443)
> at java.lang.Class.getSimpleName(Class.java:1309)
> at java.lang.Class.getCanonicalName(Class.java:1399)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.internalToExternal(TypedJson.java:626)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeType(TypedJson.java:610)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeKeyValue(TypedJson.java:345)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.visitSpecialObjects(TypedJson.java:517)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeKeyValue(TypedJson.java:353)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.visitChildrens(TypedJson.java:670)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.addVal(TypedJson.java:323)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeVal(TypedJson.java:314)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeKeyValue(TypedJson.java:357)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.visitChildrens(TypedJson.java:670)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.addVal(TypedJson.java:323)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeVal(TypedJson.java:314)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeKeyValue(TypedJson.java:357)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.visitSpecialObjects(TypedJson.java:517)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeKeyValue(TypedJson.java:353)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.visitChildrens(TypedJson.java:670)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.addVal(TypedJson.java:323)
> at 
> com.gemstone.gemfire.management.internal.cli.json.TypedJson.writeVal(TypedJson.java:314)
> {noformat}
> QueryDataFunction uses TypedJson to serialize query results into JSON to 
> return to GFSH or Pulse. Rather than maintain a broken custom JSON parser, we 
> should replace TypedJson with Jackson.
> This example will go into infinite recursion until it produces a 
> StackOverflowError:
> {noformat}
> public class Root {
>   public Root getRoot() {
>     return this;
>   }
>   public Child getChild() { // getter that returns unique instances
>     return new Child();
>   }
> }
> public class Child {
>   public Child getChild() {
>     return this;
>   }
> }
> {noformat}
> This example will go into an infinite loop until it produces OutOfMemoryError:
> {noformat}
> public class Replicator {
>   public Replicator getReplicator() { // getter that returns unique instances
>     return new Replicator();
>   }
> }
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to