process hanging in embeded mode on exception
还没有人认领这个 Issue。
评估
调研方向
首先,在 manual-gil 下使用 crash.clj、ffi/lock-gil、py/import-module 和 clojurebridge.load_clojure_file 重现挂起问题。跟踪缺失模块引发的异常如何在 clojurebridge 和 libpython-clj 之间处理;当嵌入式进程不再挂起,而是终止或返回,并且异常仍然可见时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
As a FUP of #221 which provided a new pathway to see the exception,
but does not prevent the "hanging" in an other pathway.
The simplest scenario is that we have a hanging python process by using this clojure code crash.clj
(ns train
(:require [libpython-clj2.python :refer [py.- py.] :as py]
[libpython-clj2.python.ffi :as ffi]))
(def locked (ffi/lock-gil))
(py/import-module "not existing")
and load it in embedded mode using manual-gil via:
export JDK_JAVA_OPTIONS="-Dlibpython_clj.manual_gil=true"
python -c 'from clojurebridge import cljbridge;cljbridge.load_clojure_file(clj_file="crash.clj")'
The exception thrown by python on the last line in crash.clj is swallowed by either clojurebridge or libpython-clj and the process hangs forever.
- 主要语言
- Clojure
- 星标
- 1.2k
- 派生
- 74
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
clj-python/libpython-clj 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 48/100
clj-python/libpython-clj#280 ·
-
难度 4/5 3-5 天 新手友好度 38/100
clj-python/libpython-clj#275 · 5 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 58/100
clj-python/libpython-clj#273 ·
-
难度 4/5 3-5 天 新手友好度 25/100
clj-python/libpython-clj#271 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 35/100
clj-python/libpython-clj#270 · 1 条评论 ·
查看 clj-python/libpython-clj 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 1/5 1 小时以内 新手友好度 88/100
-
.Team/Metabot Priority:P3
难度 2/5 1-3 小时 新手友好度 72/100
-
needs triage
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 78/100
scalar-labs/scalar-jepsen#222 · 1 条评论 ·