9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: paulzhol@gmail.com (Pavel Zholkover)
Subject: [9fans] Go Plan 9
Date: Mon,  4 Apr 2011 10:37:30 +0300	[thread overview]
Message-ID: <BANLkTi=8HYNLhAA8_-PDPBvkAJ-DWN+HWQ@mail.gmail.com> (raw)
In-Reply-To: <20110403223031.GA27441@dinah>

Thanks for the detailed explanation, I've added your patch to if that
is alright with you https://bitbucket.org/paulzhol/golang-plan9-
runtime-patches/

Pavel

On Mon, Apr 4, 2011 at 1:30 AM, Anthony Martin <ality at pbrane.org> wrote:
> Pavel Zholkover <paulzhol at gmail.com> once said:
>> I'm not sure I understand the reason 9vx will fail to reserve 768mb
>> with brk() while my Plan 9 install on kvm+qemu with 128mb or ram works
>> fine, as long as it is not written to.
>
> The reason is because 9vx gives user processes a virtual
> address space of only 256mb. ?The brk works but the
> first time we fault one of those pages past USTKTOP the
> program suicides.
>
> The first fault happens at src/pkg/runtime/mcache.c:21
> in the runtime?MCache_Alloc function.
>
> To show you what I mean, here's a formatted stack trace:
>
> term% cat y.go
> package main
>
> func main() {
> ? ? ? ?println("Hello, world.")
> }
>
> term% ./8.out
> 8.out 174: suicide: sys: trap: page fault pc=0x000021df
>
> term% db 8.out 174
> 386 binary
> page fault
> /go/src/pkg/runtime/mcache.c:21 runtime.MCache_Alloc+39/ ? ? ? ?MOVL ? ?0(AX),AX
> $c
> runtime.MCache_Alloc(sizeclass=0x1, c=0x30424000, size=0x8, zeroed=0x1)
> ? ? ? ?/go/src/pkg/runtime/mcache.c:13 called from runtime.mallocgc+db
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:62
> runtime.mallocgc(size=0x8, zeroed=0x1, flag=0x0, dogc=0x0)
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:40 called from runtime.malloc+41
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:115
> runtime.malloc(size=0x1)
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:113 called from runtime.mallocinit+e9
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:319
> runtime.mallocinit()
> ? ? ? ?/go/src/pkg/runtime/malloc.goc:237 called from runtime.schedinit+39
> ? ? ? ?/go/src/pkg/runtime/proc.c:122
> runtime.schedinit()
> ? ? ? ?/go/src/pkg/runtime/proc.c:113 called from _rt0_386+b3
> ? ? ? ?/go/src/pkg/runtime/386/asm.s:78
> _rt0_386()
> ? ? ? ?/go/src/pkg/runtime/386/asm.s:12 called from 1
>
>
> Cheers,
> ?Anthony
>
>



  reply	other threads:[~2011-04-04  7:37 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTik3gx8QK7O-+O=R8oFELTt6WgVHO3dJV51cZiPQ@mail.gmail.com>
2011-04-02 22:56 ` Pavel Zholkover
2011-04-02 23:00   ` andrey mirtchovski
2011-04-02 23:52     ` David Leimbach
2011-04-03  0:04       ` ron minnich
2011-04-03  0:04         ` ron minnich
2011-04-03  0:11           ` ron minnich
2011-04-03  0:16             ` andrey mirtchovski
2011-04-03  0:09       ` andrey mirtchovski
2011-04-03  7:57       ` Pavel Zholkover
2011-04-03  2:18   ` Skip Tavakkolian
2011-04-03  2:48     ` Rob Pike
2011-04-03  5:07       ` Lucio De Re
2011-04-03 18:50         ` Steve Simon
2011-04-03 20:57           ` Lucio De Re
2011-04-03  7:45       ` Pavel Zholkover
2011-04-03  7:51         ` andrey mirtchovski
2011-04-03  9:16       ` erik quanstrom
2011-04-03 21:13   ` Anthony Martin
2011-04-03 21:16     ` Anthony Martin
2011-04-03 21:23       ` Pavel Zholkover
2011-04-03 22:30         ` Anthony Martin
2011-04-04  7:37           ` Pavel Zholkover [this message]
2011-04-04 17:27             ` Lucio De Re
2011-04-04 19:18               ` Pavel Zholkover
2011-04-04 20:05                 ` Lucio De Re
2011-04-04 20:11               ` Lucio De Re
2011-04-04 20:33                 ` erik quanstrom
2011-04-05  4:52                   ` Lucio De Re
2011-04-04 23:10               ` ron minnich
2011-04-05  4:33                 ` Lucio De Re
2011-04-05  4:56                   ` erik quanstrom
2011-04-05  6:37                   ` Pavel Zholkover
2011-04-05 19:06                   ` Yaroslav
2011-04-05 20:14                     ` Paul Lalonde
2011-04-06 13:43                     ` Lucio De Re
2011-04-09 17:51                       ` Sergey Kish
2011-04-09 18:24                         ` Skip Tavakkolian
2011-04-09 18:34                         ` Pavel Zholkover
2011-04-03 21:24     ` erik quanstrom
2011-04-04 15:18       ` ron minnich
2011-04-04 15:59         ` erik quanstrom
2011-04-04 23:09           ` ron minnich
2011-04-04 23:17             ` erik quanstrom
2011-04-04 23:27               ` ron minnich
2011-04-05  4:00                 ` ron minnich
2011-04-05  4:22                   ` Russ Cox
2011-04-05  4:47                     ` Lucio De Re
2011-04-05  5:11                       ` Russ Cox
2011-04-05  5:44                         ` Lucio De Re
2011-04-05  5:53                           ` Russ Cox
2011-04-05 15:48                         ` ron minnich
2011-04-05 17:33                           ` ron minnich
2011-04-05 17:33                         ` David Leimbach
2011-04-05 17:32                     ` David Leimbach
2011-04-05 17:36                       ` erik quanstrom
2011-04-05 17:42                         ` David Leimbach
2011-04-05 17:43                       ` andrey mirtchovski
2011-04-05 17:48                         ` David Leimbach
2011-04-05 10:42     ` Anthony Martin
2011-04-03  9:40 Pavel Zholkover
2011-04-03 10:34 ` erik quanstrom
2011-04-03 14:42   ` Lucio De Re
2011-04-03 14:57   ` Lucio De Re
2011-04-03 15:43     ` erik quanstrom
2011-04-03 16:25       ` Skip Tavakkolian
2011-04-03 17:46         ` erik quanstrom
2011-04-06  7:27           ` Skip Tavakkolian
2011-04-03 17:43     ` Devon H. O'Dell
2011-04-03 17:58       ` Lucio De Re
2011-04-03 18:20         ` Rob Pike
2011-04-03 20:45           ` Lucio De Re
2011-04-03 16:49 Pavel Zholkover
2011-04-03 17:36 ` Lucio De Re
2011-04-04 19:19 Russ Cox
2011-04-05 19:15 Jason Catena
2011-04-06 13:27 Joel C. Salomon
2011-04-06 16:16 ` David Leimbach
2011-04-09 18:53 Pavel Zholkover
2011-04-09 19:04 ` Skip Tavakkolian
2011-04-09 22:01   ` Pavel Zholkover
2011-04-10  5:07     ` Lucio De Re
2011-04-10  6:28       ` Pavel Zholkover
2011-04-10  9:15         ` Lucio De Re

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='BANLkTi=8HYNLhAA8_-PDPBvkAJ-DWN+HWQ@mail.gmail.com' \
    --to=paulzhol@gmail.com \
    /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).