<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>32041</bug_id>
          
          <creation_ts>2016-04-30 07:57:28 +0300</creation_ts>
          <short_desc>Неработоспособен из коробки</short_desc>
          <delta_ts>2016-05-01 22:52:57 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>nginx</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://trac.nginx.org/nginx/ticket/926</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>blocker</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Evgenii Terechkov">evg</reporter>
          <assigned_to name="Anton Farygin">rider</assigned_to>
          <cc>placeholder</cc>
    
    <cc>rider</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>156391</commentid>
    <comment_count>0</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-04-30 07:57:28 +0300</bug_when>
    <thetext>Обновился с  1.8.1-alt1 на 1.10.0-alt2

nginx не смог перезапуститься с диагностикой:

=8&lt;============================================
root@thinkpad /etc/nginx #systemctl status nginx.service 
● nginx.service - The nginx HTTP and reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Сб 2016-04-30 11:19:44 KRAT; 33min ago
  Process: 4024 ExecStop=/usr/sbin/nginx -s stop (code=exited, status=1/FAILURE)
  Process: 4030 ExecStartPre=/usr/sbin/nginx -t (code=exited, status=1/FAILURE)
 Main PID: 27717 (code=exited, status=0/SUCCESS)

апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org systemd[1]: Starting The nginx HTTP and reverse proxy server...
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org nginx[4030]: nginx: [emerg] unknown directive &quot;gzip&quot; in /etc/nginx/nginx.conf:23
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org nginx[4030]: nginx: configuration file /etc/nginx/nginx.conf test failed
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org systemd[1]: nginx.service: Control process exited, code=exited status=1
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org systemd[1]: Failed to start The nginx HTTP and reverse proxy server.
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org systemd[1]: nginx.service: Unit entered failed state.
апр 30 11:19:44 thinkpad.evg-krsk.dyndns.org systemd[1]: nginx.service: Failed with result &apos;exit-code&apos;.
[1]    8532 exit 3     systemctl status nginx.service
=8&lt;============================================

заметил, что хотя /etc/nginx/nginx.conf и изменён (проверил rpm -V nginx), но /etc/nginx/nginx.conf.rpmnew не создался.

Пришлось вытянуть nginx.conf из rpm-пакета 1.10.0-alt2, но с ним ситуация такая же:
=8&lt;============================================
root@thinkpad /etc/nginx #git diff -U1
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index 6fd5805..29fcf6e 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -2,3 +2,3 @@
 
-worker_processes  1;
+worker_processes  10;
 
@@ -7,3 +7,3 @@ error_log   /var/log/nginx/error.log;
 events {
-       worker_connections  128;
+       worker_connections  1024;
 }
