Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1E3C810716 for ; Thu, 5 Dec 2013 22:55:56 +0000 (UTC) Received: (qmail 17131 invoked by uid 500); 5 Dec 2013 22:55:56 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 17043 invoked by uid 500); 5 Dec 2013 22:55:55 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Delivered-To: moderator for dev@trafficserver.apache.org Received: (qmail 4323 invoked by uid 99); 5 Dec 2013 17:00:55 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dmorilha@gmail.com designates 209.85.214.53 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MuAomVt8dhd52snqXD1avbUsjGa9qFQoy3kw2i3jEs0=; b=PKJjUJpOA9LKHEd4G+e1T14gppVteJGBulEKtdzUb2XhGo/kpCzhsh8QNrnvtUqci2 +XVYugvhpuLjyH1E03FtDBopkGuAUqtqlB8z6dampzS5ubsmVu4oyfjHXeJmqZaM5DoJ VBKjeZso4hP/I2/nKMqXFE3RfarXGpZwTCn2yzefLpSnVprI3QDpXh3HCLFfOaOURCCg 6PlC07hPCCIeIrRDVnMKzdN2ZxSGt3zDHggBRZdHf92yQFKQdhbWU9v2QkPgzTFK8ty9 ASmitZ/Y6D2Pr0DNL1pS+rs1OFMp47gi5usp+Pke+K3toCh1iCG50I/lxsYzGPnJkmWu TnSQ== MIME-Version: 1.0 X-Received: by 10.204.66.8 with SMTP id l8mr117235bki.141.1386262827882; Thu, 05 Dec 2013 09:00:27 -0800 (PST) In-Reply-To: References: Date: Thu, 5 Dec 2013 09:00:27 -0800 Message-ID: Subject: Re: coredump on TSVConnWrite From: Daniel Morilha To: users@trafficserver.apache.org, dev@trafficserver.apache.org Content-Type: multipart/alternative; boundary=001a1132f6206c002104eccc77b2 X-Virus-Checked: Checked by ClamAV on apache.org --001a1132f6206c002104eccc77b2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Forgot to mention this is ats 402 9 and 401 7 thanks On Dec 5, 2013 8:57 AM, "Daniel Morilha" wrote: > Hi, > > I am facing sporadic SEGFAULTS when calling TSVConnWrite from a custom > plug-in that I am not able to easily reproduce. > > TSVConnWrite (connp=3D0x2aec640b5620, contp=3D0x2aec640b5da0, > readerp=3D0x2aec7c110c88, nbytes=3D9223372036854775807) at InkAPI.cc:6258 > > =E2=80=8BThings make me believe this is coming from the =E2=80=8BFORCE_PL= UGIN_MUTEX macro; > if not it might be then subsequent call to vc->do_io_write(). > > I am able to see the contp has a "valid" mutex. > > Any ideas from here? Any good practices I should be taking before calling > TSVConnWrite on my code? > > I am dumping a lot of data so it might ring the bells for people more > familiar with the TS internals... > > Thanks in advance... > > > > > *(gdb) bt* > #0 0x0000000000000000 in ?? () > #1 0x00000000004b33de in TSVConnWrite (connp=3D0x2aec640b5620, > contp=3D0x2aec640b5da0, > readerp=3D0x2aec7c110c88, nbytes=3D9223372036854775807) at InkAPI.cc:= 6258 > #2 0x00002aec00ae11dc in write (s=3D9223372036854775807, r=3D, > c=3D0x2aec640b5da0, > v=3D) at ats.hpp:285 > #3 write (r=3D, c=3D0x2aec640b5da0, v=3D) = at > ats.hpp:289 > #4 Output (continuation=3D0x2aec640b5da0, consumer=3D, > this=3D0x2aec3c03de50) at ats.hpp:1508 > > > > > *(gdb) info line 6258* > Line 6258 of "InkAPI.cc" > starts at address 0x4b33c8 TSIOBufferReader, int64_t)+136> > and ends at 0x4b33e9 int64_t)+169>. > > > > *(gdb) disas 0x00000000004b33b4,0x00000000004b3410* > Dump of assembler code from 0x4b33b4 to 0x4b3410: > 0x00000000004b33b4 int64_t)+116>: callq 0x4850c8 > 0x00000000004b33b9 int64_t)+121>: mov 0x18(%rbx),%rsi > 0x00000000004b33bd int64_t)+125>: mov %rax,%rdx > 0x00000000004b33c0 int64_t)+128>: mov %rsp,%rdi > 0x00000000004b33c3 int64_t)+131>: callq 0x4ba130 EThread*)> > *0x00000000004b33c8* int64_t)+136>: mov 0x0(%rbp),%rax > 0x00000000004b33cc int64_t)+140>: xor %r8d,%r8d > 0x00000000004b33cf int64_t)+143>: mov %r14,%rcx > 0x00000000004b33d2 int64_t)+146>: mov %r13,%rdx > 0x00000000004b33d5 int64_t)+149>: mov %rbx,%rsi > 0x00000000004b33d8 int64_t)+152>: mov %rbp,%rdi > 0x00000000004b33db int64_t)+155>: callq *0x18(%rax) > *=3D> *0x00000000004b33de int64_t)+158>: mov %rax,%rbx > 0x00000000004b33e1 int64_t)+161>: mov %rsp,%rdi > 0x00000000004b33e4 int64_t)+164>: callq 0x4ba5e0 > *0x00000000004b33e9* int64_t)+169>: mov %rbx,%rax > 0x00000000004b33ec int64_t)+172>: mov 0x18(%rsp),%rbp > 0x00000000004b33f1 int64_t)+177>: mov 0x10(%rsp),%rbx > 0x00000000004b33f6 int64_t)+182>: mov 0x20(%rsp),%r12 > 0x00000000004b33fb int64_t)+187>: mov 0x28(%rsp),%r13 > 0x00000000004b3400 int64_t)+192>: mov 0x30(%rsp),%r14 > 0x00000000004b3405 int64_t)+197>: add $0x38,%rsp > 0x00000000004b3409 int64_t)+201>: retq > 0x00000000004b340a int64_t)+202>: nopw 0x0(%rax,%rax,1) > End of assembler dump. > > > > *=E2=80=8B=E2=80=8B(gdb) info vtbl *vc* > vtable for 'VConnection' @ 0x6adbd0 (subobject @ 0x2aec640b5620): > [0]: 0x4bb740 > [1]: 0x4bb650 > [2]: 0x4b2390 MIOBuffer*)> > *=E2=80=8B=E2=80=8B[3]: 0x4b2f70 IOBufferReader*, bool)>* > [4]: 0x4b2510 > [5]: 0x4b9780 > [6]: 0x5e8a20 > [7]: 0x4b9310 > [8]: 0x5e8a40 > [9]: 0x4a4b20 > [10]: 0x4a4b90 > > > > (gdb) set print object on > (gdb) print *vc > $1 =3D (INKVConnInternal) { =3D { =3D > { =3D { =3D { =3D > {_vptr.force_VFPT_to_top =3D 0x6adbd0 }, > handler =3D (int (Continuation::*)(Continuation * const, int, > void *)) 0x4b9460 , mutex > =3D {m_ptr =3D 0x2aec28017a90}, > link =3D {> =3D {next =3D 0x0}, prev =3D 0x= 0}}, > lerrno =3D 0}, }, > mdata =3D 0x2aec7c0bc060, > m_event_func =3D 0x2aec00adfa90 namespace)::handle namespace)::SecureSearch> >(TSCont, TSEvent, void*)>, m_event_count =3D 1= , > m_closed =3D 0, > m_deletable =3D 0, m_deleted =3D 0, m_free_magic =3D > INKCONT_INTERN_MAGIC_ALIVE}, m_read_vio =3D { > _cont =3D 0x0, nbytes =3D 0, ndone =3D 0, op =3D 0, buffer =3D {mbuf = =3D 0x0, > entry =3D 0x0}, vc_server =3D 0x0, > mutex =3D {m_ptr =3D 0x0}}, m_write_vio =3D {_cont =3D 0x2aec50170750= , nbytes > =3D 9223372036854775807, > ndone =3D 0, op =3D 2, buffer =3D {mbuf =3D 0x4214a00, entry =3D 0x42= 14a40}, > vc_server =3D 0x2aec640b5620, > mutex =3D {m_ptr =3D 0x2aec28017a90}}, m_output_vc =3D 0x2aec640bae40= } > > > > > -- > Daniel Morilha (dmorilha@gmail.com) > --001a1132f6206c002104eccc77b2--