From: Koichi S. <koi...@gm...> - 2013-03-08 02:31:46
|
Yes, memory context usage of this part is not correct and it leaves garbage. I will commit it if no further input is given. Regards; ---------- Koichi Suzuki 2013/3/7 Nikhil Sontakke <ni...@st...>: > Hi, > > PFA, patch which fixes an obnoxious crash in GTM Standby. This one was > a tough nut to crack down. The crash is as below > > Program terminated with signal 11, Segmentation fault. > #0 0x00000000004253c9 in gtm_lappend () > Missing separate debuginfos, use: debuginfo-install > glibc-2.12-1.80.el6_3.6.x86_64 libgcc-4.4.6-4.el6.x86_64 > (gdb) bt > #0 0x00000000004253c9 in gtm_lappend () > #1 0x000000000040ad77 in GTM_BkupBeginTransactionGetGXIDMulti.clone.0 () > #2 0x000000000040aedb in ProcessBkupBeginTransactionGetGXIDCommand () > #3 0x000000000040417c in GTM_ThreadMain () > > > > IMHO, using TopMemoryContext to mean the top context of each thread is > pretty confusing. Bad choice of name for the memory context according > to me. Maybe we could have avoided this crash if we had used a > different name for the context. > > This "TopMemoryContext" goes away when that thread goes away. So ain't > nothing TOP about it. The GTMTransactions.gt_open_transactions list > was being appended to using this memory context. So later if another > thread came in (and the earlier appending thread had been cleaned up), > it will find garbage in this list and this was causing the crash. > > I always saw a couple of threads being cleaned up in the gtm standby > logs just prior to the crash. The fix is to use TopMostMemoryContext. > If it were to me I would re-haul this TopMemoryContext naming business > in GTM. Am sure people will get confused in the future too when they > write code.. > > Regards, > Nikhils > -- > StormDB - http://www.stormdb.com > The Database Cloud > Postgres-XC Support and Service > > ------------------------------------------------------------------------------ > Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester > Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the > endpoint security space. For insight on selecting the right partner to > tackle endpoint security challenges, access the full report. > http://p.sf.net/sfu/symantec-dev2dev > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > |