Ubuntu's openssl (1.1.1b-1ubuntu2.1 amd64) crashes like this: # openssl speed rsa Doing 512 bits private rsa's for 10s: 236319 512 bits private RSA's in 10.06s Doing 512 bits public rsa's for 10s: 4137009 512 bits public RSA's in 10.10s Doing 1024 bits private rsa's for 10s: Segmentation fault (core dumped)
Which glibc? Have you looked at the core / do you have a stack?
GNU C Library (Ubuntu GLIBC 2.29-0ubuntu2) stable release version 2.29. I don't have a working core (linuxulator coredumps are not particularly useful), I'm afraid. However, I've just noticed it's somewhat random: this time I got: # openssl speed rsa Doing 512 bits private rsa's for 10s: 197105 512 bits private RSA's in 10.02s Doing 512 bits public rsa's for 10s: 3558737 512 bits public RSA's in 10.03s Doing 1024 bits private rsa's for 10s: 96450 1024 bits private RSA's in 10.09s Doing 1024 bits public rsa's for 10s: 1412783 1024 bits public RSA's in 10.07s Doing 2048 bits private rsa's for 10s: Segmentation fault (core dumped)
Does Linux GDB work in linuxulator? I'm pretty unfamiliar. Getting cores working seems very useful.
(In reply to Conrad Meyer from comment #3) (By which I meant, live debugging, as opposed to post-facto core inspection.)
It doesn't, I'm afraid. I have some patches that improve the situation a bit, but they are not enough to make it work properly yet. Regarding core files - the ones we generate have FreeBSD stuff in them, so Linux gdb can't use them; our native gdb, on the other hand, refuses to touch Linux executables.
Re: core files -- yeah, I have a vague recollection of something like that. At the end of the day, it's one or more bugs. It seems like something that can be fixed, from one end or the other (or both).
Hah; not sure how could I miss this: time(NULL) = 1580227238 (2020-01-28T11:00:38-0500) time(NULL) = 1580227238 (2020-01-28T11:00:38-0500) time(NULL) = 1580227238 (2020-01-28T11:00:38-0500) time(NULL) = 1580227238 (2020-01-28T11:00:38-0500) time(NULL) = 1580227238 (2020-01-28T11:00:38-0500) --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} --- rt_sigaction(SIGALRM, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x802c37a20}, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTART}, 8) = 0 rt_sigreturn({mask=[]}) = 15611098741728140169 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=NULL} --- +++ killed by SIGSEGV (core dumped) +++ Segmentation fault Funnily enough, previous SIGLARMs work... kind of: time(NULL) = 1580227218 (2020-01-28T11:00:18-0500) --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL} --- rt_sigaction(SIGALRM, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x802c37a20}, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTART}, 8) = 0 rt_sigreturn({mask=[]}) = 7816104742323179296 times({tms_utime=947, tms_stime=45, tms_cutime=0, tms_cstime=0}) = 955958 --- SIGALRM {si_signo=SIGALRM, si_code=SI_KERNEL, si_errno=-512} --- rt_sigaction(SIGALRM, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x802c37a20}, {sa_handler=0x108da00, sa_mask=[ALRM], sa_flags=SA_RESTART}, 8) = 0 rt_sigreturn({mask=[]}) = -1 EPERM (Operation not permitted) write(2, "RSA verify failure\n", 19RSA verify failure
Fix for what seems to be the same problem: https://reviews.freebsd.org/D33599
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=a95cb95e12e537dbe70f9de18cc0fe98e4a5ebf5 commit a95cb95e12e537dbe70f9de18cc0fe98e4a5ebf5 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-02-02 17:21:37 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-02-02 17:21:37 +0000 linux(4): Preserve fpu fxsave state across signal delivery on amd64. PR: 240768 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38302 MFC after: 1 week sys/amd64/linux/linux_sysvec.c | 70 ++++++++++++++++++++++++++++++++++---- sys/x86/linux/linux_x86_sigframe.h | 7 ++-- 2 files changed, 68 insertions(+), 9 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=20d601714206e0da7b82706ec9ac9ca74aafd749 commit 20d601714206e0da7b82706ec9ac9ca74aafd749 Author: Dmitry Chagin <dchagin@FreeBSD.org> AuthorDate: 2023-02-02 17:21:37 +0000 Commit: Dmitry Chagin <dchagin@FreeBSD.org> CommitDate: 2023-02-09 07:55:24 +0000 linux(4): Preserve fpu fxsave state across signal delivery on amd64. PR: 240768 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D38302 MFC after: 1 week (cherry picked from commit a95cb95e12e537dbe70f9de18cc0fe98e4a5ebf5) sys/amd64/linux/linux_sysvec.c | 70 ++++++++++++++++++++++++++++++++++---- sys/x86/linux/linux_x86_sigframe.h | 7 ++-- 2 files changed, 68 insertions(+), 9 deletions(-)
Seems to be fixed, also linux jre/Mathlab works now.