Bug 1761143 - [abrt] policycoreutils-python-utils: module(): types.py:26:<module>:ImportError: cannot import name 'Type' from 'setools.policyrep' (/usr/lib64/python3.7/site-packages/setools/policyrep/__init__.py)
Summary: [abrt] policycoreutils-python-utils: module(): types.py:26:<module>:ImportErr...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 31
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:a1bbdf0b50a9287fb02dedf5f4a...
: 1889125 1889126 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-12 20:57 UTC by Mai Ling
Modified: 2020-10-19 09:28 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2020-10-19 09:28:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (8.49 KB, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: cgroup (331 bytes, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: cpuinfo (2.07 KB, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: environ (3.64 KB, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: mountinfo (6.98 KB, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: namespaces (129 bytes, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
File: open_fds (249 bytes, text/plain)
2019-10-12 20:57 UTC, Mai Ling
no flags Details
`journalctl -b -1` snippet from F30->F31 upgrade (7.86 KB, text/plain)
2019-11-03 22:19 UTC, Ed Marshall
no flags Details

Description Mai Ling 2019-10-12 20:57:21 UTC
Version-Release number of selected component:
policycoreutils-python-utils-2.9-1.fc30

Additional info:
reporter:       libreport-2.10.1
cmdline:        /usr/bin/python3 -Es /sbin/semanage fcontext -a -t rpm_exec_t /usr/share/dnfdaemon/dnfdaemon-system
crash_function: module
exception_type: ImportError
executable:     /sbin/semanage
interpreter:    python3-3.7.4-5.fc31.x86_64
kernel:         5.2.8-200.fc30.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
#1 [/usr/lib64/python3.7/site-packages/setools/diff/types.py:26] <module>
#2 [/usr/lib64/python3.7/site-packages/setools/diff/bounds.py:25] <module>
#3 [/usr/lib64/python3.7/site-packages/setools/diff/__init__.py:20] <module>
#4 [/usr/lib64/python3.7/site-packages/setools/__init__.py:79] <module>
#5 [/usr/lib/python3.7/site-packages/sepolicy/__init__.py:7] <module>
#6 [/usr/lib/python3.7/site-packages/seobject.py:33] <module>
#7 [/sbin/semanage:877] createCommandParser
#8 [/sbin/semanage:947] do_parser
#9 [/sbin/semanage:970] <module>

Comment 1 Mai Ling 2019-10-12 20:57:25 UTC
Created attachment 1625110 [details]
File: backtrace

Comment 2 Mai Ling 2019-10-12 20:57:28 UTC
Created attachment 1625111 [details]
File: cgroup

Comment 3 Mai Ling 2019-10-12 20:57:30 UTC
Created attachment 1625112 [details]
File: cpuinfo

Comment 4 Mai Ling 2019-10-12 20:57:32 UTC
Created attachment 1625113 [details]
File: environ

Comment 5 Mai Ling 2019-10-12 20:57:33 UTC
Created attachment 1625114 [details]
File: mountinfo

Comment 6 Mai Ling 2019-10-12 20:57:35 UTC
Created attachment 1625115 [details]
File: namespaces

Comment 7 Mai Ling 2019-10-12 20:57:37 UTC
Created attachment 1625116 [details]
File: open_fds

Comment 8 Petr Lautrbach 2019-10-14 10:53:45 UTC
(In reply to Mai Ling from comment #0)
> Version-Release number of selected component:
> policycoreutils-python-utils-2.9-1.fc30
...
> interpreter:    python3-3.7.4-5.fc31.x86_64
> kernel:         5.2.8-200.fc30.x86_64

Interpret is from Fedora 31 while policycoreutils and kernel from Fedora 30. Do you know when it happened? Are you able to reproduce it again?

What is the version of python3-setools - rpm -q python3-setools ?

Comment 9 Mai Ling 2019-10-21 19:33:55 UTC
python3-setools-4.2.2-1.fc31.x86_64
I think I booted with old kernel because I had an issue with new kernel. Will report if it ever occurs again. I don't remember what happened in this particular case, I usually report all stuff that pops up in the systray as crashes.

Comment 10 Petr Lautrbach 2019-10-22 06:26:23 UTC
Thanks. Given that I'm not able to reproduce it and it's the only one reported bug with this particular backtrace I'm going to close this bug now. If you have more information in future, feel free to reopen or file a new bug.

Comment 11 Ed Marshall 2019-11-03 22:18:21 UTC
FWIW, I just saw this exact traceback show up during a `dnf system-upgrade` from F30 to F31, during the upgrade of bind. When the machine comes up, I'll grab the relevant chunk of journal and attach it.

Comment 12 Ed Marshall 2019-11-03 22:19:20 UTC
Created attachment 1632312 [details]
`journalctl -b -1` snippet from F30->F31 upgrade

Comment 13 Petr Lautrbach 2019-11-04 07:15:13 UTC
I have another report where the reporter states that it can be reproduced using the following steps:

dnf install -y chromium dnf-plugin-system-upgrade
dnf system-upgrade download -y --releasever=31
dnf system-upgrade reboot

# wait for upgrade to finish...
# look at /var/log/dnf.rpm.log

Comment 14 Petr Lautrbach 2019-11-04 11:45:44 UTC
The problem seems to be related to the fact that setools-4.4.2 uses /usr/lib64/python3.7/site-packages/setools/policyrep.cpython-37m-x86_64-linux-gnu.so instead of /usr/lib64/python3.7/site-packages/setools/policyrep/ and it looks like that during the transaction are both modules available.

Comment 15 Martin Pitt 2019-12-03 09:57:16 UTC
This just was reported again in bug 1777001 on current F31.

Comment 16 FlyDove 2020-10-18 03:18:27 UTC
*** Bug 1889125 has been marked as a duplicate of this bug. ***

Comment 17 FlyDove 2020-10-18 03:38:01 UTC
*** Bug 1889126 has been marked as a duplicate of this bug. ***

Comment 18 Petr Lautrbach 2020-10-19 09:28:40 UTC
I wasn't able to fix it until now and given that it affects upgrades from unsupported systems I'm not going to try anymore. I'm sorry.


Note You need to log in before you can comment on or make changes to this bug.