GraphScope icon indicating copy to clipboard operation
GraphScope copied to clipboard

[BUG] 调用 subgraph 接口 生成子图时 报错

Open fresher1chen opened this issue 3 years ago • 15 comments

Describe the bug 创建子图的时候,出现类型错误 To Reproduce Steps to reproduce the behavior:

  1. 载图数据大概 39G ,k8s_vineyard_memk8s_engine_mem 都为 50G,通过Python发起Gremlin查询 时配置的参数是 engine_params = 70000M 2.调用 graphscope.interactive.query.InteractiveQuery.subgraph 接口,执行 g.V().hasLabel('intopieces').has('commit_time',neq(0)).as('a').out().in().hasLabel('intopieces').as('b').where('a',gt('b')).by('commit_time').outE().limit(10) 语句
  2. 出现以下错误
I1110 16:35:55.000000    49 /home/graphscope/gs/analytical_engine/core/grape_instance.cc:111] Loading graph, graph name: graph_a5LnIMIQ, graph type: ArrowFragment, type sig: e33529e80839a2064a804ce453c761a9483aa7ab775bcfddc1a1f9da63dcb521
I1110 16:35:55.000000    48 /home/graphscope/gs/analytical_engine/core/grape_instance.cc:111] Loading graph, graph name: graph_a5LnIMIQ, graph type: ArrowFragment, type sig: e33529e80839a2064a804ce453c761a9483aa7ab775bcfddc1a1f9da63dcb521
2021-11-10 01:37:56,065 [ERROR][rpc:230]: Runstep failed with code: INTERACTIVE_ENGINE_INTERNAL_ERROR, message: Error occurred during preprocessing, The traceback is: Traceback (most recent call last):
  File "/home/graphscope/.local/lib/python3.6/site-packages/gscoordinator/coordinator.py", line 512, in RunStep
    request.session_id, dag_def, op_results
  File "/home/graphscope/.local/lib/python3.6/site-packages/gscoordinator/coordinator.py", line 436, in run_on_interactive_engine
    op_result = self._gremlin_to_subgraph(op)
  File "/home/graphscope/.local/lib/python3.6/site-packages/gscoordinator/coordinator.py", line 943, in _gremlin_to_subgraph
    subgraph_script, request_options=request_options
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/local/lib/python3.6/site-packages/gremlin_python/driver/resultset.py", line 90, in cb
    f.result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 425, in result
    return self.__get_result()
  File "/usr/lib64/python3.6/concurrent/futures/_base.py", line 384, in __get_result
    raise self._exception
  File "/usr/lib64/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/gremlin_python/driver/connection.py", line 83, in _receive
    status_code = self._protocol.data_received(data, self._results)
  File "/usr/local/lib/python3.6/site-packages/gremlin_python/driver/protocol.py", line 131, in data_received
    raise GremlinServerError(message['status'])
gremlin_python.driver.protocol.GremlinServerError: 597: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason
         ---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/tmp/ipykernel_147226/3904388044.py in <module>
      1 # new_g =interactive.subgraph("g.V().hasLabel('intopieces').has('commit_time',neq(0)).as('a').out().in().hasLabel('intopieces').as('b').where('a',gt('b')).by('commit_time').outE().limit(10)")
----> 2 new_g =interactive.subgraph("g.V().hasLabel('intopieces').has('commit_time',neq(0)).as('a').out().in().hasL abel('intopieces').as('b').where('a',gt('b')).by('commit_time').outE().limit(10)")
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/interactive/query.py in subgraph(self, gremlin_script, request_options)
    304                 "Interactive query is unavailable with %s status.", str(self._status)
    305             )
--> 306         return self._session._wrapper(
    307             self._interactive_query_node.subgraph(gremlin_script, request_options)
    308         )
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/client/session.py in _wrapper(self, dag_node)
    896     def _wrapper(self, dag_node):
    897         if self.eager():
--> 898             return self.run(dag_node)
    899         else:
    900             return dag_node
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/client/session.py in run(self, fetches, debug)
    925         fetch_handler = _FetchHandler(self.dag, fetches)
    926         try:
--> 927             response = self._grpc_client.run(fetch_handler.targets)
    928         except FatalError:
    929             self.close()
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/client/rpc.py in run(self, dag_def)
    151 
    152     def run(self, dag_def):
--> 153         return self._run_step_impl(dag_def)
    154 
    155     def fetch_logs(self):
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/client/rpc.py in with_grpc_catch(*args, **kwargs)
     46     def with_grpc_catch(*args, **kwargs):
     47         try:
---> 48             return fn(*args, **kwargs)
     49         except grpc.RpcError as exc:
     50             if grpc.StatusCode.INTERNAL == exc.code():
~/anaconda3/envs/gs/lib/python3.9/site-packages/graphscope/client/rpc.py in _run_step_impl(self, dag_def)
    234             )
    235             if response.full_exception:
--> 236                 raise pickle.loads(response.full_exception)
    237         return response
~/anaconda3/envs/gs/lib/python3.9/site-packages/gremlin_python/driver/protocol.py in __init__(self, status)
     37 class GremlinServerError(Exception):
     38     def __init__(self, status):
---> 39         super(GremlinServerError, self).__init__('{0}: {1}'.format(status['code'], status['message']))
     40         self._status_attributes = status['attributes']
     41         self.status_code = status['code']
TypeError: string indices must be integers

