Hi Joshua,
> On 23 Aug 2024, at 1:48 PM, Joshua O'Sullivan <joshua@firetail.io> wrote:
>
> Hey everyone,
>
> We're currently developing a dynamic module which itself loads another shared library, which we've written in Golang. It seems to be a bit off the beaten track - I can't find any guidance in the documentation pertaining to loading shared libraries in dynamic modules, and there's only one example in the wild I can find of this being attempted before - https://github.com/robinmonjo/ngx_http_l?tab=readme-ov-file#issues-encountered.
>
> We've got a proof-of-concept, however we're struggling with where to store the shared library - keeping it in the main configuration seems to make sense, but calls to `dlopen` in our create or init main configuration functions seem to cause NGINX to hang when it handles requests. We're currently using version 1.24.0.
Indeed you can load a shared library in create_conf or init_conf and store its handle in the configuration. Also you need to register a cycle pool cleanup handler which would release the library.
Could you please provide a stack trace of nginx when it hangs?
----
Roman Arutyunyan
arut@nginx.com
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel