Skip to content

bugfix: avoided running init_by_lua* when test Nginx configuration wh… #1463

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

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

spacewander
Copy link
Member

…ich contains lua_shared_dict directive.

In commit 7c2b58e, we avoided running init_by_lua* in signaller processes
and when testing the Nginx configuration. However, when the Nginx
configuration contains lua_shared_dict directive, the execution of
init_by_lua* will be postponded when testing the configuration.
This case was not handled and led to the segmentation fault reported in
GitHub issue #1462.

I hereby granted the copyright of the changes in this pull request
to the authors of this lua-nginx-module project.

…ich contains lua_shared_dict directive.

In commit 7c2b58e, we avoided running init_by_lua* in signaller processes
and when testing the Nginx configuration. However, when the Nginx
configuration contains lua_shared_dict directive, the execution of
init_by_lua* will be postponded when testing the configuration.
This case was not handled and led to the segmentation fault reported in
GitHub issue openresty#1462.
@spacewander
Copy link
Member Author

@fancy-rabbit @thibaultcha @tokers
This should fix #1462.

Copy link
Member

@thibaultcha thibaultcha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might have been cleaner to wrap the lmcf->init_handler call after all, but this works. Thanks!

@thibaultcha
Copy link
Member

@spacewander Will you also port this change to the meta-lua module?

@thibaultcha
Copy link
Member

Ported the fix to openresty/meta-lua-nginx-module#67 myself in which I made you a co-author, ofc :)

@fancy-rabbit
Copy link

@spacewander tested and worked like a charm. thanks.

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

Successfully merging this pull request may close these issues.

3 participants