Bug 106954 - rpm crashes with EINVAL errors
rpm crashes with EINVAL errors
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
4.2
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-13 18:47 EDT by Fredrik Tolf
Modified: 2007-04-18 12:58 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-13 18:50:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Fredrik Tolf 2003-10-13 18:47:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624

Description of problem:
As soon as I try to do anything with rpm, it exits with the following errors,
and I have to remove the lock files manually.

rpmdb: write: 0xbfffc4d0, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

An strace revealed that only a write syscall actually returned EINVAL, so I'm
guessing that the other errors stem from the first. What the write call tries to
do is write 8192 NUL chars to the lock file, using a buffer that is prefilled
with NULs. strace can reveal the beginning of the buffer, so it seems that the
error is that the buffer is too short rather than rpm passes a completely
invalid address to the write call.

I didn't actually notice this problem until I upgraded to the 2.6.0-test4 kernel
(was running a 2.4.21 with ACL patches before), but on the other hand I hadn't
used rpm for a while before that, so I don't know if it is directly related to it.
On my RH8 system with RPM 4.1 it works with 2.6.0-test4, and on my RH7.1 system
(running RPM 4.0.2) on which I upgraded the kernel to 2.6.0-test6, it also
works, so it seems to be limited to RPM 4.2.

Version-Release number of selected component (if applicable):
I can't get the exact version since RPM isn't working. It's the stock RH9 4.2
release, though.

How reproducible:
Always

Steps to Reproduce:
Run rpm with any command that makes use of the database.

Additional info:
Comment 1 Jeff Johnson 2003-10-13 18:50:19 EDT
You have the O_DIRECT problem, fixeed in rpm-4.2.1
packages at ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x

Blame Linus, not me.
Comment 2 Jeff Johnson 2003-10-13 18:53:08 EDT
Hmmm, fixed in rpm-4.2 packages, not rpm-4.2.1. Apologies for the typo.

Note You need to log in before you can comment on or make changes to this bug.