Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: /usr/bin/ftp crash on -current (10.00.4) aarch64



On Thu, 18 May 2023 at 11:33, RVP <rvp%sdf.org@localhost> wrote:
>
> On Thu, 18 May 2023, Chavdar Ivanov wrote:
>
> > This turned out to be /usr/bin/ftp crashing:
> >
> > #  /usr/bin/ftp -o node-v20.2.0.tar.xz
> > 'https://nodejs.org/dist/v20.2.0/node-v20.2.0.tar.xz'
> > Trying 104.20.23.46:443 ...
> > [1]    7100 segmentation fault  /usr/bin/ftp -o node-v20.2.0.tar.xz
> > ....
> >
> > If I run it under gdb, I get:
> >
> > (gdb) run -o node-v20.2.0.tar.xz
> > 'https://nodejs.org/dist/v20.2.0/node-v20.2.0.tar.xz'
> > Starting program: /usr/bin/ftp -o node-v20.2.0.tar.xz
> > 'https://nodejs.org/dist/v20.2.0/node-v20.2.0.tar.xz'
> >
> > Program received signal SIGILL, Illegal instruction.
> > 0x0000f7db5d54be70 in _armv8_sha512_probe () from /usr/lib/libcrypto.so.14
> > (gdb) bt
> > #0  0x0000f7db5d54be70 in _armv8_sha512_probe () from /usr/lib/libcrypto.so.14
> > #1  0x0000f7db5d54c23c in OPENSSL_cpuid_setup () from /usr/lib/libcrypto.so.14
> > #2  0x0000ffffef643398 in _rtld_call_init_function () from
> > /usr/libexec/ld.elf_so
> > #3  0x0000ffffef6436a4 in _rtld_call_init_functions () from
> > /usr/libexec/ld.elf_so
> > #4  0x0000ffffef643f74 in _rtld () from /usr/libexec/ld.elf_so
> > #5  0x0000ffffef640b10 in _rtld_start () from /usr/libexec/ld.elf_so
> > Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> >
>
> You should ignore SIGILL when it's in libcrypto on some archs. eg. ARM,
> PPC & Sparc. On x86 systems, libcrypto uses the CPUID instruction to
> determine which optimized assembly routines can be used for speedup. On
> ARM etc, it installs a SIGILL handler and just runs test instructions. The
> handler being called means _those_ instructions are not available.
>
> So, on ARM, you have to tell gdb to pass through SIGILL to the program:
>
> ```
> (gdb) handle SIGILL nostop noprint pass
> ```
>
> > The weird and suspicious thing is that /usr/bin/ftp is linked to both
> > existing libcrypto.so versions:
> >
> > ldd /usr/bin/ftp
> > /usr/bin/ftp:
> >        -ledit.3 => /usr/lib/libedit.so.3
> >        -lterminfo.2 => /usr/lib/libterminfo.so.2
> >        -lc.12 => /usr/lib/libc.so.12
> >        -lssl.15 => /usr/lib/libssl.so.15
> >        -lcrypto.14 => /usr/lib/libcrypto.so.14
> >        -lcrypt.1 => /lib/libcrypt.so.1
> >        -lcrypto.15 => /usr/lib/libcrypto.so.15
> >
>
> I would say this is the real reason for the crash (SIGSEGV).

Yes indeed, with SIGILL passed I get:


Program received signal SIGSEGV, Segmentation fault.
0x0000f03114c97890 in EC_GROUP_order_bits () from /usr/lib/libcrypto.so.14
(gdb) bt
#0  0x0000f03114c97890 in EC_GROUP_order_bits () from /usr/lib/libcrypto.so.14
#1  0x0000f031154898a4 in engine_unlocked_init () from /usr/lib/libcrypto.so.15
#2  0x0000f03115489ab0 in ENGINE_init () from /usr/lib/libcrypto.so.15
#3  0x0000f031153d11f0 in ?? () from /usr/lib/libcrypto.so.15
#4  0x0000f03115694c30 in ssl_setup_sig_algs () from /usr/lib/libssl.so.15
#5  0x0000f031156a85c4 in SSL_CTX_new_ex () from /usr/lib/libssl.so.15
#6  0x000000000f1be6d8 in fetch_start_ssl ()
#7  0x000000000f1b0dfc in fetch_url ()
#8  0x000000000f1b3128 in auto_fetch ()
#9  0x000000000f1bf944 in main ()


>
> -RVP



-- 
----


Home | Main Index | Thread Index | Old Index