Bug 651992 - Segfault in augeas 0.7.3 when calling aug_save
Segfault in augeas 0.7.3 when calling aug_save
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: augeas (Show other bugs)
rawhide
i686 Linux
low Severity medium
: ---
: ---
Assigned To: David Lutterkort
Fedora Extras Quality Assurance
:
: 638157 651991 651993 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-10 13:37 EST by Brian Ashburn
Modified: 2013-04-30 19:42 EDT (History)
6 users (show)

See Also:
Fixed In Version: augeas-0.7.4-1.fc14
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-30 17:40:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Core file (1.81 MB, application/octet-stream)
2010-11-11 05:01 EST, Richard W.M. Jones
no flags Details
guestfsd binary from matching version of libguestfs (233.21 KB, application/octet-stream)
2010-11-11 08:22 EST, Richard W.M. Jones
no flags Details

  None (edit)
Description Brian Ashburn 2010-11-10 13:37:59 EST
Description of problem:
Running BoxGrinder-build which uses guestfs and augeas, augeas throws a seg fault during aug_save.

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

How reproducible:
Every time I run boxgrinder-build, it occurs.

Steps to Reproduce:
1. Create a basic appliance defintion
2. Run boxgrinder with trace logging
3. Error is in log file
  
Actual results:
guestfsd[285]: segfault at ff044cc ip 037666d2 sp bf968d40 error 4 in libaugeas.so.0.12.0[3747000+39000]

Expected results:
No segfault

Additional info:
Log file and appliance definitions from boxgrinder: https://gist.github.com/671166
Comment 2 Richard W.M. Jones 2010-11-11 04:51:28 EST
Brian, can you get the precise RPM versions of the following
packages:

glibc
augeas
libguestfs
Comment 3 Richard W.M. Jones 2010-11-11 05:01:08 EST
Created attachment 459710 [details]
Core file

Core file supplied by reporter.
Comment 4 Brian Ashburn 2010-11-11 07:40:37 EST
RPM Versions:
glibc: 2.12.90
augeas: 0.7.3
libguestfs: 1.5.23
Comment 5 Richard W.M. Jones 2010-11-11 07:56:17 EST
This is not enough information.  Please include the *precise*
RPM versions by doing:

rpm -q glibc
etc.
Comment 6 Brian Ashburn 2010-11-11 08:03:00 EST
glibc-2.12.90-18.i686
augeas-0.7.3-1.fc14.i686
libguestfs-1.5.23-1.i686
Comment 7 Richard W.M. Jones 2010-11-11 08:20:34 EST
This is the stack trace:

