2003-05-13 22:45:08

by Shawn

[permalink] [raw]
Subject: Huraaa for 2.5

Just a wahoo for all the kernel gods. I had forgotten what 2.5 does for
the desktop until I upgraded to rh9.0 and started using 2.4 again.

Thanks for all the awesome work!


2003-05-14 01:14:50

by William Lee Irwin III

[permalink] [raw]
Subject: Re: Huraaa for 2.5

On Tue, May 13, 2003 at 05:54:22PM -0500, Shawn wrote:
> Just a wahoo for all the kernel gods. I had forgotten what 2.5 does for
> the desktop until I upgraded to rh9.0 and started using 2.4 again.
> Thanks for all the awesome work!

Good to hear a success report, most of what I get here seem to be bugs. =)


-- wli

2003-05-14 01:42:48

by Shawn

[permalink] [raw]
Subject: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Not to get away from the praise too much, but I have a rpm/db4 problem
that seems to be related to the kernel. before I started backing out
parts of 69-mm4, I just wanted to figure out /which/ parts to try
backing out.

As root, I basically can't use rpm at all. I think it's select() related
as strace shows it timing out. The odd thing is that it works great as a
non-privileged user.

2.5.69-mm4, otherwise mostly stock rh90 setup.

[root@www root]# rpm -qi iptables
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily
unavailable (11)
error: cannot open Packages database in /var/lib/rpm
package iptables is not installed
[root@www root]#

The following is what strace shows. A full trace is attached.
select(4, [3], NULL, NULL, {1, 0}) = 1 (in [3], left {1, 0})
select(0, NULL, NULL, NULL, {3, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {6, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {9, 0}) = 0 (Timeout)


On Tue, 2003-05-13 at 20:27, William Lee Irwin III wrote:
> On Tue, May 13, 2003 at 05:54:22PM -0500, Shawn wrote:
> > Just a wahoo for all the kernel gods. I had forgotten what 2.5 does for
> > the desktop until I upgraded to rh9.0 and started using 2.4 again.
> > Thanks for all the awesome work!
>
> Good to hear a success report, most of what I get here seem to be bugs. =)


Attachments:
rpm-root.txt (81.77 kB)

2003-05-14 01:49:02

by William Lee Irwin III

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

On Tue, May 13, 2003 at 08:52:41PM -0500, Shawn wrote:
> The following is what strace shows. A full trace is attached.
> select(4, [3], NULL, NULL, {1, 0}) = 1 (in [3], left {1, 0})
> select(0, NULL, NULL, NULL, {3, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {6, 0}) = 0 (Timeout)
> select(0, NULL, NULL, NULL, {9, 0}) = 0 (Timeout)

Could you send me an strace of a successful run?


-- wli

2003-05-14 01:52:50

by Andrew Morton

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Shawn <[email protected]> wrote:
>
> Not to get away from the praise too much, but I have a rpm/db4 problem
> that seems to be related to the kernel. before I started backing out
> parts of 69-mm4, I just wanted to figure out /which/ parts to try
> backing out.
>
> As root, I basically can't use rpm at all. I think it's select() related
> as strace shows it timing out. The odd thing is that it works great as a
> non-privileged user.

rpm seems generally flakey sometimes.

remove /var/lib/rpm/__*

Use

LD_ASSUME_KERNEL=2.2.5 rpm

to get around rpm's O_DIRECT bug.

2003-05-14 01:55:02

by Shawn

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

DUDE! Thanks mucho!

> rpm seems generally flakey sometimes.
>
> remove /var/lib/rpm/__*
>
> Use
>
> LD_ASSUME_KERNEL=2.2.5 rpm
>
> to get around rpm's O_DIRECT bug.
>

2003-05-14 02:05:48

by William Lee Irwin III

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

On Tue, May 13, 2003 at 08:52:41PM -0500, Shawn wrote:
> execve("/bin/rpm", ["rpm", "-qi", "iptables"], [/* 32 vars */]) = 0
> uname({sys="Linux", node="http://www.enodev.com", ...}) = 0
> brk(0) = 0x8069000
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40016000
> open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
> open("/etc/ld.so.cache", O_RDONLY) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=82290, ...}) = 0
[...]


okay, the first thing I see is:

