<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 488: The use of palloc in gtm/gtm_proxy will cause a crash at some situation</title><link>https://sourceforge.net/p/postgres-xc/bugs/488/</link><description>Recent changes to 488: The use of palloc in gtm/gtm_proxy will cause a crash at some situation</description><atom:link href="https://sourceforge.net/p/postgres-xc/bugs/488/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 04 Aug 2014 07:59:48 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/postgres-xc/bugs/488/feed.rss" rel="self" type="application/rss+xml"/><item><title>#488 The use of palloc in gtm/gtm_proxy will cause a crash at some situation</title><link>https://sourceforge.net/p/postgres-xc/bugs/488/?limit=25#9b2b/4b5d</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I have merged your code, and it works well. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">peace zone</dc:creator><pubDate>Mon, 04 Aug 2014 07:59:48 -0000</pubDate><guid>https://sourceforge.netfc678d133f1f808aba11a0f4ab027ca87df52910</guid></item><item><title>#488 The use of palloc in gtm/gtm_proxy will cause a crash at some situation</title><link>https://sourceforge.net/p/postgres-xc/bugs/488/?limit=25#9b2b</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for the report. ISTM that we should create the memory context before we start processing the config file. As this example shows, set_config_option() may try to palloc memory which will fail if the memory context is not up. I propose attached patch. Please try and let us know.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pavan Deolasee</dc:creator><pubDate>Fri, 01 Aug 2014 07:09:52 -0000</pubDate><guid>https://sourceforge.net06f5a83583d3c4f244b0ac4485aa308308be9f4a</guid></item><item><title>The use of palloc in gtm/gtm_proxy will cause a crash at some situation</title><link>https://sourceforge.net/p/postgres-xc/bugs/488/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;reproduce Step:&lt;br /&gt;
    1. set the "log_min_messages = DEUBG5" in gtm_proxy.conf -- DEUBG5 not DEBUG5&lt;br /&gt;
    2. gtm_proxy -D gtm_proxy.conf&lt;/p&gt;
&lt;p&gt;stack info:&lt;br /&gt;
Program terminated with signal 11, Segmentation fault.&lt;/p&gt;
&lt;h1 id="0-0x00000000004131d1-in-initstringinfo-str0x7fffffffdde0-at-stringinfoc89"&gt;0 0x00000000004131d1 in initStringInfo (str=0x7fffffffdde0) at stringinfo.c:89&lt;/h1&gt;
&lt;p&gt;89  str-&amp;gt;data = (char *) palloc(size);&lt;br /&gt;
Missing separate debuginfos, use: debuginfo-install glibc-2.17-55.el7.x86_64&lt;br /&gt;
(gdb) b&lt;br /&gt;
Breakpoint 1 at 0x4131d1: file stringinfo.c, line 89.&lt;br /&gt;
(gdb) bt&lt;/p&gt;
&lt;h1 id="0-0x00000000004131d1-in-initstringinfo-str0x7fffffffdde0-at-stringinfoc89_1"&gt;0 0x00000000004131d1 in initStringInfo (str=0x7fffffffdde0) at stringinfo.c:89&lt;/h1&gt;
&lt;h1 id="1-0x00000000004182d1-in-config_enum_get_options-record0x636380-wzxhzdk0-prefix0x42bb59-available-values-suffix0x42bb57"&gt;1 0x00000000004182d1 in config_enum_get_options (record=0x636380 &amp;lt;ConfigureNamesEnum&amp;gt;, prefix=0x42bb59 "Available values: ", suffix=0x42bb57 ".",&lt;/h1&gt;
&lt;p&gt;separator=0x42bb54 ", ") at gtm_opt_handler.c:1853&lt;/p&gt;
&lt;h1 id="2-0x00000000004196d3-in-set_config_option-name0x63cba0-log_min_messages-value0x63cbc0-deubg5-contextgtmc_startup-sourcegtmc_s_file"&gt;2 0x00000000004196d3 in set_config_option (name=0x63cba0 "log_min_messages", value=0x63cbc0 "DEUBG5", context=GTMC_STARTUP, source=GTMC_S_FILE,&lt;/h1&gt;
&lt;p&gt;changeVal=0 '\000') at gtm_opt_handler.c:2529&lt;/p&gt;
&lt;h1 id="3-0x0000000000415d4a-in-processconfigfile-contextgtmc_startup-at-gtm_opt_handlerc202"&gt;3 0x0000000000415d4a in ProcessConfigFile (context=GTMC_STARTUP) at gtm_opt_handler.c:202&lt;/h1&gt;
&lt;h1 id="4-0x0000000000417923-in-selectconfigfiles-userdoption0x638140-datapgxcnodesgtm_pxy-progname0x42cba0-gtm_proxy-at-gtm_opt_handlerc1441"&gt;4 0x0000000000417923 in SelectConfigFiles (userDoption=0x638140 "/data/pgxc/nodes/gtm_pxy", progname=0x42cba0 "gtm_proxy") at gtm_opt_handler.c:1441&lt;/h1&gt;
&lt;h1 id="5-0x0000000000421d50-in-main-argc3-argv0x7fffffffe1d8-at-proxy_mainc687"&gt;5 0x0000000000421d50 in main (argc=3, argv=0x7fffffffe1d8) at proxy_main.c:687&lt;/h1&gt;
&lt;p&gt;Apparently the use of palloc causes the core dump, there is no MemoryContext in gtm/gtm_proxy.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">peace zone</dc:creator><pubDate>Thu, 31 Jul 2014 09:05:01 -0000</pubDate><guid>https://sourceforge.net21028c17e248b17837c033f5fa629fcea165b0d9</guid></item></channel></rss>