RFR(S): 8020701: Avoid crashes in WatcherThread

Daniel D. Daugherty daniel.daugherty at oracle.com
Wed Jul 17 10:03:02 PDT 2013


On 7/17/13 5:58 AM, Rickard Bäckman wrote:
> Hi all,
>
> can I please have reviews for the following change?
>
> We are adding a mechanism for avoiding some crashes in the WatcherThread using different OS-specific methods.
>
> Webrev: http://cr.openjdk.java.net/~rbackman/8020701/webrev/
>
> Thanks
> /R

Thumbs up! The bug mentions a few tests where you think this new
infrastructure will help diagnose the failures modes for those tests.
However, are there any new tests targeted to exercise this code?


src/share/vm/runtime/os.hpp
     No comments.

src/share/vm/runtime/os.cpp
     No comments.

src/share/vm/runtime/thread.hpp
     line 756: void 
set_crash_protection(os::WatcherThreadCrashProtection* crash_protection) 
{ assert(Thread::current()->is_Watcher_thread(), "Can only be set by 
WatcherThread"); _crash_protection = crash_protection; }
         This line is ridiculously long. Please reformat it to fit in 80 
cols.

src/share/vm/runtime/thread.cpp
     No comments.

src/os/posix/vm/os_posix.hpp
     Nice comment. Hopefully it will keep anyone from doing something
     dangerous in the future.

src/os/posix/vm/os_posix.cpp'
     Please add the following line above 268:

     * See the caveats for this class in os_posix.hpp.

src/os/windows/vm/os_windows.hpp
     No comments.

src/os/windows/vm/os_windows.cpp
     line 4692  * Protects the callback call so that S jumps back into 
this method
         Stale comment? What is 'S'?

     Please add the following line above 4692:

     * See the caveats for this class in os_windows.hpp.

src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
     line 405:   // (no destructors run)
         Please change to "(no destructors can be run)"

src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
     line 557:   // (no destructors run)
         Please change to "(no destructors can be run)"

src/os_cpu/linux_x86/vm/os_linux_x86.cpp
     line 229:   // (no destructors run)
         Please change to "(no destructors can be run)"

src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
     line 319:   // (no destructors run)
         Please change to "(no destructors can be run)"

src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
     line 378:   // (no destructors run)
         Please change to "(no destructors can be run)"

src/share/vm/runtime/mutex.cpp
     No comments.

Dan



More information about the hotspot-runtime-dev mailing list