Nem restart-ol az Apache-om

Naná, miért is restart-olna. Egyébként, ha jól értem, az USR1 szignáltól kellene meg-graceful-nia.
Az első érdekesség, amit látni vélek, hogy egy 'zend_signal_init' nevű komponens is rászívózik a SIGHUP, SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGABRT, SIGEMT, SIGFPE, SIGKILL(?), SIGBUS-ra. Meg másokra (255-ig). Persze lehet, hogy csak a PHP saját futása idejére.

Szerk:nem akarom az Oracle11-et gyanusítani, de ismét találtam néhány komponenst, amiket szerintem nem kellene exportálnia


$ dump -Tv -X64 libphp.so.7
[287]   0x00000000    undef      IMP     RW EXTref /opt/lib64/libclntsh.so.11 guesses
[373]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 ldexp
[374]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 logb
[375]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 sigsetjmp
[376]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 siglongjmp
[377]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 acos
[378]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 asin
[379]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 atan
[380]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 atan2
[381]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 copysign
[382]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 cos
[383]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 cosh
[384]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 exp
[385]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 log
[386]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 log10
[387]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 sin
[388]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 sinh
[389]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 tan
[390]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 tanh
[391]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 unordered
[392]   0x00000000    undef      IMP     DS EXTref /opt/lib64/libclntsh.so.11 expm1

Szerk: kiszedtem őket, most látszólag jó. (Megj.: nem gondolnám a matematikai függvényeket bűnösnek, de a sigsetjmp, siglongjmp kicsit gyanús.) Persze ez nem bizonyíték, hiszen nem debuggoltam ki rendesen, de most már nem állítom vissza a korábbi állapotot. Inkább berakom a cronba a napi egyszeri restart-ot, és ha jó, akkor jó.

20180403.1435::
Ez sem feltétlenül egészen jó így:

Thread 2 received signal SIGUSR1, User defined signal 1.

Thread 2 received signal SIGSEGV, Segmentation fault.
0x090000001b20c0c0 in _emalloc () from /usr/local/libexec64/apache2/libphp7.so

(gdb) bt
#0  0x090000001b20c0c0 in _emalloc () from /usr/local/libexec64/apache2/libphp7.so
#1  0x090000001b222c84 in _zend_hash_str_add () from /usr/local/libexec64/apache2/libphp7.so
#2  0x090000001b58ec58 in sapi_register_post_entry () from /usr/local/libexec64/apache2/libphp7.so
#3  0x090000001b58ea98 in sapi_register_post_entries () from /usr/local/libexec64/apache2/libphp7.so
#4  0x090000001b59004c in php_setup_sapi_content_types () from /usr/local/libexec64/apache2/libphp7.so
#5  0x090000001b589e68 in sapi_globals_ctor () from /usr/local/libexec64/apache2/libphp7.so
#6  0x090000001b23f2a8 in ts_allocate_id () from /usr/local/libexec64/apache2/libphp7.so
#7  0x090000001b589f74 in sapi_startup () from /usr/local/libexec64/apache2/libphp7.so
#8  0x090000001bd1038c in php_apache_server_startup () from /usr/local/libexec64/apache2/libphp7.so
#9  0x0000000100006d98 in ap_run_post_config (pconf=0x110032298, plog=0x11005e558, ptemp=0x110062598, s=0x11005a600) at config.c:103
#10 0x0000000100002730 in main (argc=4, argv=0xffffffffffff438) at main.c:806

Kieg:


(gdb) disass 0x90000001cc0bcb8,0x90000001cc0bcd0
Dump of assembler code from 0x90000001cc0bcb8 to 0x90000001cc0bcd0:
   0x090000001cc0bcb8 <_zend_hash_str_add+148>: rldicr  r9,r9,0,60
   0x090000001cc0bcbc <_zend_hash_str_add+152>: mr      r3,r9
   0x090000001cc0bcc0 <_zend_hash_str_add+156>: bl      0x90000001cbf4eac <_emalloc>
=> 0x090000001cc0bcc4 <_zend_hash_str_add+160>: nop
   0x090000001cc0bcc8 <_zend_hash_str_add+164>: mr      r9,r3
   0x090000001cc0bccc <_zend_hash_str_add+168>: std     r9,168(r31)
End of assembler dump.

(gdb) disass 0x090000001cbf50f8,0x090000001cbf5110
Dump of assembler code from 0x90000001cbf50f8 to 0x90000001cbf5110:
   0x090000001cbf50f8 <_emalloc+588>:   ld      r9,152(r31)  r31=0xfffffffffffebb0
   0x090000001cbf50fc <_emalloc+592>:   ld      r10,176(r31) r10=0x40
   0x090000001cbf5100 <_emalloc+596>:   std     r10,16(r9)   r9=0
   0x090000001cbf5104 <_emalloc+600>:   ld      r9,152(r31)
   0x090000001cbf5108 <_emalloc+604>:   ld      r10,184(r31)
   0x090000001cbf510c <_emalloc+608>:   std     r10,24(r9)

Hozzászólások

Nem, a PHP azért ül rá ezekre a szignálokra, mert ilyenkor veszi észre az új telepített extensionöket.

--
Blog | @hron84