<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=FR link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have recently reorganized my systems/channels layout which led to “bigger” channels (highest has ~200 systems subscribed)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Since then, my nightly errata update using CEFS randomly fails while publishing errata due to a deadlock issue.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Browsing postgresql logs shows this :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>2015-08-24 07:16:04.973 CEST ERROR:  deadlock detected<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>2015-08-24 07:16:04.973 CEST DETAIL:  Process 14035 waits for ShareLock on transaction 28449435; blocked by process 13058.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>        Process 13058 waits for ShareLock on transaction 28449406; blocked by process 14035.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>        Process 14035: UPDATE rhnTaskQueue<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        SET earliest = $1<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                        WHERE task_data = $2<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>        Process 13058: select * from rhn_channel.update_needed_cache($1) as result<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>This seem to be a different bug than <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1234604">https://bugzilla.redhat.com/show_bug.cgi?id=1234604</a> and affiliates, which concerns rhn_>server<.update_needed_cache()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>From what I see, although not being a code expert, the only thing that executes the first query is the method channelSoftware.scheduleErrataCacheUpdate(org,channel,delay), so my guess would be that something deadlocks with itself…<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Is it possible that I have some sort of corruption, or should I file a bug to redhat ?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>(Unless this bug has already been filed, but I failed to find something similar)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Code sources :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Rhn_channel.update_needed_cache(channel_id) : https://github.com/spacewalkproject/spacewalk/blob/c4fd15d05a781cc65c5be4b6e1f1623facd5e7d1/schema/spacewalk/oracle/packages/rhn_channel.pkb<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Queue_server(server_id, immediate) : <a href="https://github.com/spacewalkproject/spacewalk/blob/7ba700f07acebfac6612e9a6cf2dcf942a4e1ecc/schema/spacewalk/oracle/procs/queue_server.sql">https://github.com/spacewalkproject/spacewalk/blob/7ba700f07acebfac6612e9a6cf2dcf942a4e1ecc/schema/spacewalk/oracle/procs/queue_server.sql</a><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>channelSoftwareHandler.java :<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>https://github.com/spacewalkproject/spacewalk/blob/219911a2727090ac775fc0156e24867626df49be/java/code/src/com/redhat/rhn/frontend/xmlrpc/channel/software/ChannelSoftwareHandler.java<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Maxime Veroone<o:p></o:p></span></p></div></body></html>