Core was generated by `guestfsd -f'.
Program terminated with signal 11, Segmentation fault.
#0  dict_pos (key=0xdc94ae0 "#comment", dict=<value optimized out>)
    at ast.c:132
132	        int cmp = strcmp(dict->nodes[m]->key, key);
(gdb) bt
#0  dict_pos (key=0xdc94ae0 "#comment", dict=<value optimized out>)
    at ast.c:132
#1  0x03766bcc in dict_lookup (key=0xdc94ae0 "#comment", dict=0xe7d4440, 
    skel=0xbf968edc, subdict=0xbf968ed8) at ast.c:204
#2  0x0376a6cf in put_subtree (state=0xbf968ec8, lens=<value optimized out>)
    at put.c:449
#3  0x0376a238 in put_lens (lens=<value optimized out>, 
    state=<value optimized out>) at put.c:624
#4  0x0376a2a0 in put_quant_star (lens=<value optimized out>, 
    state=<value optimized out>) at put.c:544
#5  put_lens (lens=<value optimized out>, state=<value optimized out>)
    at put.c:627
#6  0x0376ac8d in lns_put (out=0xdc88350, lens=0xdde9380, tree=0xdc91c08, 
    text=0xdd37ea8 "# This file controls the state of SELinux on the system.\n# SELINUX= can take one of these three values:\n#\tenforcing - SELinux security policy is enforced.\n#\tpermissive - SELinux prints warnings instea"..., 
    err=0xbf968f6c) at put.c:787
#7  0x03765ef9 in transform_save (aug=0xdb39a58, xfm=0xf405f20, 
    path=0xf3cefd8 "/files/etc/sysconfig/selinux", tree=0xdcf0a60)
    at transform.c:940
#8  0x0374a136 in tree_save (aug=0xdb39a58, tree=<value optimized out>, 
    path=0xf403260 "/files/etc/sysconfig") at augeas.c:1117
#9  0x0374a231 in tree_save (aug=0xdb39a58, tree=<value optimized out>, 
    path=0xdb53f70 "/files/etc") at augeas.c:1121
#10 0x0374a231 in tree_save (aug=0xdb39a58, tree=<value optimized out>, 
    path=0x3776fdd "/files") at augeas.c:1121
#11 0x0374b850 in aug_save (aug=0xdb39a58) at augeas.c:1216
#12 0x0804ad37 in do_aug_save () at augeas.c:332
#13 0x080677c4 in aug_save_stub (xdr_in=0xbf9696d8) at stubs.c:623
#14 dispatch_incoming_message (xdr_in=0xbf9696d8) at stubs.c:7584
#15 0x0805adcb in main_loop (_sock=3) at proto.c:166
#16 0x08052a92 in main (argc=2, argv=0xbf969a34) at guestfsd.c:287
Comment 8 Richard W.M. Jones 2010-11-11 08:22:19 EST
Created attachment 459756 [details]
guestfsd binary from matching version of libguestfs

This is the guestfsd binary from the matching version
of libguestfs which was also used to generate the stack
trace in the preceding comment.
Comment 9 Richard W.M. Jones 2010-11-11 10:14:40 EST
Stack trace looks similar to the following bug reported
upstream:

https://fedorahosted.org/augeas/ticket/149
Comment 10 Richard W.M. Jones 2010-11-17 17:16:05 EST
*** Bug 651991 has been marked as a duplicate of this bug. ***
Comment 11 Richard W.M. Jones 2010-11-17 17:16:17 EST
*** Bug 651993 has been marked as a duplicate of this bug. ***
Comment 12 Richard W.M. Jones 2010-11-17 17:18:32 EST
Another upstream report here:
http://community.jboss.org/message/571684
Comment 13 Richard W.M. Jones 2010-11-18 05:30:18 EST
We have a fix to try:
http://git.fedorahosted.org/git/?p=augeas.git;a=commitdiff;h=c17cd53d8d4a643e4f7277da37d21dc3bade5ed6

I will push a version to Rawhide which
contains this fix, please install the Rawhide
package and test it.
Comment 14 Richard W.M. Jones 2010-11-18 05:40:52 EST
Build here to test:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2607912
Comment 15 Fedora Update System 2010-11-18 07:13:44 EST
augeas-0.7.3-2.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/augeas-0.7.3-2.fc14
Comment 16 Fedora Update System 2010-11-18 18:59:16 EST
augeas-0.7.3-2.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update augeas'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/augeas-0.7.3-2.fc14
Comment 17 Sandro Bonazzola 2010-11-22 04:07:38 EST
*** Bug 638157 has been marked as a duplicate of this bug. ***
Comment 18 Sandro Bonazzola 2010-11-22 04:09:22 EST
augeas 0.7.4 released upstream containing the fix.
Comment 19 Fedora Update System 2010-11-22 04:56:37 EST
augeas-0.7.4-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/augeas-0.7.4-1.fc14
Comment 20 Sandro Bonazzola 2010-11-23 02:37:18 EST
(In reply to comment #19)
> augeas-0.7.4-1.fc14 has been submitted as an update for Fedora 14.
> https://admin.fedoraproject.org/updates/augeas-0.7.4-1.fc14

It works for me.
Comment 21 Fedora Update System 2010-11-30 17:40:28 EST
augeas-0.7.4-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

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