Bug 651992 - Segfault in augeas 0.7.3 when calling aug_save
Summary: Segfault in augeas 0.7.3 when calling aug_save
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: augeas
Version: rawhide
Hardware: i686
OS: Linux
low
medium
Target Milestone: ---
Assignee: David Lutterkort
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 638157 651991 651993 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-10 18:37 UTC by Brian Ashburn
Modified: 2013-04-30 23:42 UTC (History)
6 users (show)

Fixed In Version: augeas-0.7.4-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-30 22:40:58 UTC
Type: ---
Embargoed:


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

Description Brian Ashburn 2010-11-10 18:37:59 UTC
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 09:51:28 UTC
Brian, can you get the precise RPM versions of the following
packages:

glibc
augeas
libguestfs

Comment 3 Richard W.M. Jones 2010-11-11 10:01:08 UTC
Created attachment 459710 [details]
Core file

Core file supplied by reporter.

Comment 4 Brian Ashburn 2010-11-11 12:40:37 UTC
RPM Versions:
glibc: 2.12.90
augeas: 0.7.3
libguestfs: 1.5.23

Comment 5 Richard W.M. Jones 2010-11-11 12:56:17 UTC
This is not enough information.  Please include the *precise*
RPM versions by doing:

rpm -q glibc
etc.

Comment 6 Brian Ashburn 2010-11-11 13:03:00 UTC
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 13:20:34 UTC
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 13:22:19 UTC
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 15:14:40 UTC
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 22:16:05 UTC
*** Bug 651991 has been marked as a duplicate of this bug. ***

Comment 11 Richard W.M. Jones 2010-11-17 22:16:17 UTC
*** Bug 651993 has been marked as a duplicate of this bug. ***

Comment 12 Richard W.M. Jones 2010-11-17 22:18:32 UTC
Another upstream report here:
http://community.jboss.org/message/571684

Comment 13 Richard W.M. Jones 2010-11-18 10:30:18 UTC
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 10:40:52 UTC
Build here to test:

http://koji.fedoraproject.org/koji/taskinfo?taskID=2607912

Comment 15 Fedora Update System 2010-11-18 12:13:44 UTC
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 23:59:16 UTC
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 09:07:38 UTC
*** Bug 638157 has been marked as a duplicate of this bug. ***

Comment 18 Sandro Bonazzola 2010-11-22 09:09:22 UTC
augeas 0.7.4 released upstream containing the fix.

Comment 19 Fedora Update System 2010-11-22 09:56:37 UTC
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 07:37:18 UTC
(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 22:40:28 UTC
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.