Bug #2417
closedi386-only failure involving nmalloc (ZALLOC_SLAB_MAGIC assert)
0%
Description
The yamcha tools build on both platforms. However, they only work on x86_64.
When the yamcha tool pkemine tries to generate a file for cabocha on i386, it core dumps:
#0 _slabfree (ptr=<optimized out>, flags=<optimized out>, rbigp=0x0)
at /usr/src/lib/libc/../libc/stdlib/nmalloc.c:1165
1165 MASSERT;
The 4-frame backtrace is here:
http://leaf.dragonflybsd.org/~marino/yamcha/gdb.txt
The i386 pkemine executable is here:
http://leaf.dragonflybsd.org/~marino/yamcha/pkemine
A packed coredump is here:
http://leaf.dragonflybsd.org/~marino/yamcha/pkemine.core.txz
The two platforms have different malloc implementations. Why is i386's implementation dumping why x86_64's is happy?
Updated by marino over 12 years ago
I forgot, here's the pkemine source file:
http://leaf.dragonflybsd.org/~marino/yamcha/pkemine.cpp
Updated by vsrinivas over 12 years ago
How do you run the pkemine tool such that it causes the assert to be hit?
Updated by marino over 12 years ago
Try building textproc/cabocha.
It uses the tools from textproc/yamcha during its build. The input files that cause the coredump are coming from that.
Updated by vsrinivas about 12 years ago
When I try to build textproc/cabocha, I get a build failure as follows:
/usr/pkg/libexec/yamcha/mkmodel -e CRL-IREX-ne.txtmodel CRL-IREX-ne.modelReading TEXT model: CRL-IREX-ne.txtmodel
..................................................................................
Writing BINARY model: CRL-IREX-ne.model
Making Double-Array: 100% |*******************************************|
Making TRIE : 100% |*******************************************|
Done!
rm -f CRL-IREX-ne.txtmodel
/usr/bin/gzcat IPA-chunker.txtmodel.gz | cat > IPA-chunker.txtmodel
/usr/pkg/libexec/yamcha/mkmodel -e IPA-chunker.txtmodel IPA-chunker.model
Reading TEXT model: IPA-chunker.txtmodel
........................
Writing BINARY model: IPA-chunker.model
Making Double-Array: 100% |*******************************************|
Use of uninitialized value $PKE::tsize in addition (+) at /usr/pkg/libexec/yamcha/PKE.pm line 160.
Use of uninitialized value $hlist4 in pack at /usr/pkg/libexec/yamcha/mkmodel line 182.
No such file or directory: IPA-chunker.model.trie
gmake2: * [IPA-chunker.model] Error 2
gmake2: Leaving directory `/usr/pkgsrc/textproc/cabocha/work/cabocha-0.53/model'
gmake1: [all-recursive] Error 1
gmake1: Leaving directory `/usr/pkgsrc/textproc/cabocha/work/cabocha-0.53'
gmake: ** [all] Error 2
- Error code 2
Can you give me example files or a command line for pkemine that cause it to crash?
Updated by marino about 12 years ago
No, I don't have a command example.
The error you posted is what I get. The missing *.trie file is caused by a pkemine segfault; the file is never created.
However, if one dissects the Makefile, one could determine what command and what input pkemine is being given. I haven't done it. I was hoping the core dump would be sufficient.
Updated by marino about 12 years ago
- Status changed from New to Closed
NOT-A-BUG
Two yamcha utilities had bugs in them:
pkemine (tried to free std:cin)
mktrie (tried to free a freed object, also char casting bug)
After fixing these bugs, textproc/cabocha builds fine with rebuild yamcha tools.
fixed in pkgsrc:
http://mail-index.netbsd.org/pkgsrc-changes/2012/10/03/msg079088.html