Bug 148906

Summary: Deadlock when deleting activation keys
Product: Red Hat Satellite 5 Reporter: Mike McCune <mmccune>
Component: OtherAssignee: James Slagle <jslagle>
Status: CLOSED CURRENTRELEASE QA Contact: Vlady Zlatkin <vzlatkin>
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: bretm, rhn-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHN 4.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-01 03:13:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 160105    

Description Mike McCune 2005-02-16 20:17:42 UTC
I see this traceback every day or so when someone is trying to delete activation
keys.  Probably worth investigating:

Return-Path: <dev-null.com>
Received: from mx1.util.phx.redhat.com (mx1.util.phx.redhat.com [10.8.4.92])
	by alertmail.util.phx.redhat.com (8.11.6/8.11.6) with ESMTP id j1EMKCM10871
	for <rhn-traceback.com>; Mon, 14 Feb 2005 17:20:12 -0500
Received: from rhnserver1.app.phx.redhat.com (nat-pool.util.phx.redhat.com
[10.8.5.200])
	by mx1.util.phx.redhat.com (8.11.6/8.11.6) with ESMTP id j1EMKCk08594
	for <rhn-traceback.com>; Mon, 14 Feb 2005 17:20:12 -0500
Received: (from apache@localhost)
	by rhnserver1.app.phx.redhat.com (8.11.6/8.11.6) id j1EMKBW13521;
	Mon, 14 Feb 2005 17:20:11 -0500
Date: Mon, 14 Feb 2005 17:20:11 -0500
Message-Id: <200502142220.j1EMKBW13521.phx.redhat.com>
To: rhn-traceback.com
From: Red Hat Network <dev-null.com>
Subject: WEB TRACEBACK from rhnserver1.app.phx.redhat.com (Mon Feb 14 17:20:11 2005)
Content-Type: text/plain; charset=US-ASCII
Errors-To: Red Hat Network <dev-null.com>
X-RHN-Email: rhn-traceback.com
X-RHN-Traceback-Severity: schema
Reply-to: rhn-traceback

The following exception occured while executing this request:
 POST /network/account/activation_keys/delete.pxt HTTP/1.1 (from browser)
 /network/account/activation_keys/delete.pxt (from Apache)

Date:
  Mon Feb 14 17:20:11 2005

Headers:
  Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Accept-Encoding: gzip,deflate
  Accept-Language: en-us,en;q=0.5
  Connection: close
  Content-Length: 76
  Content-Type: application/x-www-form-urlencoded
  Cookie: rh_auth_token=3932038:1108419604xddde7ed517788efc3955f63b0424d80c;
pxt-session-cookie=1240575088xa5b93e9416029bbd31b59c9815335b23
  Host: rhnapp.vip.phx.redhat.com
  Referer:
https://rhn.redhat.com/network/account/activation_keys/delete.pxt?tid=7823
  User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0
  Via: 1.1 rhn.redhat.com
  X-ENV-HTTPS: on
  X-Forwarded-For: 129.31.72.97
  X-Host: rhn.redhat.com
  X-Proxy-Forwarded-For: 129.31.72.97
  X-Proxy-Forwarded-Host: rhn.redhat.com
  X-Proxy-Forwarded-Server: rhn.redhat.com
  X-Replace-Content-Active: 1
  X-Server-Hostname: rhn.redhat.com

Form variables:
  Delete => Delete
  pxt:trap => rhn:delete_token_cb
  redirect_to => list.pxt
  tid => 7823

User Information:
  User sjs298 (id 3932038, org_id 3913397)

Error notes:
  (none)

Initial Request:
  Yes

Error message:
  RHN::Exception: DBD::Oracle::st execute failed: ORA-00060: deadlock detected
while waiting for resource (DBD ERROR: OCIStmtExecute) [for Statement "DELETE
  FROM rhnRegToken RT
 WHERE RT.id = ?
" with ParamValues: :p1='7823']
  RHN::DB /usr/lib/perl5/site_perl/5.6.1/i386-linux/RHN/DB.pm 215
RHN::Exception::DB::throw
  RHN::DB::Token /usr/lib/perl5/site_perl/5.6.1/i386-linux/RHN/DB/Token.pm 502
RHN::DB::handle_error
  Sniglets::ActivationKeys
/usr/lib/perl5/site_perl/5.6.1/i386-linux/Sniglets/ActivationKeys.pm 428
RHN::DB::Token::purge
  PXT::ApacheHandler
/usr/lib/perl5/site_perl/5.6.1/i386-linux/PXT/ApacheHandler.pm 611
Sniglets::ActivationKeys::delete_token_cb
  PXT::ApacheHandler
/usr/lib/perl5/site_perl/5.6.1/i386-linux/PXT/ApacheHandler.pm 110
PXT::ApacheHandler::pxt_parse_data
  PXT::ApacheHandler
/usr/lib/perl5/site_perl/5.6.1/i386-linux/PXT/ApacheHandler.pm 110 (eval)
  main /dev/null 0 PXT::ApacheHandler::handler
  main /dev/null 0 (eval)

Offending Query: DELETE
  FROM rhnRegToken RT
 WHERE RT.id = ?

Comment 1 James Slagle 2005-07-05 20:34:09 UTC
This got fixed when we pushed the several indexes to help with the delete server
deadlocking.  I haven't seen any of these tracebacks from production in quite a
while.

Comment 2 James Slagle 2005-07-05 20:42:08 UTC
You can use the testplan for the parent bug, 160105

Comment 3 Fanny Augustin 2005-07-20 20:16:06 UTC
Vlad,
This bug has the same testplan as one of your bugs: 160105.  Assigning to you,
so that when you close the other bug, you can just close this one. Thanks!

Comment 4 Vlady Zlatkin 2005-08-03 20:43:40 UTC
prod ready