From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ar.aichi-u.ac.jp ([202.250.160.40]) by ttr; Sat Aug 9 02:05:59 EDT 2014 Received: from [192.168.1.110] ([125.193.25.135]) by ar; Sat Aug 9 15:05:49 JST 2014 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [9front] stats(1) suicide From: arisawa In-Reply-To: <2ab318cd6a5d404f651e57691a1ac5ad@felloff.net> Date: Sat, 9 Aug 2014 15:05:49 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: <7DA01EF3-861B-4638-B9E7-A03D7933956D@ar.aichi-u.ac.jp> List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: strategy wrapper general-purpose database-aware control References: <2ab318cd6a5d404f651e57691a1ac5ad@felloff.net> To: 9front@9front.org X-Mailer: Apple Mail (2.1878.6) Hello cinap, the experiment below is on my 9front terminal that is executed from 9front boot loader boot from tcp which means the kernel is not pxe booted from the file server but = locally=20 loaded from 9fat partition. the kernel makes cwfs64x cuicide. on the other hands, the commands are of file servers. I recompiled cwfs64x term% ls -l /amd64/bin/cwfs64x --rwxrwxr-x M 20 arisawa sys 415466 Aug 9 13:27 /amd64/bin/cwfs64x term%=20 term% cwfs64x -f /dev/sdE0/fscache cwfs64x 730: suicide: invalid address 0x199ab0e40/16384 in sys call = pc=3D0x22ac64 cwfs64x 730: suicide: sys: bad address in syscall pc=3D0x22ac64 term%=20 as you see from the acid output, pread() makes trouble complaining the read buffer 0x199ab0e40 is invalid. the value is as much as 6.8G. (I have 16GB ram on the terminal) Please examine pread() syscall. Kenji Arisawa term% broke echo kill>/proc/730/ctl # cwfs64x term% acid 730 /proc/730/text:amd64 plan 9 executable /sys/lib/acid/port /sys/lib/acid/amd64 acid: lstk() pread(a0=3D0x4)+0xe /sys/src/libc/9syscall/pread.s:6 wrenread(b=3D0x0,d=3D0xb2b29100,c=3D0x199ab0e40)+0xaa = /sys/src/cmd/cwfs/wren.c:95 r=3D0x22261d00000000 dr=3D0xb2b29170 devread(c=3D0x199ab0e40,b=3D0x0)+0x84 /sys/src/cmd/cwfs/sub.c:989 e=3D0x219bbd00000000 getbuf(d=3D0xb2b29100,addr=3D0x0,flag=3D0x5)+0x251 = /sys/src/cmd/cwfs/iobuf.c:106 hp=3D0x12f4038 p=3D0x364e3f0 sysinit()+0x642 /sys/src/cmd/cwfs/config.c:571 cp=3D0x1b2b28e40 d=3D0xb2b29100 p=3D0x21eb5d fsp=3D0x300000000 ep=3D0x22ad70 fs=3D0x138885477e301960 error=3D0x21dd510006bcad main(argc=3D0x0,argv=3D0x7ffffeffef88)+0x247 = /sys/src/cmd/cwfs/main.c:342 nets=3D0x9c3f00000000 _args=3D0x40df7c _argc=3D0x66 ann=3D0x0 i=3D0x225add00009c3f _main+0x40 /sys/src/libc/amd64/main9.s:15 acid:=20 term% dd -if /dev/sdE0/fscache -count 1 >[2]/dev/null | tr -d '\000' service cwfs filsys main c(/dev/sdE0/fscache)(/dev/sdE0/fsworm) filsys other (/dev/sdE0/other) filsys dump o noauth blocksize 16384 daddrbits 64 indirblks 4 dirblks 6 namelen 144 term%=20 maia%=20 2014/08/09 7:57=E3=80=81cinap_lenrek@felloff.net =E3=81=AE=E3=83=A1=E3=83=BC= =E3=83=AB=EF=BC=9A > kenji, >=20 > the note bug should not apply to release = 9front-3730.5d864bfef728.iso.bz2, > as it was introduced in a later commit. also, cwfs doesnt install any = note > handlers so it cant be affected. >=20 >> cwfs64x 319: suicide: invalid address 0x1056efee8/16384 in syscall = pc=3D0x22ac56 >> cwfs64x 319: suicide: sys: bad address in syscall pc=3D0x22ac56 >=20 > i looked up the pc addresses and it tells me this is the sleep = syscall. this > is very odd. sl and others run cwfs64x just fine on the latest pc64 = and i'v > not seen such an issue yet. >=20 > can you verify by running: >=20 > acid /amd64/bin/cwfs64x > src(0x22ac56) > asm(sleep) >=20 > the last line will will disassemble the sleep syscall stub, and should > result in something like: >=20 > acid: asm(sleep) > sleep 0x000000000022ac53 MOVQ BP,a0+0x0(FP) > sleep+0x5 0x000000000022ac58 MOVQ $0x11,BP > sleep+0xc 0x000000000022ac5f SYSCALL > sleep+0xe 0x000000000022ac61 RET >=20 > -- > cinap