<P>I'm resending the message as a reminder.</P><P>I'm adding my findings at the bottom.</P><P> </P><P>><FONT FACE="Courier">I have one of those nasty problems, with Postgres backend often crashing<BR>>with signal 11.<BR>></FONT><BR>><FONT FACE="Courier">I'll do my best to give you the details:<BR>></FONT><BR>><FONT FACE="Courier">Postgres is 7.2.1, more exactly is Debian package 7.2.1-2 from the Stable<BR>>(Woody) distribution -- I'm forwarding copy of this message to Debian's<BR>>package mantainer.<BR>></FONT><BR>><FONT FACE="Courier">Postgres is running as a backend for a well known italian web site, running<BR>>on Zope (version 2.6.1 with psycopg Python adapter, v.1.1)<BR>></FONT><BR>><FONT FACE="Courier">The problem is recent, i.e. never happened until last month or so, on this<BR>>same setup.<BR>>I have a few other machines, running the same software setup, but different<BR>>Zope sites, never experiencing any problem.<BR>></FONT><BR>><FONT FACE="Courier">These are the relevant lines from syslog<BR>></FONT><BR>><FONT FACE="Courier">Feb 20 14:43:53 speed postgres[13365]: [25] DEBUG: server process (pid<BR>>15906) was terminated by signal 11<BR>>Feb 20 14:43:53 speed postgres[13365]: [26] DEBUG: terminating any other<BR>>active server processes<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-1] NOTICE: Message from<BR>>PostgreSQL backend:<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-2] ^IThe Postmaster has informed<BR>>me that some other backend<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-3] ^Idied abnormally and<BR>>possibly corrupted shared memory.<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-4] ^II have rolled back the<BR>>current transaction and am<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-5] ^Igoing to terminate your<BR>>database system connection and exit.<BR>>Feb 20 14:43:53 speed postgres[15908]: [26-6] ^IPlease reconnect to the<BR>>database system and repeat your query.<BR>>Feb 20 14:43:53 speed postgres[15904]: [26-1] NOTICE: Message from<BR>>PostgreSQL backend:<BR>>Feb 20 14:43:53 speed postgres[15904]: [26-2] ^IThe Postmaster has informed<BR>>me that some other backend<BR>>Feb 20 14:43:53 speed postgres[15904]: [26-3] ^Idied abnormally and<BR>>possibly corrupted shared memory.<BR>>Feb 20 14:43:53 speed postgres[15904]: [26-4] ^II have rolled back the<BR>>current transaction and am<BR>></FONT><BR>><FONT FACE="Courier">I immediately thought of an hardware problem but, having an equivalent<BR>>machine online, I dumped the db and moved to that.<BR>>The problem manifestated at once on the other machine, which had previously<BR>>(~1 month before) run the site without any error.<BR>></FONT><BR>><FONT FACE="Courier">The two machines have the same software setup, but different Linux kernels<BR>>(2.4.19 vs 2.4.20, reiserfs vs ext3), and different hardware.<BR>></FONT><BR>><FONT FACE="Courier">I cannot reproduce the problem reliably, though on the production machine<BR>>the database crashes many times an hour.<BR>></FONT><BR>><FONT FACE="Courier">It _seems_ to be related to some mildly convoluted query (a SELECT only<BR>>query). Running that query manually, I managed to crash the backend only<BR>>once.<BR>>VACUUM FULL never gave any error, nor did pg_dump.<BR>></FONT><BR>><FONT FACE="Courier">I obtained some (pretty large, ~90MB) core files from the crashes. The<BR>>backtrace is consistent between the files, here it is:<BR>></FONT><BR>><FONT FACE="Courier">#0 0x08157e92 in MemoryContextReset ()<BR>>#1 0x08157eb9 in MemoryContextResetChildren ()<BR>>#2 0x08157e8b in MemoryContextReset ()<BR>>#3 0x08157eb9 in MemoryContextResetChildren ()<BR>>#4 0x08157e8b in MemoryContextReset ()<BR>>#5 0x080c5c88 in ExecScan ()<BR>>#6 0x080cb61a in ExecSeqScan ()<BR>>#7 0x080c4139 in ExecProcNode ()<BR>>#8 0x080cbe2c in ExecSort ()<BR>>#9 0x080c41c9 in ExecProcNode ()<BR>>#10 0x080ca630 in ExecMergeJoin ()<BR>>#11 0x080c4189 in ExecProcNode ()<BR>>#12 0x080cbe2c in ExecSort ()<BR>>#13 0x080c41c9 in ExecProcNode ()<BR>>#14 0x080cc0ae in ExecUnique ()<BR>>#15 0x080c41d9 in ExecProcNode ()<BR>>#16 0x080cd5d5 in ExecReScanSetParamPlan ()<BR>>#17 0x080c5cac in ExecScan ()<BR>>#18 0x080cd5f6 in ExecSubqueryScan ()<BR>>#19 0x080c4169 in ExecProcNode ()<BR>>#20 0x080c73f8 in ExecProcAppend ()<BR>>#21 0x080c4129 in ExecProcNode ()<BR>>#22 0x080cbe2c in ExecSort ()<BR>>#23 0x080c41c9 in ExecProcNode ()<BR>>#24 0x080cb9a6 in ExecSetOp ()<BR>>#25 0x080c41e9 in ExecProcNode ()<BR>>#26 0x080cbe2c in ExecSort ()<BR>>#27 0x080c41c9 in ExecProcNode ()<BR>>#28 0x080c30fe in ExecutorEnd ()<BR>>#29 0x080c2797 in ExecutorRun ()<BR>>#30 0x081104de in ProcessQuery ()<BR>>#31 0x0810ed70 in pg_exec_query_string ()<BR>>#32 0x0810fd5e in PostgresMain ()<BR>>#33 0x080f6d4e in ClosePostmasterPorts ()<BR>>#34 0x080f669f in ClosePostmasterPorts ()<BR>>#35 0x080f5882 in PostmasterMain ()<BR>>#36 0x080f5391 in PostmasterMain ()<BR>>#37 0x080d4e18 in main ()<BR>>#38 0x401d114f in __libc_start_main () from /lib/libc.so.6</FONT></P><P> </P><P><FONT FACE="Courier">As it turned out, switching to 7.2.4 gave no result. The errors are still there.</FONT></P><P><FONT FACE="Courier">But, now, at least I've a clue. It seemed that the error was triggered almost exclusively by a search funcion on the web site. </FONT></P><P><FONT FACE="Courier">The code turned out to call extensively the to_ascii() function of Postgres. I have reason to suspect that the database contains, in text fields, characters which do not pertain to the selected encoding (LATIN1).</FONT></P><P><FONT FACE="Courier">So, I fancied, one possible culprit was the to_ascii function chocking on some strange character.</FONT></P><P><FONT FACE="Courier">I replaced the occurences of to_ascii with a custum function that calls to_ascii only on the result of a translate, which in turn converts some strange (russian?) characters to plain ascii.</FONT></P><P><FONT FACE="Courier">The errors dropped down, the few remaining don't seem to be related to that search function.</FONT></P><P><FONT FACE="Courier">Of course, this is not conclusive, I've yet to reproduce reliably the error on a single, selected data row, but I think what i found it's worth reporting.</FONT></P><P> </P><P><FONT FACE="Courier">Thanks to the developing team!</FONT></P><P> </P><P><FONT FACE="Courier">ciao</FONT></P><P><FONT FACE="Courier">Guido</FONT></P><P></P>