Help needed with ppc64 zero

Chris Phillips @ T O ChrisPhi at LGonQn.Org
Thu Nov 21 02:59:07 PST 2013


Hi

On 21/11/13 05:35 AM, Dinar Valeev wrote:
> The error started to happen with update to 2.4.0, so it worked before.
>
> For ppc64 we set VMThreadStackSize to 1664
>
> On Thu, Nov 21, 2013 at 11:26 AM, Gary Benson <gbenson at redhat.com> wrote:
>> Dinar Valeev wrote:
>>> Hi, I'm looking a way to figure out why I have following errors in
>>> openSUSE for junit for example:
>>>
>>> [ 1932s] Exception in thread "process reaper" java.lang.StackOverflowError
>>> [ 1932s] at java.util.concurrent.SynchronousQueue$TransferStack.snode(SynchronousQueue.java:316)
>>> [ 1932s] at java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:358)
>>> [ 1932s] at java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:942)
>>> [ 1932s] at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
>>> [ 1932s] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
>>> [ 1932s] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>> [ 1932s] at java.lang.Thread.run(Thread.java:744)
>>>
>>> Some times this leads to build failure, some times it is not for other
>>> java package.
>> I ran into something similar a long time ago:
>>
>>    http://gbenson.net/?p=60
>>
>> Sadly I don't remember what my solution was.
>> Possibly I made the stack 16 times bigger :)
>>
>> Cheers,
>> Gary
>>
>> --
>> http://gbenson.net/
>

This is due to the following fix:


>       changeset: 4531:851f1e0cef3c
>       parent:      4523:dffc616548d2
>       user:        vladidan
>       date:        Tue Apr 30 17:36:01 2013 -0400
>       files:       src/os/linux/vm/os_linux.cpp
> src/os/linux/vm/os_linux.hpp
>       description:
>       8013398: Adjust number of stack guard pages on systems with
> large memory page size
>       Summary: Auto adjust number of stack guard pages on systems with
> large memory page size
>       Reviewed-by: bobv, coleenp

Attached is a work-around patch for ppc64 that removes the above fix for 
zero. I am testing a patch that allows
it to work without removing the above, but its not ready yet.

Chris

-------------- next part --------------
diff -r 0505a797849f src/os/linux/vm/os_linux.cpp
--- a/src/os/linux/vm/os_linux.cpp	Wed Oct 23 05:23:32 2013 +0100
+++ b/src/os/linux/vm/os_linux.cpp	Thu Oct 24 14:21:47 2013 +0000
@@ -4538,6 +4538,7 @@
   initial_time_count = os::elapsed_counter();
   pthread_mutex_init(&dl_mutex, NULL);
 
+NOT_ZERO (
   // If the pagesize of the VM is greater than 8K determine the appropriate
   // number of initial guard pages.  The user can change this with the
   // command line arguments, if needed.
@@ -4546,6 +4547,7 @@
     StackRedPages = 1;
     StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size();
   }
+)
 }
 
 // To install functions for atexit system call
@@ -4598,9 +4600,16 @@
   // size.  Add a page for compiler2 recursion in main thread.
   // Add in 2*BytesPerWord times page size to account for VM stack during
   // class initialization depending on 32 or 64 bit VM.
+NOT_ZERO (
   os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,
             (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() +
                     (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size());
+)
+ZERO_ONLY (
+  os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed,           
+            (size_t)(StackYellowPages+StackRedPages+StackShadowPages+
+                     2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size());
+)
 
   size_t threadStackSizeInBytes = ThreadStackSize * K;
   if (threadStackSizeInBytes != 0 &&


More information about the zero-dev mailing list