<div dir="ltr">Thanks a lot for your reply.<div><br></div><div>First, we want to manage the module versions, such as ngx_http_abc_module_1.so, ngx_http_abc_module_2.so.</div><div>Maybe you can share a better way.</div><div><br></div><div>Second:</div><div><span style="font-size:14px">"Note that when writing module *.so files care should be taken to</span><br style="font-size:14px"><span style="font-size:14px">not modify contents of files currently loaded" -- I get, but we didn't.</span></div><div><span style="font-size:14px"><br></span></div><div><br></div><div>The above problem I described is:</div><div><br></div><div>load_module  modules/ngx_http_abc_module_2.so;  # it runs well before upgrading</div><div><br></div><div><br></div><div>Then we upgrade module named ngx_http_abc_module_3.so</div><div>[ make install: generate new file ngx_http_abc_module.so; cp ngx_http_abc_module.so ngx_http_abc_module_3.so]</div><div><br></div><div>Then change config</div><div><br></div><div>load_module modules/ngx_http_abc_module_3.so;  </div><div><br></div><div>Finally we upgrade nginx: -USR2 && sleep && -QUIT old</div><div><br></div><div><br></div><div>B.R.~</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-30 19:22 GMT+08:00 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<br>
On Tue, Aug 30, 2016 at 06:33:36PM +0800, 洪志道 wrote:<br>
<br>
<br>
[...]<br>
<span class=""><br>
> I found a coredump file generated on production.<br>
<br>
</span>[...]<br>
<span class=""><br>
> nginx.conf<br>
><br>
> load_module  modules/....;<br>
> load_module  modules/ngx_http_abc_module_3.<wbr>so;  # This module is in the<br>
> last postion, the other modules seems right.<br>
><br>
> And there is tiny detail. I generate so file named<br>
> 'ngx_http_abc_module.so', then I copy as ngx_http_abc_module_3.so<br>
<br>
</span>Note that when writing module *.so files care should be taken to<br>
not modify contents of files currently loaded.  E.g., "make<br>
install" in nginx will first move an old file (if any) to<br>
*.so.old, and then copy the new file.<br>
<br>
If you happened to modify an *.so file currently loaded,<br>
segmentation fault is expected.  Just using "cp" without moving an<br>
old file first is known to cause segmentation faults as it<br>
modifies contents of existing *.so files.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
<br>
______________________________<wbr>_________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx-devel</a></font></span></blockquote></div><br></div>