Bug 456949 - anaconda segfaults after kickstart install
anaconda segfaults after kickstart install
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-07-28 16:18 EDT by Will Woods
Modified: 2008-12-18 14:37 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-18 14:37:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
anaconda.log (85.88 KB, text/plain)
2008-07-28 17:39 EDT, Will Woods
no flags Details
anaconda.log from text mode install (55.46 KB, text/plain)
2008-07-29 09:32 EDT, Andy Lindeberg
no flags Details

  None (edit)
Description Will Woods 2008-07-28 16:18:39 EDT
After performing a kickstart install with "reboot" in the kickstart, anaconda
does not reboot.

It appears that anaconda is actually segfaulting at the end of its run, and
that's why it never fires the reboot command.

I'll try to attach some logs as soon as I can get them. But it's tricky, because
once anaconda segfaults, the system shuts down, so I can't get at the logs anymore..
Comment 1 Will Woods 2008-07-28 17:38:23 EDT
Some more details: anaconda segfaults *after* running %post scripts. It says:

21:32:39 INFO    : moving (1) to step copylogs
21:32:39 INFO    : Copying anaconda logs
21:32:39 INFO    : moving (1) to step methodcomplete
21:32:39 INFO    : moving (1) to step postscripts
21:32:39 INFO    : Running kickstart %%post script(s)
21:32:39 INFO    : All kickstart %%post script(s) have been run
21:32:39 INFO    : moving (1) to step dopostaction

and then segfaults:

<6>anaconda[1661]: segfault at 4b ip 0032f6eb sp bfb14814 error 4 in libc-2.8.90

One other thing I noticed - udevd is no longer running. Might be related, might not.
Comment 2 Will Woods 2008-07-28 17:39:42 EDT
Created attachment 312824 [details]
Comment 3 Andy Lindeberg 2008-07-29 09:19:19 EDT
The same thing is happening with plain text mode, though the error message is
slightly different:

<6>anaconda[1672]: segfault at 8 ip 00007f2ee229a4a7 sp 00007fffeb1c17f0 errpr 4
in libc-2.8.90.so[7f2ee2230000+16a000]

I've a feeling they're related.
Comment 4 Andy Lindeberg 2008-07-29 09:32:35 EDT
Created attachment 312871 [details]
anaconda.log from text mode install
Comment 5 Chris Lumens 2008-07-30 16:54:53 EDT
I believe this is a problem with memory cleanup in rpm-python.  I've narrowed it
down to the problematic call in anaconda, which is a call to
rpmKernelVersionList.  This is an anaconda function but only does stuff with rpm
headers.  It's possible we are just doing something wrong.  I'm sure the rpm
maintainers will let us know.

The code from anaconda in question is at: 
Comment 6 Jeremy Katz 2008-07-30 22:39:37 EDT
We should probably be doing the lock removal before creating the transaction
set.  I can see things going horky otherwise.  

Chris, Will -- do you have a good reproducer?  If so, updates.img to test the
hypothesis is pretty trivial to throw together.
Comment 7 Chris Lumens 2008-07-30 22:56:37 EDT
Yep, it's just a simple matter of doing an install.  I can test this out
tomorrow and see if your idea is correct.
Comment 8 Chris Lumens 2008-07-31 11:43:27 EDT
Two things:

(1) Yes, we need to be removing the lock files before creating the new
transaction set.

(2) The lock file names have changed to 1-4 instead of 0-3, so we just need to
glob for all of them and remove based on that.
Comment 9 Jeff Johnson 2008-07-31 19:20:48 EDT
1) they're not "lock files" but rather "files that contain lock names". no matter whether
you open before/after creating a new transaction, you have races either way.

2) yes you need to remove all __db* files. there is no __db.000 in Berkeley DB, never has been,
never changed.
Comment 10 Bug Zapper 2008-11-25 21:36:42 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
Comment 11 Panu Matilainen 2008-12-18 14:37:10 EST
This has been fixed in anaconda long since afaict:

commit dea08c6442abbcd9349dc4c6c0ff408847c3926d
Author: Chris Lumens <clumens@redhat.com>
Date:   Thu Jul 31 11:43:11 2008 -0400

    Remove all the RPM lock files before creating a new transaction (#456949).

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