首页 Paddle框架 帖子详情
Paddle1.6与Multiprocessing冲突
收藏
快速回复
Paddle框架 问答深度学习 988 3
Paddle1.6与Multiprocessing冲突
收藏
快速回复
Paddle框架 问答深度学习 988 3

运行环境: cuda9.0 cudnn7.3 linux
测试代码:

import paddle as p
import paddle.fluid as f

import multiprocessing as mp


def func(a):
    print('helloworld')
    return a + 1

print(p.__version__)
pool = mp.Pool(3)
pool.map(func, [1,2,3])
pool.terminate()

使用PaddlePaddle1.5运行输出:

1.5.2
helloworld
helloworld
helloworld

使用PaddlePaddle1.6运行输出:

1.6.0
helloworld
helloworld
helloworld
W1029 11:58:31.022197 48625 init.cc:212] *** Aborted at 1572321511 (unix time) try "date -d @1572321511" if you are using GNU date ***
W1029 11:58:31.022197 48624 init.cc:212] *** Aborted at 1572321511 (unix time) try "date -d @1572321511" if you are using GNU date ***
W1029 11:58:31.023936 48625 init.cc:212] PC: @                0x0 (unknown)
W1029 11:58:31.023952 48624 init.cc:212] PC: @                0x0 (unknown)
W1029 11:58:31.024592 48625 init.cc:212] *** SIGTERM (@0x1f40000b7a7) received by PID 48625 (TID 0x7f80151cd700) from PID 47015; stack trace: ***
W1029 11:58:31.024598 48624 init.cc:212] *** SIGTERM (@0x1f40000b7a7) received by PID 48624 (TID 0x7f80151cd700) from PID 47015; stack trace: ***
W1029 11:58:31.025892 48625 init.cc:212]     @     0x7f8014da4160 (unknown)
W1029 11:58:31.025919 48624 init.cc:212]     @     0x7f8014da4160 (unknown)
W1029 11:58:31.027094 48625 init.cc:212]     @     0x7f8014fbfb7a _dl_fixup
W1029 11:58:31.027129 48624 init.cc:212]     @     0x7f8014fbfc70 _dl_fixup
W1029 11:58:31.028278 48625 init.cc:212]     @     0x7f8014fc6105 _dl_runtime_resolve
W1029 11:58:31.028327 48624 init.cc:212]     @     0x7f8014fc6105 _dl_runtime_resolve
W1029 11:58:31.028442 48625 init.cc:212]     @           0x586e7f os__exit
W1029 11:58:31.028475 48624 init.cc:212]     @           0x586e7f os__exit
W1029 11:58:31.028676 48625 init.cc:212]     @           0x4ab673 _PyCFunction_FastCallKeywords
W1029 11:58:31.028695 48624 init.cc:212]     @           0x4ab673 _PyCFunction_FastCallKeywords
W1029 11:58:31.028724 48625 init.cc:212]     @           0x542e84 call_function
W1029 11:58:31.028745 48624 init.cc:212]     @           0x542e84 call_function
W1029 11:58:31.028944 48625 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.028961 48624 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.028991 48625 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.029008 48624 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.029037 48625 init.cc:212]     @           0x542fc7 call_function
W1029 11:58:31.029055 48624 init.cc:212]     @           0x542fc7 call_function
W1029 11:58:31.029260 48625 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.029274 48624 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.029309 48625 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.029321 48624 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.029505 48625 init.cc:212]     @           0x54bd76 _PyFunction_FastCallDict
W1029 11:58:31.029515 48624 init.cc:212]     @           0x54bd76 _PyFunction_FastCallDict
W1029 11:58:31.029692 48625 init.cc:212]     @           0x45304f _PyObject_FastCallDict
W1029 11:58:31.029698 48624 init.cc:212]     @           0x45304f _PyObject_FastCallDict
W1029 11:58:31.029875 48625 init.cc:212]     @           0x45314b _PyObject_Call_Prepend
W1029 11:58:31.029881 48624 init.cc:212]     @           0x45314b _PyObject_Call_Prepend
W1029 11:58:31.030092 48625 init.cc:212]     @           0x452d20 PyObject_Call
W1029 11:58:31.030095 48624 init.cc:212]     @           0x452d20 PyObject_Call
W1029 11:58:31.030200 48625 init.cc:212]     @           0x4c972b slot_tp_init
W1029 11:58:31.030203 48624 init.cc:212]     @           0x4c972b slot_tp_init
W1029 11:58:31.030299 48625 init.cc:212]     @           0x4c0e8a type_call
W1029 11:58:31.030303 48624 init.cc:212]     @           0x4c0e8a type_call
W1029 11:58:31.030493 48625 init.cc:212]     @           0x452f02 _PyObject_FastCallDict
W1029 11:58:31.030495 48624 init.cc:212]     @           0x452f02 _PyObject_FastCallDict
W1029 11:58:31.030544 48625 init.cc:212]     @           0x542bf5 call_function
W1029 11:58:31.030545 48624 init.cc:212]     @           0x542bf5 call_function
W1029 11:58:31.030768 48625 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.030771 48624 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.030817 48625 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.030820 48624 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.030867 48625 init.cc:212]     @           0x542fc7 call_function
W1029 11:58:31.030869 48624 init.cc:212]     @           0x542fc7 call_function
W1029 11:58:31.031098 48625 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.031100 48624 init.cc:212]     @           0x547cdc _PyEval_EvalFrameDefault
W1029 11:58:31.031148 48625 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.031150 48624 init.cc:212]     @           0x541e31 _PyFunction_FastCall
W1029 11:58:31.031206 48625 init.cc:212]     @           0x542fc7 call_function
W1029 11:58:31.031206 48624 init.cc:212]     @           0x542fc7 call_function

请问后面这堆log是什么原因导致的,是不是发生了内存泄露?

0
收藏
回复
全部评论(3)
时间顺序
AIStudio792062
#2 回复于2019-10

当然,把import paddle相关代码去掉之后,是可以完美运行的

0
回复
AIStudio792063
#3 回复于2019-10

谢谢,问题已经复现,正在上报此Bug。

0
回复
aistudio_2
#7 回复于2021-05

mark

0
回复
需求/bug反馈?一键提issue告诉我们
发现bug?如果您知道修复办法,欢迎提pr直接参与建设飞桨~
在@后输入用户全名并按空格结束,可艾特全站任一用户