Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use as dynamic module #20

Open
remort opened this issue May 12, 2022 · 1 comment
Open

Unable to use as dynamic module #20

remort opened this issue May 12, 2022 · 1 comment

Comments

@remort
Copy link

remort commented May 12, 2022

It works if built statically (though with bugs, can't read body sent by eval module via proxy_pass). But refuses to load as a dynamic module. This is a backtrace:

GNU gdb (GDB) 11.1
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-alpine-linux-musl".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nginx...
(No debugging symbols found in nginx)
[New LWP 16]
Core was generated by `nginx -t'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  ngx_http_eval_merge_loc_conf (cf=0x7ffc2dec70c8, parent=0x7fc63fbcd298, child=0x0) at //nginx-eval-module-1.0.4/ngx_http_eval_module.c:525
525	//nginx-eval-module-1.0.4/ngx_http_eval_module.c: No such file or directory.

I build modules, configuring nginx sources like this:

./configure --add-dynamic-module=$NGINX_EVAL_DIR --with-compat $CONFARGS

where CONFARGS - are configure arguments for Nginx in the container.

Then I copy .so to another exactly the same container as nginx module (to /etc/nginx/modules/) without build requirements installed (nginxes are the same with the same CONFARGS).

For example headers-more-nginx-module built in the same way loads well.

@remort
Copy link
Author

remort commented May 20, 2022

Have just built it under ubuntu server 18.04. Same thing. Core dump:

# gdb nginx /cores/core.nginx.16 
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nginx...done.
[New LWP 16]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `nginx'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  ngx_http_eval_merge_loc_conf (cf=0x7ffe2bb5f450, parent=0x563813775c50, child=0x0) at ./nginx-eval-module-1.0.4/ngx_http_eval_module.c:525
525	./nginx-eval-module-1.0.4/ngx_http_eval_module.c: No such file or directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant