From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from ar.aichi-u.ac.jp ([202.250.160.40]) by ttr; Fri Aug 8 03:46:05 EDT 2014 Received: from [192.168.1.110] ([125.193.25.135]) by ar; Fri Aug 8 16:45:55 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: Date: Fri, 8 Aug 2014 16:45:53 +0900 Content-Transfer-Encoding: quoted-printable Message-Id: List-ID: <9front.9front.org> X-Glyph: ➈ X-Bullshit: managed API firewall WEB2.0 high-performance-aware lifecycle backend References: To: 9front@9front.org X-Mailer: Apple Mail (2.1878.6) Hello, I have similar problem with cwfs64x on pc64. the system is based on the latest release: 9front-3730.5d864bfef728.iso.bz2 I did rm -rf /sys/src/* and copied the iso to the /sys/src and cd /sys/src && mk install cd /sys/src/9/pc64 mk 9fat: cp 9pc64 /n/9fat fshalt -r bootargs is ..... user[glenda]: arisawa cwfs64x 319: suicide: invalid address 0x1056efee8/16384 in syscall = pc=3D0x22ac56 cwfs64x 319: suicide: sys: bad address in syscall pc=3D0x22ac56 ... 9pc64 kernel below works. --rwxrwxr-x M 20 arisawa sys 3502641 May 28 22:11 /amd64/9pc64 official cwfs source codes are not modified since that day. note that cwfs64x for 386 works fine your patch > ((void**)&ureg)[-1] =3D (void*)noteret; /* restores BP */ did not help me 2014/08/07 20:56=E3=80=81cinap_lenrek@felloff.net =E3=81=AE=E3=83=A1=E3=83= =BC=E3=83=AB=EF=BC=9A > thanks! i know whats wrong. >=20 > network timeout (alarm note) is the trigger. the bug was introduced = in: >=20 > = http://code.google.com/p/plan9front/source/detail?r=3Da2985da84dc3e147251c= 75c5839d1d074b1e7506&path=3D/sys/src/9/pc64/l.s >=20 > the problem is that forkret() in l.s doesnt restore BP register from > the ureg (anymore!). the first argument to a function is passed in BP > (also known as RARG). as its not loaded from the ureg, the first = argument > to the note handler is garbage. which causes the crash. most note = handlers > ignore the ureg argument (so it works all fine with other programs), = but > not with this alarm note handler which tries todo a stack unwind with = the > note jump. >=20 > i'm at work and have no access to amd64 machine right now so i cant > test anything, but you can probably fix it with a single line in > pc64/trap.c, function syscall(): >=20 >=20 > if(scallnr!=3DRFORK && (up->procctl || up->nnote)){ > splhi(); > notify(ureg); > + ((void**)&ureg)[-1] =3D (void*)noteret; = /* restores BP */ > } >=20 > -- > cinap