<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Tue, 30 Jul 2019, at 4:26 AM, Maxim Dounin wrote:<br></div><blockquote type="cite" id="qt"><div>Looking at "p *c" and "p *s" might be also interesting.<br></div></blockquote><div><br></div><div>Program received signal SIGSEGV, Segmentation fault.<br></div><div>0x00000000005562f2 in ngx_mail_smtp_resolve_name_handler (ctx=0x7bcaa40)<br></div><div>    at src/mail/ngx_mail_smtp_handler.c:215<br></div><div>215                    ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,<br></div><div><br></div><div>(gdb) p *c<br></div><div>$14 = {data = 0x30, read = 0x111, write = 0xc2cfff0, fd = 263201712,<br></div><div>  recv = 0xfb023c0, send = 0x0, recv_chain = 0xb0, send_chain = 0x350cf90,<br></div><div>  listening = 0x0, sent = 55627856, log = 0x0, pool = 0x350cff0,<br></div><div>  type = -1242759166, sockaddr = 0x0, socklen = 7, addr_text = {len = 0,<br></div><div>    data = 0x2c4e8fc ""}, proxy_protocol_addr = {len = 0,<br></div><div>    data = 0x54eb79 <ngx_mail_log_error> "UH\211\345H\203\354@H\211}\330H\211u\320H\211U\310H\213E\330H\213@@H\205\300tCH\213E\330H\213P@H\213u\310H\213E\320H\211\321\272\234\064z"}, proxy_protocol_port = 53344,<br></div><div>  ssl = 0x484cb1 <ngx_syslog_writer>, udp = 0x2018d20,<br></div><div>  local_sockaddr = 0x7a414a, local_socklen = 0, buffer = 0x33312e32322e3438,<br></div><div>  queue = {prev = 0x3031312e36, next = 0x0}, number = 204275712,<br></div><div>  requests = 139872032560632, buffered = 0, log_error = 0, timedout = 0,<br></div><div>  error = 0, destroyed = 0, idle = 0, reusable = 0, close = 1, shared = 0,<br></div><div>  sendfile = 1, sndlowat = 1, tcp_nodelay = 2, tcp_nopush = 0,<br></div><div>  need_last_buf = 0}<br></div><div><br></div><div>(gdb) p *s<br></div><div>$15 = {signature = 155588656, connection = 0x350cf80, out = {len = 35,<br></div><div>    data = 0x20ae3e0 "220 smtp.fastmail.com ESMTP ready\r\n250 smtp.fastmail.com\r\n250-smtp.fastmail.com\r\n250-PIPELINING\r\n250-SIZE 71000000\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-AUTH PLAIN LOGIN\r\n250 AUTH=PLAIN LOGIN\r\n2"...}, buffer = 0x0, ctx = 0xfb02470, main_conf = 0x2015218,<br></div><div>  srv_conf = 0x202af60, resolver_ctx = 0x0, proxy = 0x0, mail_state = 0,<br></div><div>  protocol = 2, blocked = 0, quit = 0, quoted = 0, backslash = 0,<br></div><div>  no_sync_literal = 0, starttls = 0, esmtp = 0, auth_method = 0,<br></div><div>  auth_wait = 0, login = {len = 0, data = 0x0}, passwd = {len = 0,<br></div><div>    data = 0x0}, salt = {len = 0, data = 0x0}, tag = {len = 0, data = 0x0},<br></div><div>  tagged_line = {len = 0, data = 0x0}, text = {len = 0, data = 0x0},<br></div><div>  addr_text = 0x20b0768, host = {len = 20,<br></div><div>    data = 0xfb024a8 "aldo-gw.g-service.ru"}, smtp_helo = {len = 0,<br></div><div>    data = 0x0}, smtp_from = {len = 0, data = 0x0}, smtp_to = {len = 0,<br></div><div>    data = 0x0}, cmd = {len = 0, data = 0x0}, command = 0, args = {elts = 0x0,<br></div><div>    nelts = 0, size = 0, nalloc = 0, pool = 0x0}, login_attempt = 0,<br></div><div>  state = 0, cmd_start = 0x0, arg_start = 0x0, arg_end = 0x0,<br></div><div>  literal_len = 384}<br></div><div><br></div><blockquote type="cite" id="qt"><div>Any changes to nginx code and/or additional modules?<br></div></blockquote><div><br></div><div>This small patch set (which we've had for years): <a href="https://github.com/fastmailops/nginx/commits/1.17.2-fastmail">https://github.com/fastmailops/nginx/commits/1.17.2-fastmail</a><br></div><div><br></div><div>Modules: lua(+luajit), headers_more, ndk, vts (though none of these do anything with the mail module (I know, they're in the same binary though)).<br></div><div><br></div><blockquote type="cite" id="qt"><div>Additionally, consider configuring debug logging.  Given that it's <br></div><div>slow gathering cores, normal debug logging might not be an option, <br></div><div>though configuring large enough memory buffer might work, see <br></div><div>here:<br></div></blockquote><div><br></div><div>Working on this!<br></div><div><br></div><div>Rob N.<br></div></body></html>