Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 79272 - rpmq loops forever in "select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)"
Summary: rpmq loops forever in "select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)"
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-09 13:27 UTC by Toni Willberg
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-09 13:28:06 UTC


Attachments (Terms of Use)

Description Toni Willberg 2002-12-09 13:27:58 UTC
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 12:11:30 UTC
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 12:15:05 UTC
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.