Export to GitHub

plan9front - issue #231

acme free bug


Posted on Dec 11, 2014 by Grumpy Dog

227774.15 t->magic == FREE_MAGIC: assertion failed acme 227774: suicide: sys: trap: fault read addr=0x0 pc=0x0003cc62

/proc/227774/text:386 plan 9 executable /sys/lib/acid/port /sys/lib/acid/386 acid: abort()+0x0 /sys/src/libc/9sys/abort.c:6 _threadassert(s=0x4ae1f)+0x79 /sys/src/libthread/debug.c:50 buf=0x37373232 _assert(s=0x4ae1f)+0x17 /sys/src/libc/port/_assert.c:11 treesplay(size=0x2280,t=0xab400)+0xc4 /sys/src/libc/port/pool.c:255 N=0x3eec0 r=0x7acbc l=0x7acbc y=0x0 pooladd(anode=0xdb3a0,p=0x43880)+0x51 /sys/src/libc/port/pool.c:314 node=0xdb3a0 poolfreel(v=0xdb3a8,p=0x43880)+0xe0 /sys/src/libc/port/pool.c:1169 ab=0xdb3a0 poolfree(p=0x43880,v=0xdb3a8)+0x3b /sys/src/libc/port/pool.c:1281 free(v=0xdb3b0)+0x23 /sys/src/libc/port/malloc.c:250 xfidutfread(t=0x7d7ac,x=0x952d0,qid=0xa,q1=0x8589)+0xc5 /sys/src/cmd/acme/xfid.c:932 w=0x7d6b8 off=0x0 r=0xdb3b0 b=0x899d0 b1=0xa93d0 n=0x4000 boff=0x382a q=0x382a nr=0x806 nb=0x806 m=0x7d6 fc=0x5bc75 xfidread(x=0x952d0)+0x2e4 /sys/src/cmd/acme/xfid.c:369 q=0xa fc=0x2f8b1 w=0x7d6b8 off=0x0 buf=0x34b42 b=0x6 n=0x7d6b8 xfidctl(arg=0x952d0)+0x35 /sys/src/cmd/acme/xfid.c:52 x=0x952d0 launcher386(arg=0x952d0,f=0x206be)+0x10 /sys/src/libthread/386.c:10 0xfefefefe ?file?:0 acid: echo kill > /proc/227774/ctl

Comment #1

Posted on Dec 11, 2014 by Grumpy Dog

snap at http://9.offblast.org/stuff/acme.snap

Comment #2

Posted on Dec 11, 2014 by Happy Hippo

i think i found the cause. you'r using this with your 48k iounit changes no? acme used a fixed buffer allocation for the utf-8 conversion instead of allocating the requested byte count. this always worked with 8K iounit because BUFSIZE was 8*1024 + IOHDRSIZE. so the read size would always be smaller than BUFSIZE.

i commited the changes, so pull and retry. (the snap file was the key in this case)

Comment #3

Posted on Dec 28, 2014 by Grumpy Dog

(No comment was entered for this change.)

Status: Fixed

Labels:
Type-FrontFellOff Priority-Low