Сегодня я обновлял пакеты, используя apt upgrade
на серверах. Все было хорошо, но на одном я получил сообщение, что не удалось запустить php5.6-fpm и php7.0-fpm. И теперь у меня в dmesg:
[21986691.640266] pickup[14300]: segfault at 7fb1d5e2d000 ip 00007fb1d6982beb sp 00007ffd07b706c8 error 4 in libs.so[7fb1d6981000+6000]
[21986751.697459] pickup[14341]: segfault at 7fc82ee9c000 ip 00007fc82f9f1beb sp 00007ffd57d50438 error 4 in libs.so[7fc82f9f0000+6000]
[21986811.773566] pickup[14372]: segfault at 7fad1d41e000 ip 00007fad1df73beb sp 00007ffc34dc7cf8 error 4 in libs.so[7fad1df72000+6000]
[21986871.854032] pickup[14409]: segfault at 7f4b7f912000 ip 00007f4b80467beb sp 00007fffbf153be8 error 4 in libs.so[7f4b80466000+6000]
[21986892.270276] postconf[14410]: segfault at 7f660a531000 ip 00007f660b29dbeb sp 00007ffefeaf2308 error 4 in libs.so[7f660b29c000+6000]
[21986931.937664] pickup[14445]: segfault at 7fbd18994000 ip 00007fbd194e9beb sp 00007ffe1d64e908 error 4 in libs.so[7fbd194e8000+6000]
[21986992.019485] pickup[14569]: segfault at 7f11070d1000 ip 00007f1107c26beb sp 00007ffc6e1a5c18 error 4 in libs.so[7f1107c25000+6000]
[21987047.379411] php[14601]: segfault at 7fd448af8000 ip 00007fd449f22beb sp 00007fff66a13548 error 4 in libs.so[7fd449f21000+6000]
GDB мне ничего не говорит:
root@srv #: gdb php
(...)
Reading symbols from php...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7bd2beb in ?? ()
(gdb) bt
#0 0x00007ffff7bd2beb in ?? ()
#1 0x00007ffff7bd3abf in ?? ()
#2 0x00007ffff64f7000 in ?? ()
#3 0x0000000000000000 in ?? ()
Strace:
(...)
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220*\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=92584, ...}) = 0
mmap(NULL, 2188336, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fc622243000
mprotect(0x7fc622259000, 2093056, PROT_NONE) = 0
mmap(0x7fc622458000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x15000) = 0x7fc622458000
close(3) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc626fa9000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc626fa7000
arch_prctl(ARCH_SET_FS, 0x7fc626fa7b80) = 0
mprotect(0x7fc6254ab000, 16384, PROT_READ) = 0
mprotect(0x7fc622458000, 4096, PROT_READ) = 0
mprotect(0x7fc6264ea000, 4096, PROT_READ) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc626fa5000
mprotect(0x7fc6227cc000, 40960, PROT_READ) = 0
mprotect(0x7fc6261e6000, 4096, PROT_READ) = 0
mprotect(0x7fc625110000, 4096, PROT_READ) = 0
mprotect(0x7fc622a00000, 4096, PROT_READ) = 0
mprotect(0x7fc624644000, 4096, PROT_READ) = 0
mprotect(0x7fc624a02000, 73728, PROT_READ) = 0
mprotect(0x7fc624ee7000, 65536, PROT_READ) = 0
mprotect(0x7fc625966000, 196608, PROT_READ) = 0
mprotect(0x7fc625c1e000, 36864, PROT_READ) = 0
mprotect(0x7fc626976000, 4096, PROT_READ) = 0
mprotect(0x7fc625fd8000, 36864, PROT_READ) = 0
mprotect(0x7fc62675c000, 4096, PROT_READ) = 0
mprotect(0x7fc626b8b000, 4096, PROT_READ) = 0
mprotect(0x55daebdd9000, 483328, PROT_READ) = 0
mprotect(0x7fc626fba000, 4096, PROT_READ) = 0
munmap(0x7fc626faf000, 31902) = 0
set_tid_address(0x7fc626fa7e50) = 14887
set_robust_list(0x7fc626fa7e60, 24) = 0
rt_sigaction(SIGRTMIN, {sa_handler=0x7fc624efebd0, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x7fc624f0a0e0}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {sa_handler=0x7fc624efec60, sa_mask=[], sa_flags=SA_RESTORER|SA_RESTART|SA_SIGINFO, sa_restorer=0x7fc624f0a0e0}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(NULL) = 0x55daec9cc000
brk(0x55daec9fe000) = 0x55daec9fe000
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x7fc625766000} ---
+++ killed by SIGSEGV +++
Segmentation fault
Как и в dmesg - затронул php5.6, php7.0, pickup, postconf. Просто давка за бегом. Никогда не возникало таких проблем. Я подумываю о перезагрузке (у сервера большое время безотказной работы), но меня мало беспокоит, что теперь система вообще не загружается (Debian 9.11 / VPS). Итак, сейчас я создаю резервную копию и прошу здесь любой помощи.
Linux [srv] 4.9.0-8-amd64 #1 SMP Debian 4.9.130-2 (2018-10-27) x86_64 GNU/Linux
[править] После перезагрузки все то же самое. Пытался понизить версию php7 без каких-либо последствий.
А вот вывод valgrind:
==20327== Memcheck, a memory error detector
==20327== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20327== Using Valgrind-3.12.0.SVN and LibVEX; rerun with -h for copyright info
==20327== Command: php
==20327==
--20327-- Valgrind options:
--20327-- -v
--20327-- Contents of /proc/version:
--20327-- Linux version 4.9.0-11-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.189-3+deb9u1 (2019-09-20)
--20327--
--20327-- Arch and hwcaps: AMD64, LittleEndian, amd64-cx16-lzcnt-rdtscp-sse3-avx-avx2-bmi
--20327-- Page sizes: currently 4096, max supported 4096
--20327-- Valgrind library directory: /usr/lib/valgrind
--20327-- Reading syms from /usr/bin/php7.0
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/ld-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/60/6df9c355103e82140d513bc7a25a635591c153.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /usr/lib/valgrind/memcheck-amd64-linux
--20327-- Considering /usr/lib/valgrind/memcheck-amd64-linux ..
--20327-- .. CRC mismatch (computed db5b2ec5 wanted 0eae776b)
--20327-- object doesn't have a symbol table
--20327-- object doesn't have a dynamic symbol table
--20327-- Scheduler: using generic scheduler lock implementation.
--20327-- Reading suppressions file: /usr/lib/valgrind/default.supp
==20327== embedded gdbserver: reading from /tmp/vgdb-pipe-from-vgdb-to-20327-by-root-on-???
==20327== embedded gdbserver: writing to /tmp/vgdb-pipe-to-vgdb-from-20327-by-root-on-???
==20327== embedded gdbserver: shared mem /tmp/vgdb-pipe-shared-mem-vgdb-20327-by-root-on-???
==20327==
==20327== TO CONTROL THIS PROCESS USING vgdb (which you probably
==20327== don't want to do, unless you know exactly what you're doing,
==20327== or are doing some strange experiment):
==20327== /usr/lib/valgrind/../../bin/vgdb --pid=20327 ...command...
==20327==
==20327== TO DEBUG THIS PROCESS USING GDB: start GDB like this
==20327== /path/to/gdb php
==20327== and then give GDB the following command
==20327== target remote | /usr/lib/valgrind/../../bin/vgdb --pid=20327
==20327== --pid is optional if only one valgrind process is running
==20327==
--20327-- REDIR: 0x401aec0 (ld-linux-x86-64.so.2:strlen) redirected to 0x3809de81 (???)
--20327-- REDIR: 0x4019770 (ld-linux-x86-64.so.2:index) redirected to 0x3809de9b (???)
--20327-- Reading syms from /usr/lib/valgrind/vgpreload_core-amd64-linux.so
--20327-- Considering /usr/lib/valgrind/vgpreload_core-amd64-linux.so ..
--20327-- .. CRC mismatch (computed 74a069fa wanted 84d99202)
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so
--20327-- Considering /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so ..
--20327-- .. CRC mismatch (computed 88f2547e wanted 8a7a4459)
--20327-- object doesn't have a symbol table
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x0401aec0 (strlen ) R-> (0000.0) 0x3809de81 ???
--20327-- new: 0x0401aec0 (strlen ) R-> (2007.0) 0x04c2ee60 strlen
--20327-- REDIR: 0x4019990 (ld-linux-x86-64.so.2:strcmp) redirected to 0x4c2ff60 (strcmp)
--20327-- REDIR: 0x401b9d0 (ld-linux-x86-64.so.2:mempcpy) redirected to 0x4c33330 (mempcpy)
--20327-- Reading syms from /lib/x86_64-linux-gnu/libresolv-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/ea/d5fd817712e63c1212d1ee7d7ee1b9c29f93a7.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /lib/x86_64-linux-gnu/libz.so.1.2.8
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/libpcre.so.3.13.3
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/libm-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/4e/49714c557ce0472c798f39365ca10f9c0e1933.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /lib/x86_64-linux-gnu/libdl-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/db/2caeeec37482a98ab1416d0a9afe2944930de9.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libxml2.so.2.9.9
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libssl.so.1.1
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/libc-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/77/5143e680ff0cd4cd51cce1ce8ca216e635a1d6.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /lib/x86_64-linux-gnu/libpthread-2.24.so
--20327-- Considering /usr/lib/debug/.build-id/16/d609487bcc4acbac29a4eaa2dda0d2f56211ec.debug ..
--20327-- .. build-id is valid
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libicui18n.so.64.1
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libicuuc.so.64.1
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libicudata.so.64.1
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/liblzma.so.5.2.2
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.22
--20327-- object doesn't have a symbol table
--20327-- Reading syms from /lib/x86_64-linux-gnu/libgcc_s.so.1
--20327-- object doesn't have a symbol table
--20327-- REDIR: 0x679e710 (libc.so.6:strcasecmp) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679a1b0 (libc.so.6:strcspn) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x67a0a00 (libc.so.6:strncasecmp) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679c620 (libc.so.6:strpbrk) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679c9b0 (libc.so.6:strspn) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679dd80 (libc.so.6:memmove) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679d3c0 (libc.so.6:strstr) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x67989b0 (libc.so.6:index) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679d940 (libc.so.6:bcmp) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679aa50 (libc.so.6:strncmp) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679c2f0 (libc.so.6:strncpy) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679e230 (libc.so.6:memset) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679aa10 (libc.so.6:strncat) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x68105b0 (libc.so.6:__memmove_chk) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x67a3100 (libc.so.6:memcpy@@GLIBC_2.14) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x679a090 (libc.so.6:strcpy) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x6798c00 (libc.so.6:strcmp) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
--20327-- REDIR: 0x68104e0 (libc.so.6:__memcpy_chk) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
--20327-- REDIR: 0x67987b0 (libc.so.6:strcat) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
--20327-- REDIR: 0x679e560 (libc.so.6:stpcpy) redirected to 0x4a26740 (_vgnU_ifunc_wrapper)
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
==20327== WARNING: new redirection conflicts with existing -- ignoring it
--20327-- old: 0x06843010 (__memcpy_chk_avx_una) R-> (2024.0) 0x04c32df0 __memmove_chk
--20327-- new: 0x06843010 (__memcpy_chk_avx_una) R-> (2030.0) 0x04c33420 __memcpy_chk
--20327-- REDIR: 0x679c330 (libc.so.6:rindex) redirected to 0x4c2e7f0 (rindex)
--20327-- REDIR: 0x6794f10 (libc.so.6:malloc) redirected to 0x4c2bb40 (malloc)
--20327-- REDIR: 0x679a650 (libc.so.6:strlen) redirected to 0x4c2eda0 (strlen)
--20327-- REDIR: 0x67b2810 (libc.so.6:__strstr_sse2_unaligned) redirected to 0x4c33520 (strstr)
==20327==
==20327== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==20327== Bad permissions for mapped region at address 0x64E4000
==20327== at 0x4E39BEB: ??? (in /lib64/libs.so)
==20327== by 0x4E3AABE: ??? (in /lib64/libs.so)
==20327== by 0x6232FFF: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.1)
--20327-- REDIR: 0x6795510 (libc.so.6:free) redirected to 0x4c2cd70 (free)
==20327==
==20327== HEAP SUMMARY:
==20327== in use at exit: 0 bytes in 0 blocks
==20327== total heap usage: 1 allocs, 1 frees, 72,704 bytes allocated
==20327==
==20327== All heap blocks were freed -- no leaks are possible
==20327==
==20327== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==20327== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Segmentation fault