-getgid32() = 500
-getuid32() = 500
+getgid32() = 0
+getuid32() = 0
stat64("/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/lib/", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/var/lib/rpm", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
-access("/var/lib/rpm", W_OK) = -1 EACCES (Permission denied)
+access("/var/lib/rpm", W_OK) = 0
+access("/var/lib/rpm/__db.001", F_OK) = 0
+access("/var/lib/rpm/Packages", F_OK) = 0

They appear to either not be running in equivalent environments or
something has gone horribly wrong. The diff is incredibly noisy and not
useful for debugging, could you strace the working kernel's bit as root?

Also, things start getting wildly different after both examine DB_CONFIG,
where 2.4 and 2.5 open different files with different options, i.e. 2.5
does O_DIRECT on /var/lib/rpm/__db.001 and 2.4 never touches that file,
and 2.4 never does O_DIRECT either.

This may very well have something to do with the difference in
privileges.


-- wli

2003-05-14 02:13:45

by Shawn

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Thanks for all the help! So, is it that there is likely misuse of
O_DIRECT somewhere (db4, rpm, etc)?

Wonder if I should bother filing a bug if rpm has a bugzilla...

On Tue, 2003-05-13 at 21:18, William Lee Irwin III wrote:
> They appear to either not be running in equivalent environments or
> something has gone horribly wrong. The diff is incredibly noisy and not
> useful for debugging, could you strace the working kernel's bit as root?
>
> Also, things start getting wildly different after both examine DB_CONFIG,
> where 2.4 and 2.5 open different files with different options, i.e. 2.5
> does O_DIRECT on /var/lib/rpm/__db.001 and 2.4 never touches that file,
> and 2.4 never does O_DIRECT either.
>
> This may very well have something to do with the difference in
> privileges.

2003-05-14 02:15:21

by William Lee Irwin III

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

On Tue, 2003-05-13 at 21:18, William Lee Irwin III wrote:
>> They appear to either not be running in equivalent environments or
>> something has gone horribly wrong. The diff is incredibly noisy and not
>> useful for debugging, could you strace the working kernel's bit as root?
>> Also, things start getting wildly different after both examine DB_CONFIG,
>> where 2.4 and 2.5 open different files with different options, i.e. 2.5
>> does O_DIRECT on /var/lib/rpm/__db.001 and 2.4 never touches that file,
>> and 2.4 never does O_DIRECT either.
>> This may very well have something to do with the difference in
>> privileges.

On Tue, May 13, 2003 at 09:24:23PM -0500, Shawn wrote:
> Thanks for all the help! So, is it that there is likely misuse of
> O_DIRECT somewhere (db4, rpm, etc)?
> Wonder if I should bother filing a bug if rpm has a bugzilla...

My sources say the bug is in the packaged version of db4.


-- wli

2003-05-14 02:19:52

by Joe

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Shawn wrote:

>Not to get away from the praise too much, but I have a rpm/db4 problem
>that seems to be related to the kernel. before I started backing out
>parts of 69-mm4, I just wanted to figure out /which/ parts to try
>backing out.
>
>As root, I basically can't use rpm at all. I think it's select() related
>as strace shows it timing out. The odd thing is that it works great as a
>non-privileged user.
>
>2.5.69-mm4, otherwise mostly stock rh90 setup.
>

Just out of curiosity, have you tried:

LD_KERNEL_ASSUME=2.4.1 rpm -qi iptables

OTOH, rpm-4.2-1 seems to "just work" here -

where "here" is of the form:

2.5.6x on RH9

Joe



2003-05-14 02:36:32

by Shawn

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

I sure wish I knew what triggers this bug. it worked fine under 2.5.6x
on rh 80 for me.

Ah crap. I'm running rpm-4.2-0.69 because rhn has been busy. FRICK.

On Tue, 2003-05-13 at 21:32, J Sloan wrote:
> Shawn wrote:
>
> >Not to get away from the praise too much, but I have a rpm/db4 problem
> >that seems to be related to the kernel. before I started backing out
> >parts of 69-mm4, I just wanted to figure out /which/ parts to try
> >backing out.
> >
> >As root, I basically can't use rpm at all. I think it's select() related
> >as strace shows it timing out. The odd thing is that it works great as a
> >non-privileged user.
> >
> >2.5.69-mm4, otherwise mostly stock rh90 setup.
> >
>
> Just out of curiosity, have you tried:
>
> LD_KERNEL_ASSUME=2.4.1 rpm -qi iptables
>
> OTOH, rpm-4.2-1 seems to "just work" here -
>
> where "here" is of the form:
>
> 2.5.6x on RH9
>
> Joe
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2003-05-14 02:41:27

by Shawn

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Wait a second, there is no .2-1 on redhat. It must be how redhat
packages it...

Ope, there an email from -wli... Yup, that's the deal. bugzilla.redhat
time...

On Tue, 2003-05-13 at 21:47, Shawn wrote:
> I sure wish I knew what triggers this bug. it worked fine under 2.5.6x
> on rh 80 for me.
>
> Ah crap. I'm running rpm-4.2-0.69 because rhn has been busy. FRICK.
>
> On Tue, 2003-05-13 at 21:32, J Sloan wrote:
> > Shawn wrote:
> >
> > >Not to get away from the praise too much, but I have a rpm/db4 problem
> > >that seems to be related to the kernel. before I started backing out
> > >parts of 69-mm4, I just wanted to figure out /which/ parts to try
> > >backing out.
> > >
> > >As root, I basically can't use rpm at all. I think it's select() related
> > >as strace shows it timing out. The odd thing is that it works great as a
> > >non-privileged user.
> > >
> > >2.5.69-mm4, otherwise mostly stock rh90 setup.
> > >
> >
> > Just out of curiosity, have you tried:
> >
> > LD_KERNEL_ASSUME=2.4.1 rpm -qi iptables
> >
> > OTOH, rpm-4.2-1 seems to "just work" here -
> >
> > where "here" is of the form:
> >
> > 2.5.6x on RH9
> >
> > Joe
> >
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2003-05-14 03:11:56

by Joe

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

Not available from rhn yet afaik - I got
them from a redhat employee page IIRC -

I put a copy at:

ftp://ftp.mainphrame.com/fixes/redhat-rpm/RH9/

Joe

Shawn wrote:

>I sure wish I knew what triggers this bug. it worked fine under 2.5.6x
>on rh 80 for me.
>
>Ah crap. I'm running rpm-4.2-0.69 because rhn has been busy. FRICK.
>
>On Tue, 2003-05-13 at 21:32, J Sloan wrote:
>
>
>>Shawn wrote:
>>
>>
>>
>>>Not to get away from the praise too much, but I have a rpm/db4 problem
>>>that seems to be related to the kernel. before I started backing out
>>>parts of 69-mm4, I just wanted to figure out /which/ parts to try
>>>backing out.
>>>
>>>As root, I basically can't use rpm at all. I think it's select() related
>>>as strace shows it timing out. The odd thing is that it works great as a
>>>non-privileged user.
>>>
>>>2.5.69-mm4, otherwise mostly stock rh90 setup.
>>>
>>>
>>>
>>Just out of curiosity, have you tried:
>>
>>LD_KERNEL_ASSUME=2.4.1 rpm -qi iptables
>>
>>OTOH, rpm-4.2-1 seems to "just work" here -
>>
>>where "here" is of the form:
>>
>>2.5.6x on RH9
>>
>>Joe
>>
>>
>>
>>-
>>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>>the body of a message to [email protected]
>>More majordomo info at http://vger.kernel.org/majordomo-info.html
>>Please read the FAQ at http://www.tux.org/lkml/
>>
>>
>
>
>
>


2003-05-14 07:26:15

by Matti Aarnio

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

On Tue, May 13, 2003 at 08:52:41PM -0500, Shawn wrote:
> Not to get away from the praise too much, but I have a rpm/db4 problem
> that seems to be related to the kernel. before I started backing out
> parts of 69-mm4, I just wanted to figure out /which/ parts to try
> backing out.
>
> As root, I basically can't use rpm at all. I think it's select() related
> as strace shows it timing out. The odd thing is that it works great as a
> non-privileged user.
>
> 2.5.69-mm4, otherwise mostly stock rh90 setup.
>
> [root@www root]# rpm -qi iptables
> rpmdb: unable to join the environment
.....

Rgr.. That is the key. You are seeing the same thing
as I have, and which is entered several times into the
RH Bugzilla.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86381
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=88178

> error: db4 error(11) from dbenv->open: Resource temporarily unavailable
> error: cannot open Packages index using db3 - Resource temporarily
> unavailable (11)
> error: cannot open Packages database in /var/lib/rpm
> package iptables is not installed
> [root@www root]#
....

The chain of the events (and my first encountering of the problem
was on 2.4.18 kernel) is:

RPM calls db4 environment open, which calls pthreads-mutex
initialization, which fails...

From: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=86381
------- Additional Comment #2 From Joe Orton on 2003-04-27 04:52 -------
This looks similar to bug 88178: I think the problem is that DB4 is
configured to use pthread mutexes in Shrike, but this depends on
pthread_mutexattr_setpshared working. But it seems
pthread_mutexattr_setpshared only works with an NPTL-savvy kernel,
so DB4 doesn't work right of booting an old (or non-NPTL) kernel.

What might be that "NPTL-savvy" kernel ?
If your 2.5.69-mm4 isn't, it must be RH specific ?

/Matti Aarnio

2003-05-14 12:39:12

by Tom Sightler

[permalink] [raw]
Subject: Re: odd db4 error with 2.5.69-mm4 [was Re: Huraaa for 2.5]

> As root, I basically can't use rpm at all. I think it's select() related
> as strace shows it timing out. The odd thing is that it works great as a
> non-privileged user.
>
> 2.5.69-mm4, otherwise mostly stock rh90 setup.
>
> [root@www root]# rpm -qi iptables
> rpmdb: unable to join the environment
> error: db4 error(11) from dbenv->open: Resource temporarily unavailable
> error: cannot open Packages index using db3 - Resource temporarily
> unavailable (11)
> error: cannot open Packages database in /var/lib/rpm
> package iptables is not installed
> [root@www root]#

This is a long known problem, you can work around it with
LD_ASSUME_KERNEL=2.4.19 or get the 4.2-1 rpms from
ftp://ftp.rpm.org/pub/rpm/test-4.2/.

Basically follow the steps in Redhat Bugzilla
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=89662 and you
should be all set.

Later,
Tom