From: Pavel Zholkover <paulzhol@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] plan9 go output faults on 9vx but ok on cpu
Date: Sat, 15 Jan 2011 11:47:27 +0200 [thread overview]
Message-ID: <AANLkTinj3KFVA5+En7K7ZGbFCzmmvcU7CPeBofARFJKf@mail.gmail.com> (raw)
In-Reply-To: <20110115020059.GB20238@dinah>
On Sat, Jan 15, 2011 at 4:00 AM, Anthony Martin <ality@pbrane.org> wrote:
> Pavel Zholkover <paulzhol@gmail.com> once said:
>> I have no idea what is causing it to die, I've tried adding a bunch of
>> INT $3 to see how far in the flow I can get, but all I get this:
>>
>> 9vx panic: unknown trap/intr: 0x203
>> aborting, to dump core.
>>
>> for an INT $3 just before
>> CALL SI // fn()
>
> This happens because the linker outputs the two bytes
> { 0xCD, 0x03 } for an INT $3 instruction but libvx32
> only sends a VXTRAP_BREAKPOINT to 9vx if it sees an
> INT3 instruction (a single 0xCC byte). Try using a
> 'BYTE $0xCC' instead.
>
> Anthony
Thanks, that did the trick.
This is what I get when running goroutines on 9vx with a 0xCC
breakpoint compiled in:
% goroutines
goroutines 69: suicide: sys: breakpoint pc=0x00009e44
id: 1 0
id: 1 1
id: 1 2
id: 1 3
id: 1 4
id: 1 5
id: 1 6
id: 1 7
id: 1 8
id: 1 9
% acid 69
/proc/69/text:386 plan 9 executable
/sys/lib/acid/port
/sys/lib/acid/386
no symbol information
acid: regs()
PC 0x00009e44 0x9e44 ?file?:0
SP 0x000560e0 ECODE 0x00000000 EFLAG 0x00000000
CS 0x00000000 DS 0x00000000 SS 0x00000000
GS 0x00000000 FS 0x00000000 ES 0x00000000
TRAP 0x00000003 breakpoint
AX 0x0004c0c0 BX 0x0004c0c0 CX 0x0fffffc8 DX 0x00054100
DI 0x00056100 SI 0x000072f8 BP 0x00000000
acid: asm(*PC-32)
0x9e24 0x00009e24 ADDL $0x1ed2c,AX
0x9e29 0x00009e29 MOVL DX,0xfffffff8(AX)
0x9e2c 0x00009e2c MOVL BX,0xfffffffc(AX)
0x9e2f 0x00009e2f MOVL 0x1ed2c,AX
0x9e35 0x00009e35 MOVL 0x30(AX),AX
0x9e38 0x00009e38 MOVL AX,0x24(BX)
0x9e3b 0x00009e3b CALL 0x1c10
0x9e40 0x00009e40 MOVL 0x0(DX),DX
0x9e42 0x00009e42 MOVL 0x0(BX),BX
0x9e44 0x00009e44 INT 3 <=== we stopped here,
runtime.rfork() in src/pkg/runtime/plan9/sys.s
0x9e45 0x00009e45 CALL* SI
0x9e47 0x00009e47 CALL 0x9eac
0x9e4c 0x00009e4c RET
0x72f8 is runtime.mstart as it should...
acid: asm(*SI)
0x72f8 0x000072f8 MOVL 0x1ed2c,CX
0x72fe 0x000072fe MOVL 0xfffffff8(CX),CX
0x7301 0x00007301 CMPL 0x0(CX),SP
0x7303 0x00007303 JHI 0x730e
0x7305 0x00007305 XORL DX,DX
0x7307 0x00007307 XORL AX,AX
0x7309 0x00007309 CALL 0x1a75
0x730e 0x0000730e SUBL $0x8,SP
0x7311 0x00007311 MOVL 0x1ed2c,AX
0x7317 0x00007317 MOVL 0xfffffff8(AX),AX
0x731a 0x0000731a MOVL 0x1ed2c,CX
0x7320 0x00007320 MOVL 0xfffffffc(CX),CX
0x7323 0x00007323 MOVL 0x0(CX),CX
0x7325 0x00007325 CMPL CX,AX
0x7327 0x00007327 JEQ 0x7336
0x7329 0x00007329 MOVL $0x1eb80,AX
0x732e 0x0000732e MOVL AX,0x0(SP)
0x7331 0x00007331 CALL 0x81ee
0x7336 0x00007336 MOVL 0x1ed2c,AX
0x733c 0x0000733c MOVL 0xfffffffc(AX),AX
0x733f 0x0000733f MOVL 0x94(AX),AX
0x7345 0x00007345 CMPL AX,$0x0
0x7348 0x00007348 JNE 0x735e
0x734a 0x0000734a CALL 0x2d75
0x734f 0x0000734f MOVL 0x1ed2c,CX
0x7355 0x00007355 MOVL 0xfffffffc(CX),CX
0x7358 0x00007358 MOVL AX,0x94(CX)
0x735e 0x0000735e CALL 0x9e4d
0x7363 0x00007363 CALL 0x74c3
0x7368 0x00007368 ADDL $0x8,SP
I can't tell from this why 9vx is dying on me and I don't know how to
use acid to debug a child process after rfork,
is there something like gdb's set follow-fork-mode child ?
Pavel
next prev parent reply other threads:[~2011-01-15 9:47 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 7:54 Skip Tavakkolian
2011-01-11 14:11 ` erik quanstrom
2011-01-11 15:06 ` Devon H. O'Dell
2011-01-11 17:03 ` Charles Forsyth
2011-01-11 17:51 ` ron minnich
2011-01-11 19:35 ` Pavel Zholkover
2011-01-11 23:58 ` Charles Forsyth
2011-01-11 16:25 ` ron minnich
2011-01-12 8:32 ` Skip Tavakkolian
2011-01-12 16:12 ` andrey mirtchovski
2011-01-12 22:03 ` ron minnich
2011-01-13 5:54 ` ron minnich
2011-01-14 17:32 ` Pavel Zholkover
2011-01-15 2:00 ` Anthony Martin
2011-01-15 9:47 ` Pavel Zholkover [this message]
2011-01-15 9:01 ` kokamoto
2011-01-15 9:19 ` Pavel Zholkover
2011-01-15 9:30 ` lucio
2011-01-15 9:58 ` Pavel Zholkover
2011-01-15 10:29 ` lucio
2011-01-15 10:40 ` lucio
2011-01-15 11:25 ` Pavel Zholkover
2011-01-16 1:51 ` kokamoto
2011-01-16 2:04 ` kokamoto
2011-01-16 6:21 ` kokamoto
2011-01-17 12:03 ` kokamoto
2011-01-17 15:20 ` [9fans] how to make hardware work? sergey.kish
2011-01-16 2:06 ` [9fans] plan9 go output faults on 9vx but ok on cpu Skip Tavakkolian
2011-01-11 17:03 ` Pavel Zholkover
2011-01-11 18:55 ` Anthony Martin
2011-01-11 19:06 ` Anthony Martin
2011-01-11 22:58 ` ron minnich
2011-01-12 22:31 ` Anthony Martin
2011-01-12 22:36 ` erik quanstrom
2011-01-12 23:28 ` Pavel Zholkover
2011-01-12 23:29 ` Charles Forsyth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTinj3KFVA5+En7K7ZGbFCzmmvcU7CPeBofARFJKf@mail.gmail.com \
--to=paulzhol@gmail.com \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).