dbTalk Databases Forums  

[BUGS] BUG #1216: pgcrypto:hmac() segfaults

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1216: pgcrypto:hmac() segfaults in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
PostgreSQL Bugs List
 
Posts: n/a

Default [BUGS] BUG #1216: pgcrypto:hmac() segfaults - 08-12-2004 , 03:16 PM







The following bug has been logged online:

Bug reference: 1216
Logged by: A Wu

Email address: sunwukong (AT) ieee (DOT) org

PostgreSQL version: 8.0 Beta

Operating system: Linux 2.6.7-gentoo-r13 x86_64

Description: pgcrypto:hmac() segfaults

Details:

Using a freshly initdb'd instance, compilation and installation of
contrib/pgcrypto went fine. Running 'make installcheck' forced a server
reset.

I've isolated it to this statement:

select hmac('Hi There',decode('0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b',
'hex'),'md5');

though I've confirmed the decode() statement on its own is fine.

The changed sections in the pgcrypto Makefile read:

# either 'builtin', 'mhash', 'openssl'
cryptolib = openssl

# either 'builtin', 'system'
cryptsrc = system

random = dev

The regression log reads:

test init ... ok
test md5 ... ok
test sha1 ... ok
test hmac-md5 ... FAILED
test hmac-sha1 ... FAILED
test blowfish ... FAILED
test rijndael ... FAILED
test crypt-des ... FAILED
test crypt-md5 ... FAILED
test crypt-blowfish ... FAILED
test crypt-xdes ... FAILED

The postgresql.log reads:

LOG: server process (PID 17390) was terminated by signal 11
LOG: terminating any other active server processes
FATAL: the database system is in recovery mode
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2004-08-12 10:39:14 MDT
LOG: checkpoint record is at 0/B53420
LOG: redo record is at 0/B53420; undo record is at 0/0; shutdown FALSE
LOG: next transaction ID: 591; next OID: 41804
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: record with zero length at 0/B53468
LOG: redo is not required
LOG: database system is ready
LOG: server process (PID 17398) was terminated by signal 11
LOG: terminating any other active server processes
LOG: all server processes terminated; reinitializing
LOG: database system was interrupted at 2004-08-12 10:40:57 MDT
LOG: checkpoint record is at 0/B53468
LOG: redo record is at 0/B53468; undo record is at 0/0; shutdown TRUE
LOG: next transaction ID: 591; next OID: 41804
LOG: database system was not properly shut down; automatic recovery in
progress
LOG: record with zero length at 0/B534B0
LOG: redo is not required
FATAL: the database system is starting up
LOG: database system is ready

Finally, the system log reads:

Aug 12 10:43:00 postmaster[17398]: segfault at 0000000000000020 rip
0000002a9594d565 rsp 0000007fbfffdbe8 error 4

Basic system setup:

gcc34-amd64-2004.1
gcc-3.4.1
glibc-2.3.4.20040619-r1
autoconf-2.59-r4
automake-1.8.3
openssl-0.9.7d-r1

CHOST="x86_64-pc-linux-gnu"

Postgresql was compiled with options:

--prefix=/usr/local --enable-integer-datetimes --disable-spinlocks
--enable-thread-safety --with-tcl --with-perl --with-python --with-pam
--with-openssl

plus

CFLAGS="-O2 -pipe -march=k8 -msse2 -mfpmath=sse"
CPPFLAGS="${CFLAGS}"



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] BUG #1216: pgcrypto:hmac() segfaults - 08-12-2004 , 04:40 PM






"PostgreSQL Bugs List" <pgsql-bugs (AT) postgresql (DOT) org> writes:
Quote:
Using a freshly initdb'd instance, compilation and installation of
contrib/pgcrypto went fine. Running 'make installcheck' forced a server
reset.
Works here. Must be some platform-specific issue ... I'm afraid you'll
have to do some debugging of your own.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.