< prev index next >

src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp

Print this page
rev 55480 : [mq]: 8227275-native-oom-hanging-assertions


 286 
 287   // Note: it's not uncommon that JNI code uses signal/sigset to install
 288   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 289   // or have a SIGILL handler when detecting CPU type). When that happens,
 290   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 291   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 292   // that do not require siginfo/ucontext first.
 293 
 294   if (sig == SIGPIPE || sig == SIGXFSZ) {
 295     // allow chained handler to go first
 296     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 297       return true;
 298     } else {
 299       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 300       return true;
 301     }
 302   }
 303 
 304 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 305   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 306     handle_assert_poison_fault(ucVoid, info->si_addr);
 307     return 1;

 308   }
 309 #endif
 310 
 311   JavaThread* thread = NULL;
 312   VMThread* vmthread = NULL;
 313   if (os::Linux::signal_handlers_are_installed) {
 314     if (t != NULL ){
 315       if(t->is_Java_thread()) {
 316         thread = (JavaThread*)t;
 317       }
 318       else if(t->is_VM_thread()){
 319         vmthread = (VMThread *)t;
 320       }
 321     }
 322   }
 323 /*
 324   NOTE: does not seem to work on linux.
 325   if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
 326     // can't decode this kind of signal
 327     info = NULL;




 286 
 287   // Note: it's not uncommon that JNI code uses signal/sigset to install
 288   // then restore certain signal handler (e.g. to temporarily block SIGPIPE,
 289   // or have a SIGILL handler when detecting CPU type). When that happens,
 290   // JVM_handle_linux_signal() might be invoked with junk info/ucVoid. To
 291   // avoid unnecessary crash when libjsig is not preloaded, try handle signals
 292   // that do not require siginfo/ucontext first.
 293 
 294   if (sig == SIGPIPE || sig == SIGXFSZ) {
 295     // allow chained handler to go first
 296     if (os::Linux::chained_handler(sig, info, ucVoid)) {
 297       return true;
 298     } else {
 299       // Ignoring SIGPIPE/SIGXFSZ - see bugs 4229104 or 6499219
 300       return true;
 301     }
 302   }
 303 
 304 #ifdef CAN_SHOW_REGISTERS_ON_ASSERT
 305   if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
 306     if (handle_assert_poison_fault(ucVoid, info->si_addr)) {
 307       return 1;
 308     }
 309   }
 310 #endif
 311 
 312   JavaThread* thread = NULL;
 313   VMThread* vmthread = NULL;
 314   if (os::Linux::signal_handlers_are_installed) {
 315     if (t != NULL ){
 316       if(t->is_Java_thread()) {
 317         thread = (JavaThread*)t;
 318       }
 319       else if(t->is_VM_thread()){
 320         vmthread = (VMThread *)t;
 321       }
 322     }
 323   }
 324 /*
 325   NOTE: does not seem to work on linux.
 326   if (info == NULL || info->si_code <= 0 || info->si_code == SI_NOINFO) {
 327     // can't decode this kind of signal
 328     info = NULL;


< prev index next >