**Environment (please complete the following information):**
 - GraphScope version: 0.7.0
 - OS: Linux
 - Version :Ubuntu 16.04.3 LTS 
 - Kubernetes Version: 1.22

fresher1chen avatar Nov 10 '21 09:11 fresher1chen

Thanks for reporting! Could @longbinlai @shirly121 take some time to look at this issue? It seems the error that make sense is this one gremlin_python.driver.protocol.GremlinServerError: 597: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.RuntimeException: io.grpc.StatusRuntimeException: UNAVAILABLE: Network closed for unknown reason

siyuan0322 avatar Nov 10 '21 09:11 siyuan0322

Additional context: The sampled output of the gremlin query is 597D134C-66EF-4925-8D2B-83B00CE42836 :

siyuan0322 avatar Nov 10 '21 09:11 siyuan0322

您好,感谢使用GIE. 请问,单独执行(不调用subgraph): g.V().hasLabel('intopieces').has('commit_time',neq(0)).as('a').out().in().hasLabel('intopieces').as('b').where('a',gt('b')).by('commit_time').outE().limit(10) 会出问题吗?如果上述有问题的话,能否帮忙试试慢慢精简下gremlin语句,看具体到哪个地方出错。

longbinlai avatar Nov 17 '21 03:11 longbinlai

您好,感谢使用GIE. 请问,单独执行(不调用subgraph): g.V().hasLabel('intopieces').has('commit_time',neq(0)).as('a').out().in().hasLabel('intopieces').as('b').where('a',gt('b')).by('commit_time').outE().limit(10) 会出问题吗?

image 您好,可以正常执行。 请帮忙看下是什么原因导致的呢

fresher1chen avatar Nov 17 '21 08:11 fresher1chen

好的,已经联系 @lidongze0629 拿到数据和代码了,您的错误也已经复现,我们看一下哈。

longbinlai avatar Nov 18 '21 02:11 longbinlai

请问如何解决呢,跟您一样的错误,生成子图导致的

YijianLiu avatar Sep 13 '22 02:09 YijianLiu

请问如何解决呢,跟您一样的错误,生成子图导致的

Hi @YijianLiu 具体的图,查询语句,以及错误信息分别是什么呀?

sighingnow avatar Sep 13 '22 02:09 sighingnow

请问如何解决呢,跟您一样的错误,生成子图导致的

Hi @YijianLiu 具体的图,查询语句,以及错误信息分别是什么呀? 我在windows下的wsl,ubuntu跑tutorial1的时候报错, 命令如下: sub_graph = interactive.subgraph("g.V().has('year', inside(2014, 2020)).outE('cites')") 错误如下 >>> sub_graph = interactive.subgraph("g.V().has('year', inside(2014, 2020)).outE('cites')") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/interactive/query.py", line 266, in subgraph self._interactive_query_node.subgraph(gremlin_script, request_options) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/session.py", line 936, in _wrapper return self.run(dag_node) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/session.py", line 958, in run return self.run_fetches(fetches, debug) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/session.py", line 968, in run_fetches response = self._grpc_client.run(fetch_handler.targets) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/rpc.py", line 101, in run return self._run_step_impl(runstep_requests) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/utils.py", line 155, in with_grpc_catch return fn(*args, **kwargs) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/graphscope/client/rpc.py", line 193, in _run_step_impl raise pickle.loads(response.full_exception) File "/root/anaconda3/envs/graphscope/lib/python3.7/site-packages/gremlin_python/driver/protocol.py", line 36, in __init__ super(GremlinServerError, self).__init__('{0}: {1}'.format(status['code'], status['message'])) TypeError: string indices must be integers

YijianLiu avatar Sep 13 '22 02:09 YijianLiu

@sighingnow ,具体的图用的是graph = load_ogbn_mag(), 并且报错语句 sub_graph = interactive.subgraph("g.V().has('year', inside(2014, 2020)).outE('cites')") 第一次用的时候报错,然后如果再次尝试使用先陷入无尽等待中,我觉得是卡入什么循环中了

YijianLiu avatar Sep 13 '22 02:09 YijianLiu

@YijianLiu graphscope是最新版本么?v0.16.0?

sighingnow avatar Sep 13 '22 06:09 sighingnow

@YijianLiu graphscope是最新版本么?v0.16.0?

@sighingnow 是的v0.16.0,而且我在wsl,pip install graphscope的时候速度很慢,有没有什么源可以快一点的

YijianLiu avatar Sep 13 '22 07:09 YijianLiu

@YijianLiu graphscope是最新版本么?v0.16.0?

@sighingnow 是的v0.16.0,而且我在wsl,pip install graphscope的时候速度很慢,有没有什么源可以快一点的

源的问题可以参考:https://mirrors.tuna.tsinghua.edu.cn/help/pypi/

sighingnow avatar Sep 13 '22 07:09 sighingnow

而且我在wsl

WSL 1 or WSL 2?

sighingnow avatar Sep 13 '22 07:09 sighingnow

WSL2哈,装完graphscope以后,我还装了jdk才可以使用gremlin

YijianLiu avatar Sep 13 '22 07:09 YijianLiu

WSL2哈,装完graphscope以后,我还装了jdk才可以使用gremlin

钉钉沟通哈

sighingnow avatar Sep 13 '22 13:09 sighingnow

Close as resolved.

sighingnow avatar Jun 12 '23 08:06 sighingnow