• Stephan Bergmann's avatar
    Don't reset signal that hasn't been set · 6417e8cd
    Stephan Bergmann yazdı
    Once an in-process JVM is instantiated, it is vital that the disposition for
    SIGSEGV is not changed afterwards, as we do not make use of Java's libjsig.so
    (cf. <https://docs.oracle.com/javase/8/docs/technotes/guides/vm/
    signal-chaining.html>) in our processes.
    
    I observed sporadic SIGSEGV crashes of CppunitTest_dbaccess_RowSetClones on a
    64-core aarch64 machine (see comment at <https://github.com/flathub/
    org.libreoffice.LibreOffice/issues/42#issuecomment-395731088> "OpenJDK 10 is now
    available").  What apparently happenes is that the cppunittester process first
    sets up its signal handlers through vclbootstrapprotector, which doesn't set one
    for SIGSEGV because bSetSEGVHandler is false in sal/osl/unx/signal.cxx because
    !is_soffice_Impl().  Then later when the in-process JVM is instantiated it sets
    its handlers, including a SIGSEGV one.  Towards the end of the process,
    DeInitVCL calls osl_removeSignalHandler calls onDeInitSignal, which erroneously
    resets the SIGSEGV handler because it doesn't honor bSetSEGVHandler.  But it
    can apparently happen that JVM threads are still running at that time and are
    executing JIT'ed code that can cause SIGSEGV that relies on the JVM's handler
    being installed, which it no longer is.
    
    (This can probably also happen for soffice.bin itself, where bSetSEGVHandler
    will be true.  That will need a different, follow-up fix.)
    
    Change-Id: Ib6d99c23e57daa0b7576964908aadff511f2bb21
    Reviewed-on: https://gerrit.libreoffice.org/56232
    Tested-by: Jenkins
    Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
    6417e8cd
Adı
Son kayıt (commit)
Son güncelleme
..
android Loading commit data...
cppunittester Loading commit data...
inc Loading commit data...
osl Loading commit data...
qa Loading commit data...
rtl Loading commit data...
test Loading commit data...
textenc Loading commit data...
util Loading commit data...
CppunitTest_Module_DLL.mk Loading commit data...
CppunitTest_sal_osl.mk Loading commit data...
CppunitTest_sal_osl_security.mk Loading commit data...
CppunitTest_sal_rtl.mk Loading commit data...
CppunitTest_sal_types.mk Loading commit data...
Executable_cppunittester.mk Loading commit data...
Executable_osl_process_child.mk Loading commit data...
Library_lo-bootstrap.mk Loading commit data...
Library_sal.mk Loading commit data...
Library_sal_textenc.mk Loading commit data...
Makefile Loading commit data...
Module_sal.mk Loading commit data...
README Loading commit data...