Bug 2361279

Summary: [abrt] policycoreutils-python-utils: to_string(): refpolicy.py:1229:to_string:AttributeError: 'Comment' object has no attribute 'gen_cil'
Product: [Fedora] Fedora Reporter: Robert Koppelhuber <robert.koppelhuber>
Component: policycoreutilsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 41CC: dwalsh, lvrabec, mmalik, plautrba, robert.koppelhuber, vmojzis
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/c0c3c48421bd7fcd197c883f0eb3adf78947102
Whiteboard: abrt_hash:5b33acdbd3c3c2ac409cccc1806d46a3eaf1423e;VARIANT_ID=workstation;
Fixed In Version: policycoreutils-3.7-8.fc41 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-04-30 01:38:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: environ
none
File: os_info
none
File: open_fds
none
File: cpuinfo
none
File: backtrace
none
File: mountinfo
none
File: namespaces none

Description Robert Koppelhuber 2025-04-20 23:07:07 UTC
Version-Release number of selected component:
policycoreutils-python-utils-3.7-7.fc41

Additional info:
reporter:       libreport-2.17.15
executable:     /usr/bin/audit2allow
cmdline:        /usr/bin/python3 -EsI /usr/bin/audit2allow -ve
reason:         refpolicy.py:1229:to_string:AttributeError: 'Comment' object has no attribute 'gen_cil'
package:        policycoreutils-python-utils-3.7-7.fc41
type:           Python3
uid:            1000
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.kde.konsole
interpreter:    python3-3.13.2-1.fc41.x86_64
runlevel:       N 5
crash_function: to_string
kernel:         6.13.6-200.fc41.x86_64
exception_type: AttributeError

Truncated backtrace:
refpolicy.py:1229:to_string:AttributeError: 'Comment' object has no attribute 'gen_cil'

Traceback (most recent call last):
  File "/usr/bin/audit2allow", line 399, in <module>
    app.main()
    ~~~~~~~~^^
  File "/usr/bin/audit2allow", line 387, in main
    self.__output()
    ~~~~~~~~~~~~~^^
  File "/usr/bin/audit2allow", line 353, in __output
    g.add_access(self.__avs)
    ~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/sepolgen/policygen.py", line 255, in add_access
    self.__add_av_rule(av)
    ~~~~~~~~~~~~~~~~~~^^^^
  File "/usr/lib/python3.13/site-packages/sepolgen/policygen.py", line 182, in __add_av_rule
    rule.comment = str(refpolicy.Comment(explain_access(av, verbosity=self.explain)))
                   ~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.13/site-packages/sepolgen/refpolicy.py", line 1242, in __str__
    return self.to_string()
           ~~~~~~~~~~~~~~^^
  File "/usr/lib/python3.13/site-packages/sepolgen/refpolicy.py", line 1229, in to_string
    if self.gen_cil:
       ^^^^^^^^^^^^
AttributeError: 'Comment' object has no attribute 'gen_cil'

Local variables in innermost frame:
self: <sepolgen.refpolicy.Comment object at 0x7f7975c6cd70>
out: []
line: ' audit(1729029652.784:1932):'

Comment 1 Robert Koppelhuber 2025-04-20 23:07:12 UTC
Created attachment 2086052 [details]
File: environ

Comment 2 Robert Koppelhuber 2025-04-20 23:07:13 UTC
Created attachment 2086053 [details]
File: os_info

Comment 3 Robert Koppelhuber 2025-04-20 23:07:15 UTC
Created attachment 2086054 [details]
File: open_fds

Comment 4 Robert Koppelhuber 2025-04-20 23:07:16 UTC
Created attachment 2086055 [details]
File: cpuinfo

Comment 5 Robert Koppelhuber 2025-04-20 23:07:18 UTC
Created attachment 2086056 [details]
File: backtrace

Comment 6 Robert Koppelhuber 2025-04-20 23:07:19 UTC
Created attachment 2086057 [details]
File: mountinfo

Comment 7 Robert Koppelhuber 2025-04-20 23:07:21 UTC
Created attachment 2086058 [details]
File: namespaces

Comment 9 Fedora Update System 2025-04-23 15:24:55 UTC
FEDORA-2025-8e9bf8b437 (policycoreutils-3.7-8.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-8e9bf8b437

Comment 10 Fedora Update System 2025-04-24 04:33:21 UTC
FEDORA-2025-8e9bf8b437 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-8e9bf8b437`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-8e9bf8b437

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2025-04-30 01:38:30 UTC
FEDORA-2025-8e9bf8b437 (policycoreutils-3.7-8.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.