error Python 3.5.2: /usr/bin/python3 Tue Jul 18 23:37:28 2017 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /usr/sbin/aa-logprof in () 42 43 if profiledir: 44 apparmor.profile_dir = apparmor.get_full_path(profiledir) 45 if not os.path.isdir(apparmor.profile_dir): 46 raise apparmor.AppArmorException("%s is not a directory."%profiledir) 47 48 apparmor.loadincludes() 49 50 apparmor.do_logprof_pass(logmark) 51 apparmor = apparmor.do_logprof_pass = logmark = '' /usr/lib/python3/dist-packages/apparmor/aa.py in do_logprof_pass(logmark='', passno=0, pid=9820) 2195 #log[root] = handle_children('', '', log[root]) 2196 #print(log) 2197 for pid in sorted(profile_changes.keys()): 2198 set_process(pid, profile_changes[pid]) 2199 2200 collapse_log() 2201 2202 ask_the_questions() 2203 2204 if aaui.UI_mode == 'yast': global collapse_log = /usr/lib/python3/dist-packages/apparmor/aa.py in collapse_log() 2446 2447 ptrace = prelog[aamode][profile][hat]['ptrace'] 2448 for peer in ptrace.keys(): 2449 for access in ptrace[peer].keys(): 2450 ptrace_event = PtraceRule(access, peer, log_event=True) 2451 if not is_known_rule(aa[profile][hat], 'ptrace', ptrace_event): 2452 log_dict[aamode][profile][hat]['ptrace'].add(ptrace_event) 2453 2454 sig = prelog[aamode][profile][hat]['signal'] 2455 for peer in sig.keys(): global is_known_rule = global aa = defaultdict(,...None, 'name': '/usr/bin/evince-thumbnailer'})})}) profile = '/usr/bin/fsearch' hat = '/usr/bin/fsearch' ptrace_event = ptrace trace peer=/opt/Enpass/bin/runenpass.sh, /usr/lib/python3/dist-packages/apparmor/aa.py in is_known_rule(profile=defaultdict(,...) />, 'flags': None, 'name': '/usr/bin/fsearch'}), rule_type='ptrace', rule_obj= ptrace trace peer=/opt/Enpass/bin/runenpass.sh,) 4095 return 0 4096 4097 def is_known_rule(profile, rule_type, rule_obj): 4098 # XXX get rid of get() checks after we have a proper function to initialize a profile 4099 if profile.get(rule_type, False): 4100 if profile[rule_type].is_covered(rule_obj, False): 4101 return True 4102 4103 includelist = list(profile['include'].keys()) 4104 checked = [] profile = defaultdict(,...) />, 'flags': None, 'name': '/usr/bin/fsearch'}) rule_type = 'ptrace' ].is_covered undefined rule_obj = ptrace trace peer=/opt/Enpass/bin/runenpass.sh, /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in is_covered(self= deny ptrace trace peer=/home/j.../thunderbird\{,\*\[^s\]\[^h\]\}, , rule= ptrace trace peer=/opt/Enpass/bin/runenpass.sh,, check_allow_deny=False, check_audit=False) 358 359 def is_covered(self, rule, check_allow_deny=True, check_audit=False): 360 '''return True if rule is covered by existing rules, otherwise False''' 361 362 for r in self.rules: 363 if r.is_covered(rule, check_allow_deny, check_audit): 364 return True 365 366 return False 367 r = ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}, r.is_covered = rule = ptrace trace peer=/opt/Enpass/bin/runenpass.sh, check_allow_deny = False check_audit = False /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in is_covered(self= ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\},, other_rule= ptrace trace peer=/opt/Enpass/bin/runenpass.sh,, check_allow_deny=False, check_audit=False) 143 144 if other_rule.audit and not self.audit: 145 return False 146 147 # still here? -> then the common part is covered, check rule-specific things now 148 return self.is_covered_localvars(other_rule) 149 150 # @abstractmethod FIXME - uncomment when python3 only 151 def is_covered_localvars(self, other_rule): 152 '''check if the rule-specific parts of other_rule is covered by this rule object''' self = ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}, self.is_covered_localvars = other_rule = ptrace trace peer=/opt/Enpass/bin/runenpass.sh, /usr/lib/python3/dist-packages/apparmor/rule/ptrace.py in is_covered_localvars(self= ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\},, other_rule= ptrace trace peer=/opt/Enpass/bin/runenpass.sh,) 136 '''check if other_rule is covered by this rule object''' 137 138 if not self._is_covered_list(self.access, self.all_access, other_rule.access, other_rule.all_access, 'access'): 139 return False 140 141 if not self._is_covered_aare(self.peer, self.all_peers, other_rule.peer, other_rule.all_peers, 'peer'): 142 return False 143 144 # still here? -> then it is covered 145 return True self = ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}, self._is_covered_aare = self.peer = AARE('/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}') self.all_peers = False other_rule = ptrace trace peer=/opt/Enpass/bin/runenpass.sh, other_rule.peer = AARE('/opt/Enpass/bin/runenpass.sh') other_rule.all_peers = False /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in _is_covered_aare(self= ptrace trace peer=/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\},, self_value=AARE('/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}'), self_all=False, other_value=AARE('/opt/Enpass/bin/runenpass.sh'), other_all=False, cond_name='peer') 189 raise AppArmorBug('No %(cond_name)s specified in other %(rule_name)s rule' % {'cond_name': cond_name, 'rule_name': self.rule_name}) 190 191 if not self_all: 192 if other_all: 193 return False 194 if not self_value.match(other_value.regex): # XXX should check against other_value (without .regex) - but that gives different (more strict) results 195 return False 196 197 # still here? -> then it is covered 198 return True self_value = AARE('/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}') self_value.match = other_value = AARE('/opt/Enpass/bin/runenpass.sh') other_value.regex = '/opt/Enpass/bin/runenpass.sh' /usr/lib/python3/dist-packages/apparmor/aare.py in match(self=AARE('/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}'), expression='/opt/Enpass/bin/runenpass.sh') 63 return self.is_equal(expression) # better safe than sorry 64 elif not type_is_str(expression): 65 raise AppArmorBug('AARE.match() called with unknown object: %s' % str(expression)) 66 67 if self._regex_compiled is None: 68 self._regex_compiled = re.compile(convert_regexp(self.regex)) 69 70 return bool(self._regex_compiled.match(expression)) 71 72 def is_equal(self, expression): self = AARE('/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}') self._regex_compiled = None global re = re.compile = global convert_regexp = self.regex = r'/usr/lib/thunderbird/thunderbird\{,\*\[^s\]\[^h\]\}' /usr/lib/python3.5/re.py in compile(pattern='^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((? pattern = '^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((?= _MAXCACHE: 296 _cache.clear() 297 if p.flags & LOCALE: p undefined global sre_compile = sre_compile.compile = pattern = '^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((? sre_parse.parse = flags = 0 /usr/lib/python3.5/sre_parse.py in parse(str='^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((?) 829 p = _parse_sub(source, pattern, 0) 830 p.pattern.flags = fix_flags(str, p.pattern.flags) 831 832 if source.next is not None: 833 assert source.next == ")" 834 raise source.error("unbalanced parenthesis") 835 836 if not (flags & SRE_FLAG_VERBOSE) and p.pattern.flags & SRE_FLAG_VERBOSE: 837 # the VERBOSE flag was switched on inside the pattern. to be 838 # on the safe side, we'll parse the whole thing again... source = source.error = > error: unbalanced parenthesis at position 67 __cause__ = None __class__ = __context__ = None __delattr__ = __dict__ = {'colno': 68, 'lineno': 1, 'msg': 'unbalanced parenthesis', 'pattern': '^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((? __doc__ = None __eq__ = __format__ = __ge__ = __getattribute__ = __gt__ = __hash__ = __init__ = __le__ = __lt__ = __module__ = 'sre_constants' __ne__ = __new__ = __reduce__ = __reduce_ex__ = __repr__ = __setattr__ = __setstate__ = __sizeof__ = __str__ = __subclasshook__ = __suppress_context__ = False __traceback__ = __weakref__ = None args = ('unbalanced parenthesis at position 67',) colno = 68 lineno = 1 msg = 'unbalanced parenthesis' pattern = '^/usr/lib/thunderbird/thunderbird\\(|\\(((?<=/)[^/\x00]+)|((? The above is a description of an error in a Python program. Here is the original traceback: Traceback (most recent call last): File "/usr/sbin/aa-logprof", line 50, in apparmor.do_logprof_pass(logmark) File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2200, in do_logprof_pass collapse_log() File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2451, in collapse_log if not is_known_rule(aa[profile][hat], 'ptrace', ptrace_event): File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 4100, in is_known_rule if profile[rule_type].is_covered(rule_obj, False): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 363, in is_covered if r.is_covered(rule, check_allow_deny, check_audit): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 148, in is_covered return self.is_covered_localvars(other_rule) File "/usr/lib/python3/dist-packages/apparmor/rule/ptrace.py", line 141, in is_covered_localvars if not self._is_covered_aare(self.peer, self.all_peers, other_rule.peer, other_rule.all_peers, 'peer'): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 194, in _is_covered_aare if not self_value.match(other_value.regex): # XXX should check against other_value (without .regex) - but that gives different (more strict) results File "/usr/lib/python3/dist-packages/apparmor/aare.py", line 68, in match self._regex_compiled = re.compile(convert_regexp(self.regex)) File "/usr/lib/python3.5/re.py", line 224, in compile return _compile(pattern, flags) File "/usr/lib/python3.5/re.py", line 293, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.5/sre_compile.py", line 536, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.5/sre_parse.py", line 834, in parse raise source.error("unbalanced parenthesis") sre_constants.error: unbalanced parenthesis at position 67 Please consider reporting a bug at https://bugs.launchpad.net/apparmor/ and attach this file.