Thu, 21 Apr 2016 13:17:25 +0200
8153641: assert(thread_state == _thread_in_native) failed: Assumed thread_in_native while heap dump
Reviewed-by: dsamersoff, sspitsyn, sla
src/os/solaris/vm/os_solaris.cpp | file | annotate | diff | comparison | revisions | |
src/share/vm/services/heapDumper.cpp | file | annotate | diff | comparison | revisions |
1.1 --- a/src/os/solaris/vm/os_solaris.cpp Mon Mar 14 12:35:48 2016 +0300 1.2 +++ b/src/os/solaris/vm/os_solaris.cpp Thu Apr 21 13:17:25 2016 +0200 1.3 @@ -6248,14 +6248,7 @@ 1.4 } 1.5 1.6 size_t os::write(int fd, const void *buf, unsigned int nBytes) { 1.7 - Thread* t = ThreadLocalStorage::thread(); 1.8 - if (t->is_Java_thread()) { 1.9 - INTERRUPTIBLE_RETURN_INT(::write(fd, buf, nBytes), os::Solaris::clear_interrupted); 1.10 - } else { 1.11 - size_t res; 1.12 - RESTARTABLE((size_t) ::write(fd, buf, (size_t) nBytes), res); 1.13 - return res; 1.14 - } 1.15 + INTERRUPTIBLE_RETURN_INT(::write(fd, buf, nBytes), os::Solaris::clear_interrupted); 1.16 } 1.17 1.18 int os::close(int fd) {
2.1 --- a/src/share/vm/services/heapDumper.cpp Mon Mar 14 12:35:48 2016 +0300 2.2 +++ b/src/share/vm/services/heapDumper.cpp Thu Apr 21 13:17:25 2016 +0200 2.3 @@ -468,7 +468,7 @@ 2.4 // flush and close dump file 2.5 if (is_open()) { 2.6 flush(); 2.7 - os::close(file_descriptor()); 2.8 + ::close(file_descriptor()); 2.9 set_file_descriptor(-1); 2.10 } 2.11 } 2.12 @@ -480,12 +480,11 @@ 2.13 ssize_t n = 0; 2.14 while (len > 0) { 2.15 uint tmp = (uint)MIN2(len, (size_t)UINT_MAX); 2.16 - n = os::write(file_descriptor(), pos, tmp); 2.17 + n = ::write(file_descriptor(), pos, tmp); 2.18 2.19 if (n < 0) { 2.20 - // EINTR cannot happen here, os::write will take care of that 2.21 set_error(strerror(errno)); 2.22 - os::close(file_descriptor()); 2.23 + ::close(file_descriptor()); 2.24 set_file_descriptor(-1); 2.25 return; 2.26 }