Bug #456: postgres dumps core in initlocalbuffer
Bug #456: postgres dumps core in initlocalbuffer
От:
pgsql-bugs@postgresql.org
Дата:
Florian Baumert (fb@plt.de) reports a bug with a severity of 1 The lower the number the more severe it is. Short Description postgres dumps core in initlocalbuffer Long Description Hi, first of all: postgres normally works very well. But in one case, postgres dumps core, which prevents our project from being finshed. Information: postgres 7.0.3, redhat 6.2, postgres compiled under redhat 7.1, linked statically (this works well!). Machine has 256 Mb Memory, uses nearly no swap. As said, most things work fine, but one part is a connection from a ODBC-Client Application. This also normally works fine, but for one configuration it does not. The client uses Windows 2000, ODBC-Driver 6.5.0 (I think). Postgres dumps core after some time, if the odbc application opens a new connection. To clarify this: there are transactions going through, but at some point in time (random), the newly started postgres crashes at once. postgres-config: /home/postgres7/bin/postmaster -o -o /var/log/postgres7.err.log -p 5433 -i -N 256 -S -o -F -o -S1024 -B1024 -o -B1024 -D/home/postgres7 There are at most 100 servers running... Many thanks for you help, if there are questions, please ask! Greetings Florian P.S. the machine is NOT out of memory! :-) And it already happened, when the executable has been compiled on the same machine! Stacktrace is: #0 0x812ac0c in chunk_free (ar_ptr=0x81cb860, p=0xd4ef05d3) at malloc.c:3125 #1 0x812a4d3 in chunk_alloc (ar_ptr=0x81cb860, nb=7176) at malloc.c:2612 #2 0x8129f8f in __libc_malloc (bytes=7168) at malloc.c:2714 #3 0x80cb396 in InitLocalBuffer () at localbuf.c:223 #4 0x810f8b4 in InitPostgres (dbname=0xbfffecd0 "121dmagent") at postinit.c:246 #5 0x80d53d4 in PostgresMain (argc=11, argv=0xbffff190, real_argc=17, real_argv=0xbffffb94) at postgres.c:1416 #6 0x80bee58 in DoBackend (port=0x8233250) at postmaster.c:2009 #7 0x80bea26 in BackendStartup (port=0x8233250) at postmaster.c:1776 #8 0x80bdc45 in ServerLoop () at postmaster.c:1037 #9 0x80bd62f in PostmasterMain (argc=17, argv=0xbffffb94) at postmaster.c:725 #10 0x80917fe in main (argc=17, argv=0xbffffb94) at main.c:93 #11 0x8119732 in __libc_start_main (main=0x8091784, argc=17, ubp_av=0xbffffb94, init=0x80480b4 <_init>, fini=0x8170220 <_fini>, rtld_fini=0, stack_end=0xbffffb8c) at ../sysdeps/generic/libc-start.c:129 Sample Code No file was uploaded with this report
Re: Bug #456: postgres dumps core in initlocalbuffer
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
pgsql-bugs@postgresql.org writes: > Stacktrace is: > #0 0x812ac0c in chunk_free (ar_ptr=0x81cb860, p=0xd4ef05d3) at malloc.c:3125 > #1 0x812a4d3 in chunk_alloc (ar_ptr=0x81cb860, nb=7176) at malloc.c:2612 > #2 0x8129f8f in __libc_malloc (bytes=7168) at malloc.c:2714 This looks like malloc's bookkeeping data structures must have gotten clobbered, perhaps by a wild store operation or freeing a chunk twice or some such. The error is doubtless somewhere in the postmaster, not in InitLocalBuffer. Before you expend effort trying to hunt it down, I'd suggest updating to the latest stable release, 7.1.3 --- the problem may be fixed already. If that doesn't help, consider linking the postmaster with a debugging malloc package, such as Electric Fence... regards, tom lane
Re: Bug #456: postgres dumps core in initlocalbuffer
От:
Florian Baumert <fb@plt.de>
Дата:
Hi, thank you for your fast answer. I will try to upgrade, with over 20 production databases not a one-hour job :-) I will report results to you... Am I the only one, where this occured?? Greetings Florian Tom Lane wrote: > > pgsql-bugs@postgresql.org writes: > > Stacktrace is: > > > #0 0x812ac0c in chunk_free (ar_ptr=0x81cb860, p=0xd4ef05d3) at malloc.c:3125 > > #1 0x812a4d3 in chunk_alloc (ar_ptr=0x81cb860, nb=7176) at malloc.c:2612 > > #2 0x8129f8f in __libc_malloc (bytes=7168) at malloc.c:2714 > > This looks like malloc's bookkeeping data structures must have gotten > clobbered, perhaps by a wild store operation or freeing a chunk twice > or some such. The error is doubtless somewhere in the postmaster, > not in InitLocalBuffer. Before you expend effort trying to hunt it > down, I'd suggest updating to the latest stable release, 7.1.3 --- > the problem may be fixed already. If that doesn't help, consider > linking the postmaster with a debugging malloc package, such as Electric > Fence... > > regards, tom lane