yanyiwu / gojieba

"结巴"中文分词的Golang版本
MIT License
2.4k stars 302 forks source link

定时创建索引的时候出现cgo异常 #38

Open liaokylin opened 6 years ago

liaokylin commented 6 years ago

你好,我构建索引的时候会出现异常,这个异常时间歇性的,下面是错误信息 terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc SIGABRT: abort PC=0x7f905a6be495 m=7 sigcode=18446744073709551610 signal arrived during cgo execution

请问这是什么原因呢

liaokylin commented 6 years ago

runtime.cgocall(0xb756a0, 0xc420c4f758, 0xc420c4f760) /usr/local/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420c4f728 sp=0xc420c4f6e8 pc=0x40b204 github.com/yanyiwu/gojieba._Cfunc_NewJieba(0x7f9044000b40, 0x7f9044000b80, 0x7f9044000bc0, 0x7f9044000c00, 0x7f9044000c40, 0x0) github.com/yanyiwu/gojieba/_obj/_cgo_gotypes.go:214 +0x4e fp=0xc420c4f758 sp=0xc420c4f728 pc=0xb2a74e github.com/yanyiwu/gojieba.NewJieba(0xc420c4f888, 0x5, 0x5, 0x0) /root/project/src/github.com/yanyiwu/gojieba/jieba.go:37 +0x268 fp=0xc420c4f858 sp=0xc420c4f758 pc=0xb2ad38 github.com/yanyiwu/gojieba/bleve.NewJiebaTokenizer(0xc421028080, 0x33, 0xc4210280c0, 0x32, 0xc421028100, 0x32, 0xc4201f37a0, 0x2c, 0xc421028140, 0x33, ...) /root/project/src/github.com/yanyiwu/gojieba/bleve/tokenizer.go:16 +0xf0 fp=0xc420c4f8e8 sp=0xc420c4f858 pc=0xb2d320 github.com/yanyiwu/gojieba/bleve.tokenizerConstructor(0xc4211bbe90, 0xc420d440f0, 0xd4a628, 0x7, 0xc4202d7750, 0xd00d01) /root/project/src/github.com/yanyiwu/gojieba/bleve/tokenizer.go:63 +0x325 fp=0xc420c4f998 sp=0xc420c4f8e8 pc=0xb2dac5 github.com/blevesearch/bleve/registry.TokenizerBuild(0xd4a628, 0x7, 0xc4211bbe90, 0xc420d440f0, 0x154eb80, 0x0, 0x1000b01211bbe30, 0x0) /root/project/src/github.com/blevesearch/bleve/registry/tokenizer.go:49 +0x87 fp=0xc420c4fa10 sp=0xc420c4f998 pc=0x97e297 github.com/blevesearch/bleve/registry.(ConcurrentCache).DefineItem(0xc4201c08a0, 0xd4a628, 0x7, 0xd4a628, 0x7, 0xc4211bbe90, 0xc420d440f0, 0xd8e6f0, 0x0, 0x0, ...) /root/project/src/github.com/blevesearch/bleve/registry/cache.go:73 +0xeb fp=0xc420c4fa70 sp=0xc420c4fa10 pc=0x978e7b github.com/blevesearch/bleve/registry.(TokenizerCache).DefineTokenizer(0xc421482018, 0xd4a628, 0x7, 0xd4a628, 0x7, 0xc4211bbe90, 0xc420d440f0, 0xc420c4fb00, 0x4000041ab00, 0x8, ...) /root/project/src/github.com/blevesearch/bleve/registry/tokenizer.go:65 +0x9d fp=0xc420c4fb10 sp=0xc420c4fa70 pc=0x97e60d github.com/blevesearch/bleve/registry.(Cache).DefineTokenizer(0xc420d440f0, 0xd4a628, 0x7, 0xc4211bbe90, 0xc145a0, 0x1, 0xc4202bc240, 0xc4211bbea0) /root/project/src/github.com/blevesearch/bleve/registry/registry.go:99 +0x1c1 fp=0xc420c4fbb8 sp=0xc420c4fb10 pc=0x97c521 github.com/blevesearch/bleve/mapping.(IndexMappingImpl).AddCustomTokenizer(0xc421484400, 0xd4a628, 0x7, 0xc4211bbe90, 0xc4202bc318, 0xc421028140)

github-actions[bot] commented 1 week ago

This issue has not been updated for over 5 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.