Welcome! Log In Create A New Profile

Advanced

Re: Attempting to write a plugin

Mike Gagnon
March 16, 2012 11:12AM
I'm new to nginx myself, so I can't offer much nginx specific advice.

Are you familiar with the GDB debugger? It's very helpful for debugging
segfaults. The nginx core module also has some useful directives that help
with debugging, such as daemon and debug_points.

I only mention these basic tips because you said C isn't one of your strong
languages.

Cheers,
Mike Gagnon


On Fri, Mar 16, 2012 at 6:33 AM, <nginx.devlist.alias@fremnet.net> wrote:

> Hi
>
> I'm attempting to write my first plugin, it's going swimmingly except it's
> not.
>
> I'm trying to add to the SSI module the same way the perl module does and
> have spent a lot of time flicking between the two (c isn't one of my strong
> languages).
>
> It appears to work, the very last log line does get called, then it
> segfaults
>
> 2012/03/16 20:14:55 [emerg] 10663#0: *1 working with the bufferzzzzzz
> while sending response to client, client: 118.xx.xx.66, server:
> flatus.xx.net, request: "GET /index.html HTTP/1.1", host: "
> flatus.xx.net:8081"
>
> 2012/03/16 20:14:55 [emerg] 10663#0: *1 working with the buffer failing
> btw YqEgHCzpROFbVQPah9mA_w==,**1331892955 while sending response to
> client, client: 118.xx.xx.66, server: flatus.xx.net, request: "GET
> /index.html HTTP/1.1", host: "flatus.xx.net:8081"
>
> I've attached the plugin, such as it is...
>
> You get the log message from line 130
> ngx_log_error(NGX_LOG_EMERG, c->log, 0, "working with the buffer failing
> btw %V", &foo);
>
> but then it promptly crashes....
>
> Any ideas? I thought it was going along so well :(
>
> Thanks
>
> Shannon.
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
>
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Attempting to write a plugin

Anonymous User 1394 March 16, 2012 09:36AM

Re: Attempting to write a plugin

Mike Gagnon 474 March 16, 2012 11:12AM

Re: Attempting to write a plugin

Anonymous User 449 March 16, 2012 08:12PM

Re: Attempting to write a plugin

Alexandr Gomoliako 465 March 16, 2012 08:20PM

Re: Attempting to write a plugin

Anonymous User 523 March 16, 2012 08:56PM

Re: Attempting to write a plugin

Alexandr Gomoliako 615 March 16, 2012 09:30PM

Re: Attempting to write a plugin

Anonymous User 500 March 18, 2012 07:28AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready