Bug 209388 - rpm dies with illegal instruction on i486
rpm dies with illegal instruction on i486
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Panu Matilainen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-04 21:02 EDT by Chris Weyl
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-10 07:11:08 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)
strace output (34.14 KB, text/plain)
2006-10-04 21:02 EDT, Chris Weyl
no flags Details

  None (edit)
Description Chris Weyl 2006-10-04 21:02:26 EDT
Description of problem:
RPM dies with "Illegal Instruction", however invoked, when run on a i486.

Version-Release number of selected component (if applicable):
rpm-4.4.2-15.2.i386.rpm 
(and -libs, -python, -build)

glibc is i386, not i686.

How reproducible:
Boot system, issue any variant of the rpm command.  Yum also dies.

Strace output from one invocation is attached.

Steps to Reproduce:
1. rpm -qa
2. rpmquery rpm
3. rpm -Uvh ....
  
etc, etc, etc

Actual results:
"Illegal Instruction"

Expected results:
Correct output from rpm queries or installation commands.

Additional info:
This is an actual i486/DX4.  It is a _very_ barebones fc5 system, installed by
pulling the drive and loading a minimal xen fc5 image on it USB connected to a
different system.  i486 boots correctly (with some udev angst), and functions
properly in all respects except rpm.
Comment 1 Chris Weyl 2006-10-04 21:02:29 EDT
Created attachment 137789 [details]
strace output
Comment 2 Jeff Johnson 2006-10-04 21:18:20 EDT
Um, rpm-4.4.2-15.2 is not gonna work on i486 for many many reasons.

For starters, rpm uses beecrypt with i686 asm optimizations, rdtsc instruction for
performance benchmarks, inline asm for cpu detection, NPTL and pthreads
for locking, etc, etc

rpm can certainly be compiled to work on i486, just a fair amount of work
for no detectable i486 users (yours is the 1st request in like 3 years for
functional rpm on i486).
Comment 3 Chris Weyl 2006-10-06 11:39:04 EDT
Somehow, I was afraid that was going to be the answer :)

Out of curiosity, what would an i486 user's options be here?  I'm loath to
suggest it, but is rpm in, say, a prior version of fedora core capable of
running on this architecture?  Or would it be possible to rebuild currentt
levels of rpm to run without having to rewrite large sections of the codebase? 
(e.g. maybe by disabling the problematic sections at compile time?)
Comment 4 Jeff Johnson 2006-10-06 14:20:52 EDT
All versions of rpm are capable of running on i486, it just depends on
how rpm is built. The decision was made to optimize for the majority
of i686 users at the expense of the i486 minority.

Large sections of the rpm code base do not have to be rewritten. That being said,
the task of removing non-i486 instructions is neither pleasant nor easy, and will
depend mostly on how other packages, like beecrypt, are built.

The specific areas within rpm that use non-i486 instructions are

1) lib/rpmrc.c may have some arch identification through asm that will not function correctly
on i486 (I've not looked at an i486 for years).

2) rpmio/rpmsw.c uses rdtsc by default. Disable and use the already implemented gettimeofday
instead.

3) make sure you have NPTL in glibc, or change the way that Berkeley DB within rpm is built.

There's no other problem areas within rpm afaik.

No matter what, rpm as built by Red Hat for quite some years now uses instructions
not available on i486.

FWIW, OWL linux claims to have an rpm package that will run on i486, there are
perhaps other distros that choose to build rpm differently than Red Hat and Fedora does.
Comment 5 Panu Matilainen 2007-08-10 07:11:08 EDT
Fedora release notes state "Intel Pentium or better processor, and is optimized
for Pentium 4 and later processors." as hardware requirements, As pointed out by
Jeff in c#4 it should be possible to build rpm capable of running on i486, but
WONTFIX in Fedora context.

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