Return-Path: X-Original-To: apmail-trafficserver-users-archive@www.apache.org Delivered-To: apmail-trafficserver-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87E30CFE1 for ; Thu, 20 Jun 2013 17:31:32 +0000 (UTC) Received: (qmail 83579 invoked by uid 500); 20 Jun 2013 17:31:32 -0000 Delivered-To: apmail-trafficserver-users-archive@trafficserver.apache.org Received: (qmail 83393 invoked by uid 500); 20 Jun 2013 17:31:31 -0000 Mailing-List: contact users-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@trafficserver.apache.org Delivered-To: mailing list users@trafficserver.apache.org Received: (qmail 83385 invoked by uid 99); 20 Jun 2013 17:31:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 17:31:30 +0000 X-ASF-Spam-Status: No, hits=-2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_HI,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Steve.Owens@disney.com designates 204.128.192.17 as permitted sender) Received: from [204.128.192.17] (HELO msg1.disney.com) (204.128.192.17) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jun 2013 17:31:22 +0000 Received: from int2.disney.pvt (int2.disney.pvt [153.7.110.7]) by msg1.disney.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r5KHV0aH002413 for ; Thu, 20 Jun 2013 17:31:00 GMT Received: from sm-cala-xht01.swna.wdpr.disney.com (SM-CALA-XHT01.swna.wdpr.disney.com [153.7.248.16]) by int2.disney.pvt (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r5KHUZXq023908 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Thu, 20 Jun 2013 17:30:59 GMT Received: from sm-cala-vxmb06a.swna.wdpr.disney.com ([fe80::8920:73be:eaf5:e3af]) by sm-cala-xht01.swna.wdpr.disney.com ([2002:9907:f810::9907:f810]) with mapi; Thu, 20 Jun 2013 10:30:51 -0700 From: "Owens, Steve" To: "users@trafficserver.apache.org" Date: Thu, 20 Jun 2013 10:30:48 -0700 Subject: Traffic server segfaults under valgrind but not on it's own. Thread-Topic: Traffic server segfaults under valgrind but not on it's own. Thread-Index: Ac5t2+jKDH4ZDjkUT6CbnkdqV/pvYA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.12.0.110505 acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_CDE88A582776Csteveowensemaildisneycom_" MIME-Version: 1.0 X-Flow-Control: Sendmail Flow Controller v2.2.5 int2.disney.pvt r5KHUZXq023908 X-Flow-Control-Info: class=Exchange rcpts=1 size=5122 X-Virus-Checked: Checked by ClamAV on apache.org --_000_CDE88A582776Csteveowensemaildisneycom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I was running some valgrind tests on trafficserver to test my plugin for me= mory leaks. At any rate code that runs perfectly fine with just traffic server running = ends up segfaulting when trafficserver is running behind valgrind. Here is the tail output of the valgrind log showing the segfault. [Jun 20 10:28:01.181] Server {0x79d4940} DIAG: (ApiMgmtPlugin::JsonPTransfo= rmationHandler::callbackHandler) Current state =3D STATE_EXIT: output_vio.n= bytes =3D 33314; output_vio.ndone=3D 33314. [Jun 20 10:28:01.183] Server {0x79d4940} DIAG: (ApiMgmtPlugin::JsonPTransfo= rmationHandler::callbackHandler) Checking integrity of input_vio to see if = it is OK to TSContCall(TSVIOContGet(input_vio), TS_EVENT_VCONN_WRITE_COMPLE= TE, input_vio); [Jun 20 10:28:01.188] Server {0x79d4940} DIAG: (ApiMgmtPlugin::JsonPTransfo= rmationHandler::callbackHandler) TSAssert(input_vio) succeeds; calling TSCo= ntCall(TSVIOContGet(input_vio), TS_EVENT_VCONN_WRITE_COMPLETE, input_vio) NOTE: Traffic Server received Sig 11: Segmentation fault /usr/local/bin/traffic_server - STACK TRACE: /lib64/libpthread.so.0[0x337140ebe0] /usr/local/bin/traffic_server(_ZN10HttpTunnel16consumer_handlerEiP18HttpTun= nelConsumer+0xb0)[0x573340] /usr/local/bin/traffic_server(_ZN10HttpTunnel12main_handlerEiPv+0x82)[0x573= 552] /usr/local/lib/trafficserver/plugins/libJsonPTransformationHandlerPlugin.so= (_ZN11apim_plugin26JsonPTransformationHandler15callbackHandlerEP10tsapi_con= t7TSEventPv+0x295)[0x10e58389] /usr/local/bin/traffic_server(_ZN17TransformTerminus12handle_eventEiPv+0xd2= 2)[0x4eabf2] /usr/local/bin/traffic_server(_ZN7EThread13process_eventEP5Eventi+0x22f)[0x= 6b9b7f] /usr/local/bin/traffic_server(_ZN7EThread7executeEv+0x1aa)[0x6ba07a] /usr/local/bin/traffic_server[0x6b8fce] /lib64/libpthread.so.0[0x337140677d] /lib64/libc.so.6(clone+0x6d)[0x3370cd3c1d] Killed The segfault occurs on the call to TSContCall(TSVIOContGet(input_vio), TS_E= VENT_VCONN_WRITE_COMPLETE, input_vio). Yet immediately prior to this a call ws made to TSAssert(input_vio) and no = assertion was thrown. --_000_CDE88A582776Csteveowensemaildisneycom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I was running some valgr= ind tests on trafficserver to test my plugin for memory leaks.
At any rate code that runs perfectly fine with just traffic se= rver running ends up segfaulting when trafficserver is running behind valgr= ind.

Here is the tail output of the valgrind log s= howing the segfault.

[Jun 20 10:28:01.181] Se= rver {0x79d4940} DIAG: (ApiMgmtPlugin::JsonPTransformationHandler::callback= Handler) Current state =3D STATE_EXIT: output_vio.nbytes =3D 33314; output_= vio.ndone=3D 33314.
[Jun 20 10:28:01.183] Server {0x79d4940} DIAG= : (ApiMgmtPlugin::JsonPTransformationHandler::callbackHandler) Checking int= egrity of input_vio to see if it is OK to TSContCall(TSVIOContGet(input_vio= ), TS_EVENT_VCONN_WRITE_COMPLETE, input_vio);
[Jun 20 10:28:01.18= 8] Server {0x79d4940} DIAG: (ApiMgmtPlugin::JsonPTransformationHandler::cal= lbackHandler) TSAssert(input_vio) succeeds; calling TSContCall(TSVIOContGet= (input_vio), TS_EVENT_VCONN_WRITE_COMPLETE, input_vio)
NOTE: Traf= fic Server received Sig 11: Segmentation fault
/usr/local/bin/tra= ffic_server - STACK TRACE: 
/lib64/libpthread.so.0[0x337140e= be0]
/usr/local/bin/traffic_server(_ZN10HttpTunnel16consumer_hand= lerEiP18HttpTunnelConsumer+0xb0)[0x573340]
/usr/local/bin/traffic= _server(_ZN10HttpTunnel12main_handlerEiPv+0x82)[0x573552]
/usr/lo= cal/lib/trafficserver/plugins/libJsonPTransformationHandlerPlugin.so(_ZN11a= pim_plugin26JsonPTransformationHandler15callbackHandlerEP10tsapi_cont7TSEve= ntPv+0x295)[0x10e58389]
/usr/local/bin/traffic_server(_ZN17Transf= ormTerminus12handle_eventEiPv+0xd22)[0x4eabf2]
/usr/local/bin/tra= ffic_server(_ZN7EThread13process_eventEP5Eventi+0x22f)[0x6b9b7f]
= /usr/local/bin/traffic_server(_ZN7EThread7executeEv+0x1aa)[0x6ba07a]
<= div>/usr/local/bin/traffic_server[0x6b8fce]
/lib64/libpthread.so.= 0[0x337140677d]
/lib64/libc.so.6(clone+0x6d)[0x3370cd3c1d]
<= div>Killed

The segfault occurs on the call t= o TSContCall(TSVIOContGet(input_vio), TS_EVENT_VCONN_WRITE_COMPLETE, i= nput_vio).
Yet immediately prior to this a call ws made to TSAsse= rt(input_vio) and no assertion was thrown.


--_000_CDE88A582776Csteveowensemaildisneycom_--