Re: [ADMIN] Running Postgres on a HP-Ux 10.10 System

From: jwieck(at)debis(dot)com (Jan Wieck)
To: nippes(at)ums-ulm(dot)de
Cc: wieck(at)debis(dot)com, pgsql-admin(at)postgreSQL(dot)org
Subject: Re: [ADMIN] Running Postgres on a HP-Ux 10.10 System
Date: 1999-01-27 14:15:05
Message-ID: m105VkH-000EBQC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> #0 0xc00a9098 in memset ()
> (gdb) backtrace
> #0 0xc00a9098 in memset ()
> #1 0x15d0e8 in PostgresMain (argc=-534762622, argv=0x203cb000,
> real_argc=-534763790, real_argv=0x203cb000) at postgres.c:1582
> #2 0xe0202530 in ?? ()
> Cannot access memory at address 0x203cafe8.
>
> (gdb) frame 1
> #1 0x15d0e8 in PostgresMain (argc=-534762622, argv=0x203cb000,
> real_argc=-534763790, real_argv=0x203cb000) at postgres.c:1582
> 1582 MemSet(parser_input, 0, MAX_PARSE_BUFFER);
> (gdb) list
> 1577
> 1578 /* ----------------
> 1579 * (3) read a command.
> 1580 * ----------------
> 1581 */
> 1582 MemSet(parser_input, 0, MAX_PARSE_BUFFER);
> 1583
> 1584 firstchar = ReadCommand(parser_input);
> 1585
> 1586 QueryCancel = false; /* forget any earlier CANCEL sig
> nal */
> (gdb)

Bingo!

MemSet() is a macro in src/include/c.h which in this case
calls the real memset() library function (area to set is
greater than 64 bytes).

parser_input is a dynamic char array inside of
PostgresMain(), so it's part of the innermost stackframe.
This looks to me like the execution of longjmp() from the
elog() corrupted the stackframe of PostgresMain() instead of
restoring it as it should have done.

There are different kinds of jumps used depending on the
installation. One is setjmp()/longjmp() the other is
sigsetjmp()/siglongjmp(). If I recall correct, sigsetjmp() is
#defined to setjmp() if it isn't available.

So folks, low level HP/UX 10.10 know how required!

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

Browse pgsql-admin by date

  From Date Subject
Next Message Jan Kim 1999-01-27 14:57:58 Re: [ADMIN] [postgresql] problems compiling 6.4.2 on Solaris 2.6 :-(
Previous Message Nico De Ranter 1999-01-27 13:48:37 [postgresql] problems compiling 6.4.2 on Solaris 2.6 :-(