@@ -24,4 +24,2 @@ http {
 
-        keepalive_timeout 85;
-
        # text/html doesn&apos;t need to be defined there, it&apos;s compressed always
@@ -30,3 +28,2 @@ http {
        # gzip_comp_level 9;
-        autoindex_localtime on;
        include /etc/nginx/sites-enabled.d/*.conf;
root@thinkpad /etc/nginx #nginx -t    
nginx: [emerg] unknown directive &quot;gzip&quot; in /etc/nginx/nginx.conf:23
nginx: configuration file /etc/nginx/nginx.conf test failed
[1]    8848 exit 1     nginx -t
=8&lt;============================================

В чём дело пока не понял.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156392</commentid>
    <comment_count>1</comment_count>
    <who name="Anton Farygin">rider</who>
    <bug_when>2016-04-30 08:02:33 +0300</bug_when>
    <thetext>Использую nginx на многих системах - везде всё работает.
, давайте разбираться что сломалось.

Для начала предлагаю закомментировать директиву gzip
nginx.conf:#    gzip               on;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156393</commentid>
    <comment_count>2</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-04-30 08:17:45 +0300</bug_when>
    <thetext>Такая цепочка комментирования:
=8&lt;============================================
nginx: [emerg] unknown directive &quot;gzip_types&quot; in /etc/nginx/nginx.conf:28
=8&lt;============================================
потом
=8&lt;============================================
nginx: [emerg] unknown directive &quot;charset&quot; in /etc/nginx/sites-enabled.d/site.conf:10
=8&lt;============================================
потом
=8&lt;============================================
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
=8&lt;============================================


итого отвалились директивы gzip, gzip_types, charset.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156394</commentid>
    <comment_count>3</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-04-30 08:23:39 +0300</bug_when>
    <thetext>Если при этом попытаться обратиться к серверу браузером, он (сервер) падает с ошибкой сегментации и дампит корку:

=8&lt;============================================
2016-04-30T12:18:22.749460+07:00 thinkpad systemd[1]: Started Process Core Dump (PID 10542/UID 0).
2016-04-30T12:18:47.388458+07:00 thinkpad systemd[1]: Started Process Core Dump (PID 10570/UID 0).
=8&lt;============================================

трасировка такая:
=8&lt;============================================
evg@thinkpad ~ $gdb nginx nginx.core
GNU gdb (GDB) 7.9-alt2 (ALT Linux)
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later &lt;http://gnu.org/licenses/gpl.html&gt;
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type &quot;show copying&quot;
and &quot;show warranty&quot; for details.
This GDB was configured as &quot;x86_64-alt-linux&quot;.
Type &quot;show configuration&quot; for configuration details.
For bug reporting instructions, please see:
&lt;http://www.gnu.org/software/gdb/bugs/&gt;.
Find the GDB manual and other documentation resources online at:
&lt;http://www.gnu.org/software/gdb/documentation/&gt;.
For help, type &quot;help&quot;.
Type &quot;apropos word&quot; to search for commands related to &quot;word&quot;...
Reading symbols from nginx...Reading symbols from /usr/lib/debug/usr/sbin/nginx.debug...done.
done.
[New LWP 10544]
[Thread debugging using libthread_db enabled]
Using host libthread_db library &quot;/lib64/libthread_db.so.1&quot;.
Missing separate debuginfo for /lib64/libnss_mymachines.so.2
Try to install the hash file /usr/lib/debug/.build-id/c7/f8b868895177581eb7c76e2b3200e2c89dd476.debug
Core was generated by `nginx: worker process         &apos;.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x000000000048273e in ngx_http_autoindex_handler (r=0xec7070) at src/http/modules/ngx_http_autoindex_module.c:279
#2  0x000000000044bdd0 in ngx_http_core_content_phase (r=0xec7070, ph=0xeb6c00) at src/http/ngx_http_core_module.c:1377
#3  0x00000000004465d5 in ngx_http_core_run_phases (r=r@entry=0xec7070) at src/http/ngx_http_core_module.c:847
#4  0x00000000004466bc in ngx_http_handler (r=r@entry=0xec7070) at src/http/ngx_http_core_module.c:830
#5  0x0000000000451303 in ngx_http_process_request (r=0xec7070) at src/http/ngx_http_request.c:1910
#6  0x0000000000451817 in ngx_http_process_request_headers (rev=rev@entry=0xe87f70) at src/http/ngx_http_request.c:1342
#7  0x0000000000451b48 in ngx_http_process_request_line (rev=0xe87f70) at src/http/ngx_http_request.c:1022
#8  0x000000000043a3bb in ngx_epoll_process_events (cycle=&lt;optimized out&gt;, timer=&lt;optimized out&gt;, flags=&lt;optimized out&gt;) at src/event/modules/ngx_epoll_module.c:822
#9  0x00000000004321d3 in ngx_process_events_and_timers (cycle=cycle@entry=0xe82080) at src/event/ngx_event.c:242
#10 0x00000000004385d1 in ngx_worker_process_cycle (cycle=0xe82080, data=&lt;optimized out&gt;) at src/os/unix/ngx_process_cycle.c:753
#11 0x0000000000437050 in ngx_spawn_process (cycle=cycle@entry=0xe82080, proc=0x438550 &lt;ngx_worker_process_cycle&gt;, data=0x0, name=0x4d2f1f &quot;worker process&quot;, respawn=respawn@entry=0)
    at src/os/unix/ngx_process.c:198
#12 0x00000000004396b4 in ngx_reap_children (cycle=0xe82080) at src/os/unix/ngx_process_cycle.c:621
#13 ngx_master_process_cycle (cycle=cycle@entry=0xe82080) at src/os/unix/ngx_process_cycle.c:174
#14 0x000000000041604a in main (argc=&lt;optimized out&gt;, argv=&lt;optimized out&gt;) at src/core/nginx.c:367
(gdb) quit
evg@thinkpad ~ $
=8&lt;============================================</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156413</commentid>
    <comment_count>4</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-05-01 14:24:01 +0300</bug_when>
    <thetext>Апстрим уже сталкивался с такими случаями (см. URL). Как я понимаю, все они закрыты как invalid, т.к. дело во внешних модулях, с которыми собирался nginx.

В моём случае оказалось достаточно выключить сборку с ctpp2 чтобы нормализовать ситуацию.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156414</commentid>
    <comment_count>5</comment_count>
    <who name="Evgenii Terechkov">evg</who>
    <bug_when>2016-05-01 14:27:39 +0300</bug_when>
    <thetext>Сервер при этом даже работает (отдаёт браузеру содержимое).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156420</commentid>
    <comment_count>6</comment_count>
    <who name="Denis Smirnov">mithraen</who>
    <bug_when>2016-05-01 22:48:27 +0300</bug_when>
    <thetext>Извиняюсь, вчера пофиксил, а отправить на сборку забыл. Отправляю сейчас.

Да, виноват именно ctpp.

Заодно причесал подгрузку dynamic modules, и распилил на подпакеты (xslt, perl, geoip, image_filter).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156421</commentid>
    <comment_count>7</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2016-05-01 22:52:57 +0300</bug_when>
    <thetext>nginx-1.10.0-alt3 -&gt; sisyphus:

* Sun May 01 2016 Denis Smirnov &lt;mithraen@altlinux&gt; 1.10.0-alt3
- remove ctpp module (ALT #32041)
- fix dynamic modules configuration (use /etc/nginx/modules-enabled.d)
- move perl module to nginx-perl subpackege
- move GeoIP module to nginx-geoip subpackege
- move xslt module to nginx-xslt subpackege
- add image_filter module to nginx-image_filter subpackage
- add filetrigger for restart nginx when modules installed/removed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>