Details
Description
On both apache-tinkerpop-gremlin-console-3.4.2 and older version,when i try a extra-long requests,the client get NPE:java.lang.NullPointerException
gremlin> g = TinkerGraph.open().traversal() ==>graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] gremlin> g.addV("1") ==>v[0] gremlin>g.addV('role').property('name','xxx').property('merchantId',9999).property('creatorId',0).property('modifierId',0).property('createTime',0).property('updateTime',0).property('_classname','com.dding.platform.service.auth.entity.Role').addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV().addE('rolePermissionShip').to(V('1')).outV() java.lang.NullPointerException
However,the gremlin-server just throw: java.lang.StackOverflowError: null because of the thread's stack overflow。
The exception mismatch above is just because in the server side, StackOverflowError's getMessage() function will return null ,which cause ResponseMessage.ResponseStatus.message variable assigned to null.
But the gremlin-driver does not checking (key = serTokens.TOKEN_MESSAGE)'s value, so throw new exception when response deserialization, code snippet as follows:
// file: AbstractGraphSONMessageSerializerV2d0.java public final static class ResponseMessageDeserializer extends AbstractObjectDeserializer<ResponseMessage> { protected ResponseMessageDeserializer() { super(ResponseMessage.class); } @Override public ResponseMessage createObject(final Map<String, Object> data) { final Map<String, Object> status = (Map<String, Object>) data.get(SerTokens.TOKEN_STATUS); final Map<String, Object> result = (Map<String, Object>) data.get(SerTokens.TOKEN_RESULT); return ResponseMessage.build(UUID.fromString(data.get(SerTokens.TOKEN_REQUEST).toString())) .code(ResponseStatusCode.getFromValue((Integer) status.get(SerTokens.TOKEN_CODE))) .statusMessage(status.get(SerTokens.TOKEN_MESSAGE).toString()) .statusAttributes((Map<String, Object>) status.get(SerTokens.TOKEN_ATTRIBUTES)) .result(result.get(SerTokens.TOKEN_DATA)) .responseMetaData((Map<String, Object>) result.get(SerTokens.TOKEN_META)) .create(); } }
PR : https://github.com/apache/tinkerpop/pull/1127/files
Attachments
Attachments
Issue Links
- links to