Launchpad has imported 7 comments from the remote bug at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60931.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2014-04-23T07:06:09+00:00 Anton Blanchard wrote:

Created attachment 32659
Bump page size to 64kB

We are seeing random failures with go programs on a 64kB page size ppc64
box. It looks like garbage collection issues - sometimes we SEGV in
timer code, sometimes we SEGV in the code that wraps a kernel read
syscall. If I prevent the garbage collector from running, the programs
work.

The libgo malloc hard codes the page size so I wrote a quick hack to
bump this (and a few other dependent variables). This makes the problem
go away, but we will need to come up with a better way to do this at
runtime.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/15

------------------------------------------------------------------------
On 2014-04-23T07:11:55+00:00 Pinskia wrote:

This is going to be true on AARCH64 also where most distros are going to
be using 64k pages (some might use 4k pages if they also support
AARCH32).  MIPS has many different page sizes too (4k, 8k, 16k, 32k, and
64k).  So hard coding the page size seems wrong, maybe you should call
getpagesize instead.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/17

------------------------------------------------------------------------
On 2014-04-23T07:26:53+00:00 Anton Blanchard wrote:

I agree, but when I tried this I found a few places that expect PageSize
to be a compile time constant so it is not as trivial as I had hoped.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/18

------------------------------------------------------------------------
On 2014-04-23T16:42:11+00:00 Ian Lance Taylor wrote:

It would be extremely helpful if you could find a test case that can
recreate this problem with some reliability.  There is no obvious
dependency on the system page size in libgo.  The PageSize constant is
the unit that the memory allocator deals in, and should have no direct
relationship to the system page size.  I believe that there is a bug,
but we need to track it down.

If you set the environment variable GOGC=1 the garbage collector will
run much more frequently; perhaps that will help get a reproducible test
case.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/19

------------------------------------------------------------------------
On 2014-04-24T00:17:06+00:00 Anton Blanchard wrote:

Created attachment 32669
Don't use madvise(DONT_NEED) on sub pages

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/20

------------------------------------------------------------------------
On 2014-04-24T00:18:11+00:00 Anton Blanchard wrote:

I think I see it:

19112 madvise(0xc211030000, 4096, MADV_DONTNEED) = 0

That 4kB madvise(MADV_DONTNEED) gets rounded up to the system page size
of 64kB and we end up covering still in use memory.

The following patch fixes it for me, but it just ignores any sub pages.
We should keep them around so later calls have a chance at consolidating
regions up to a system page size.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/21

------------------------------------------------------------------------
On 2014-04-24T05:38:26+00:00 Jakub-gcc wrote:

Perhaps it would be better instead of not doing the madvise at all if
start or length isn't page aligned round the start to the next page
boundary and end to the previous page boundary and madvise if the
rounded end is above the rounded start.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gccgo-4.9/+bug/1304754/comments/22


** Changed in: gcc
       Status: Unknown => New

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1304754

Title:
  gccgo on ppc64el using split stacks when not supported

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1304754/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to