Hide Forgot
Created attachment 517744 [details] verbose output Description of problem: run aug_init with flags=4 (AUG_TYPE_CHECK), the appliance crashes. Version-Release number of selected component (if applicable): libguestfs-1.7.17-24.el6.x86_64 augeas-0.9.0-1.el6.x86_64 How reproducible: always Steps to Reproduce: $ guestfish -a test.img ><fs> run ><fs> mount /dev/sda1 / ><fs> aug-init / 4 libguestfs: error: unexpected end of file when reading from daemon. This usually means the libguestfs appliance failed to start up. Please enable debugging (LIBGUESTFS_DEBUG=1) and rerun the command, then look at the debug messages output prior to this error. Or you can run 'libguestfs-test-tool' and post the complete output into a bug report or message to the libguestfs mailing list. Additional Info: I downgraded augeas to 0.7.2-6, then the problem went away. But I don't know if this has to do with libguestfs, or is purely augeas problem.
The problem is that Augeas runs out of memory. If you do: LIBGUESTFS_MEMSIZE=2048 guestfish --ro -a /dev/vg_pin/F14x64 -i Welcome to guestfish, the libguestfs filesystem interactive shell for editing virtual machine filesystems. Type: 'help' for help on commands 'man' to read the manual 'quit' to quit the shell Operating system: Fedora release 14 (Laughlin) /dev/vg_f13x64/lv_root mounted on / /dev/vda1 mounted on /boot ><fs> aug-init / 4 ><fs> then that's enough memory for this to work OK. It's not really clear if this is a bug in libguestfs, Augeas, or neither. We don't want to increase the default amount of memory given to the appliance for this one case.
Yes, type checking is very memory intensive; it is also only needed during lens development. Typically, it is used only when running augparse. There is absolutely no point in running aug_init with AUG_TYPE_CHECK turned on in a production/normal use setting as it is here. I recommend closing this as NOTABUG, and modifying the test plan accordingly.
(In reply to comment #2) > Yes, type checking is very memory intensive; it is also only needed during lens > development. Typically, it is used only when running augparse. > > There is absolutely no point in running aug_init with AUG_TYPE_CHECK turned on > in a production/normal use setting as it is here. > > I recommend closing this as NOTABUG, and modifying the test plan accordingly. David, do you think we should filter out this option in libguestfs, or do you think there might be a case where someone using Augeas via libguestfs would use this option? (eg. We do allow people to upload their own lenses)
Filtering it out might be a little harsh in case somebody knows what they are doing and really needs it. How about printing a warning "Setting the AUG_TYPE_CHECK flag is only needed when you do lens development and uses a lot of memory. The increased memory needs may lead to a crash of libguestfs" (or sth along these lines)
I changed the documentation: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=7739d7f471f9575828bd32489695d92dde005a9c
The doc change looks perfect to me.
Verified in libguestfs-1.7.17-26 there's document for the 'AUG_TYPE_CHECK': $ guestfish help aug_init ... "AUG_TYPE_CHECK" = 4 Typecheck lenses. This option is only useful when debugging Augeas lenses. Use of this option may require additional memory for the libguestfs appliance. You may need to set the "LIBGUESTFS_MEMSIZE" environment variable or call "set_memsize".
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/RHBA-2011-1512.html