RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 785668 - aug-defnode: daemon crash
Summary: aug-defnode: daemon crash
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs
Version: 6.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: libguestfs_rebase6.3
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-01-30 09:25 UTC by Jinxin Zheng
Modified: 2012-06-20 07:00 UTC (History)
4 users (show)

Fixed In Version: libguestfs-1.16.2-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 07:00:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
crash debug log (41.64 KB, text/plain)
2012-01-30 09:25 UTC, Jinxin Zheng
no flags Details
verify log (libguestfs-1.16.2-1) (71.87 KB, text/plain)
2012-02-01 06:21 UTC, Qixiang Wan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2012:0774 0 normal SHIPPED_LIVE Low: libguestfs security, bug fix, and enhancement update 2012-06-19 19:29:50 UTC

Description Jinxin Zheng 2012-01-30 09:25:02 UTC
Created attachment 558294 [details]
crash debug log

Description of problem:
Daemon crashes when executing aug-defnode.

Version-Release number of selected component (if applicable):
libguestfs-1.16.1-1.el6

How reproducible:
100%

Steps to Reproduce:
$ guestfish -a rhel.img <<EOF                      
run
mount /dev/sda1 /
aug-init / 0
aug-defnode node /file/etc/passwd/root 0
EOF

Actual results:
Daemon crashes.

Expected results:
No crash.

Comment 2 Richard W.M. Jones 2012-01-30 10:30:35 UTC
Simple reproducer:

guestfish --ro -i -a linux.img -v <<EOF
aug-init / 0
aug-defnode node /file/etc/passwd/root 0
EOF

With debugging enabled (-v) it seems to be a segfault
in the daemon:

><fs> aug-defnode node /file/etc/passwd/root 0
libguestfs: send_to_daemon: 88 bytes: 00 00 00 54 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 12 | 00 00 00 00 | ...
guestfsd: main_loop: proc 16 (aug_init) took 3.76 seconds
guestfsd: main_loop: new request, len 0x54
[   12.422138] guestfsd[107]: segfault at 100000019 ip 0000003a2467cf41 sp 00007fff45462900 error 4 in libc-2.14.90.so[3a24600000+1ab000]
/init: line 147:   107 Segmentation fault      $vg guestfsd
Rebooting.

I enabled valgrind in the daemon and it says:

==106== Invalid free() / delete / delete[]
==106==    at 0x505962E: free (vg_replace_malloc.c:366)
==106==    by 0x41AA66: aug_defnode_stub (stubs.c:552)
==106==    by 0x42C72E: dispatch_incoming_message (stubs.c:9920)
==106==    by 0x417ED3: main_loop (proto.c:193)
==106==    by 0x403DC6: main (guestfsd.c:286)
==106==  Address 0x651f40 is 0 bytes inside data symbol "r.14855"

Comment 3 Richard W.M. Jones 2012-01-30 10:49:16 UTC
Patch posted upstream:

https://www.redhat.com/archives/libguestfs/2012-January/msg00291.html

Comment 4 Richard W.M. Jones 2012-01-30 11:15:34 UTC
Patch pushed.  I'll make sure this goes into
libguestfs 1.16.2 and from there into RHEL 6.3
via the rebase.

Comment 10 Richard W.M. Jones 2012-01-31 14:32:35 UTC
Fix included in 1.16.2.

Comment 12 Qixiang Wan 2012-02-01 06:21:31 UTC
Created attachment 558756 [details]
verify log (libguestfs-1.16.2-1)

Verified with libguestfs-1.16.2-1.el6. Log is attached.

Comment 13 Richard W.M. Jones 2012-04-26 13:35:45 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No Documentation needed.

Comment 15 errata-xmlrpc 2012-06-20 07:00:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0774.html


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