Bug 79272 - rpmq loops forever in "select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)"
rpmq loops forever in "select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)"
Status: CLOSED WORKSFORME
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
8.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-09 08:27 EST by Toni Willberg
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-09 08:28:06 EST
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 Toni Willberg 2002-12-09 08:27:58 EST
Description of problem:
rpmq process jams and never exists without kill -9.


Version-Release number of selected component (if applicable):
 rpm 4.1

How reproducible:
 Always

Steps to Reproduce:
 rpm -qa

	

Actual Results:  [root@toniw rpm]# rpm -qa
 (never exiting)

Expected Results:  List of packages, fe.


Additional info:

Run with strace rpm -qa and you'll see this:

<clipped...>
open("/var/lib/rpm/__db.003", O_RDWR|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
mmap2(NULL, 360448, PROT_READ|PROT_WRITE, MAP_SHARED, 3, 0) = 0x4052b000
close(3)                                = 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=16822272, ...}) = 0
_llseek(3, 0, [0], SEEK_SET)            = 0
read(3, "\0\0\0\0\1\0\0\0\0\0\0\0a\25\6\0\7\0\0\0\0\20\0\0\0\10"..., 256) = 256
close(3)                                = 0
open("/var/lib/rpm/Packages", O_RDONLY|O_LARGEFILE) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=16822272, ...}) = 0
brk(0x805d000)                          = 0x805d000
select(0, NULL, NULL, NULL, {0, 1000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 2000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 4000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 8000})  = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 16000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 32000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 64000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 128000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 256000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 512000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
<killall -9 rpmq>

Lsof shows no process owning the file before running rpm.

I installed RH8 from official ISO images.

How to resolve the situation now? :)
Comment 1 Jeff Johnson 2002-12-10 07:11:30 EST
You have stale locks left over from previous
invocation. Fix by doing
	rm -f /var/lib/rpm/__db*
Comment 2 Toni Willberg 2002-12-10 07:15:05 EST
Correct resolution would program some sanity checks to rpmq/rpmd that would
check for lockfiles and give errors/warnings, wouldn't it? :)


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