Bug 629882

Summary: YaST reads YCP include files 1 byte at a time, AppArmor(auditd) logs it all slow as hell
Product: [openSUSE] openSUSE 11.3 Reporter: Martin Vidner <mvidner>
Component: YaST2Assignee: Martin Vidner <mvidner>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P3 - Medium    
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard: maint:released:11.3:35616
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Deadline: 2010-09-27   

Description Martin Vidner 2010-08-10 11:27:18 UTC
In discussing another bug(*), Bubli mentioned that strace output was full of lines like
> [pid  8194] read(7, "b", 1)             = 1
> [pid  8194] read(7, "u", 1)             = 1
> [pid  8194] read(7, "s", 1)             = 1
> [pid  8194] read(7, ";", 1)             = 1
which clutters the output and makes stracing, if not regular runs, much slower.

It turns out that for certain files, ones pulled in by the YCP include statement, input buffering is not enabled.

*) http://lists.opensuse.org/yast-devel/2010-08/msg00012.html
Comment 1 Martin Vidner 2010-08-11 09:02:08 UTC
Fixed in yast2-core-2.19.3,
 http://svn.opensuse.org/viewvc/yast?view=revision&revision=62375
submitted to Factory as
 https://build.opensuse.org/request/show/45353

Bubli says: Buffered reading did the trick. It reduced start-up time of y2-users (which I used as benchmark) from 4.5 minutes to 12 seconds
Comment 2 Martin Vidner 2010-08-24 12:08:46 UTC
It turns out AppArmor was set up to complain about yast, by this profile:
/etc/apparmor.d/sbin.yast2 :
# Last Modified: Mon Oct 26 23:07:05 2009
# REPOSITORY: http://apparmor.opensuse.org/backend/api thebahdness 4106
#include <tunables/global>

/sbin/yast2 flags=(complain) {
  #include <abstractions/base>
  #include <abstractions/bash>


  /bin/bash ix,

}

That made auditd fill (and rotate away) all of /var/log/audit/audit.log with messages like
type=APPARMOR_ALLOWED msg=audit(1282649559.788:165674): operation="file_perm" pid=6304 parent=6271 profile="/sbin/yast2//null-120" requested_mask="r::" denied_mask="r::" fsuid=0 ouid=0 name="/usr/share/YaST2/include/nfs/ui.ycp"
Comment 3 Martin Vidner 2010-08-24 12:24:47 UTC
will ask for an update
Comment 4 Martin Vidner 2010-08-24 12:26:50 UTC
In certain (non-default) AppArmor configurations, YaST becomes verrry slow.

It is very little work for me to make an 11.3 update. The yast2-core behavior is present since SLES9, but applying the patches there would be more work. I think we should make an update for 11.3, with low priority.

If that's OK, please give me a Swamp ID.
Comment 5 Leonardo Chiquitto 2010-08-25 15:16:15 UTC
Patch is trivial, I think we should update, +1.
Comment 6 Swamp Workflow Management 2010-08-30 13:20:12 UTC
The SWAMPID for this issue is 35563.
This issue was rated as low.
Please submit fixed packages until 2010-09-27.
Also create a patchinfo file using this link:
https://swamp.suse.de/webswamp/wf/35563
Comment 7 Christian Dengler 2010-08-30 13:20:41 UTC
+1
update started
Comment 8 Martin Vidner 2010-09-02 07:01:57 UTC
Submitted, osc rq show 46945
Comment 9 Swamp Workflow Management 2010-09-07 13:30:40 UTC
Update released for: yast2-core, yast2-core-debuginfo, yast2-core-debugsource, yast2-core-devel
Products:
openSUSE 11.3 (debug, i586, x86_64)
Comment 10 Martin Vidner 2011-02-03 15:26:12 UTC
Forgot to close in comment 8
Comment 11 Bernhard Wiedemann 2016-04-15 12:57:08 UTC
This is an autogenerated message for OBS integration:
This bug (629882) was mentioned in
https://build.opensuse.org/request/show/46945 11.3:Test / yast2-core