baidu / lac

百度NLP:分词,词性标注,命名实体识别,词重要性
Apache License 2.0
3.88k stars 598 forks source link

valgrind检测到paddle预测库内存泄漏 #126

Open wangzhenxing1985 opened 4 years ago

wangzhenxing1985 commented 4 years ago

多线程运行后发现内存泄漏,程序可以肯定的是已经delete掉LAC对象了,是我的用法有问题么? at 0x4C2A1E3: operator new(unsigned long) (vg_replace_malloc.c:334) ==2286== by 0x124DE9BD: paddle::framework::details::OpInfoFiller<paddle::operators::GenerateProposalLabelsOpMaker, (paddle::framework::details::OpInfoFillType)1>::o perator()(char const, paddle::framework::OpInfo) const (in /mnt/sdd/wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so) ==2286== by 0x124DF2D8: paddle::framework::OperatorRegistrar<paddle::operators::GenerateProposalLabelsOp, paddle::operators::GenerateProposalLabelsOpMaker, paddle:: framework::EmptyGradOpMaker, paddle::framework::EmptyGradOpMaker >::OperatorRegistrar(char const*) (in /mnt/sdd/ wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so)

moberq commented 4 years ago

多线程运行后发现内存泄漏,程序可以肯定的是已经delete掉LAC对象了,是我的用法有问题么? at 0x4C2A1E3: operator new(unsigned long) (vg_replace_malloc.c:334) ==2286== by 0x124DE9BD: paddle::framework::details::OpInfoFiller<paddle::operators::GenerateProposalLabelsOpMaker, (paddle::framework::details::OpInfoFillType)1>::o perator()(char const, paddle::framework::OpInfo) const (in /mnt/sdd/wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so) ==2286== by 0x124DF2D8: paddle::framework::OperatorRegistrar<paddle::operators::GenerateProposalLabelsOp, paddle::operators::GenerateProposalLabelsOpMaker, paddle:: framework::EmptyGradOpMakerpaddle::framework::OpDesc, paddle::framework::EmptyGradOpMakerpaddle::imperative::OpBase >::OperatorRegistrar(char const*) (in /mnt/sdd/ wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so)

印象里,这个好像是PaddlePaddle库的问题。据那边同学的反馈是valgrind在paddle上的测试结果不准确,建议通过压测来看看实际内存是不是稳定。

wangzhenxing1985 commented 4 years ago

多线程运行后发现内存泄漏,程序可以肯定的是已经delete掉LAC对象了,是我的用法有问题么? at 0x4C2A1E3: operator new(unsigned long) (vg_replace_malloc.c:334) ==2286== by 0x124DE9BD: paddle::framework::details::OpInfoFiller<paddle::operators::GenerateProposalLabelsOpMaker, (paddle::framework::details::OpInfoFillType)1>::o perator()(char const, paddle::framework::OpInfo) const (in /mnt/sdd/wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so) ==2286== by 0x124DF2D8: paddle::framework::OperatorRegistrar<paddle::operators::GenerateProposalLabelsOp, paddle::operators::GenerateProposalLabelsOpMaker, paddle:: framework::EmptyGradOpMakerpaddle::framework::OpDesc, paddle::framework::EmptyGradOpMakerpaddle::imperative::OpBase >::OperatorRegistrar(char const*) (in /mnt/sdd/ wzx/dynamicwfst_hisf/lib/libpaddle_fluid.so)

印象里,这个好像是PaddlePaddle库的问题。据那边同学的反馈是valgrind在paddle上的测试结果不准确,建议通过压测来看看实际内存是不是稳定。

多谢,我试下