Bug 785668 - aug-defnode: daemon crash
aug-defnode: daemon crash
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libguestfs (Show other bugs)
Unspecified Unspecified
medium Severity medium
: beta
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
: Regression
Depends On: libguestfs_rebase6.3
  Show dependency treegraph
Reported: 2012-01-30 04:25 EST by Jinxin Zheng
Modified: 2012-06-20 03:00 EDT (History)
4 users (show)

See Also:
Fixed In Version: libguestfs-1.16.2-1.el6
Doc Type: Bug Fix
Doc Text:
No Documentation needed.
Story Points: ---
Clone Of:
Last Closed: 2012-06-20 03:00:19 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Jinxin Zheng 2012-01-30 04:25:02 EST
Created attachment 558294 [details]
crash debug log

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

Version-Release number of selected component (if applicable):

How reproducible:

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

Actual results:
Daemon crashes.

Expected results:
No crash.
Comment 2 Richard W.M. Jones 2012-01-30 05:30:35 EST
Simple reproducer:

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

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

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 05:49:16 EST
Patch posted upstream:

Comment 4 Richard W.M. Jones 2012-01-30 06:15:34 EST
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 09:32:35 EST
Fix included in 1.16.2.
Comment 12 Qixiang Wan 2012-02-01 01:21:31 EST
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 09:35:45 EDT
    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 03:00:19 EDT
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.


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