> they have to do with python applications with apport hooks that are confined with apparmor.
The hook is defined in site.py, so by definition all python applications have the hook, and thus all python applications that are confined with apparmor. So either we want that apport for all of them, or (what I think makes more sense) none of them. I guess the question is: Shouldn't we have a python-apport abstraction that apps (or local admin) can include to make debugging work under apparmor? It should probably live in apport, I guess, so apport can define which files it needs. IIRC, the gcc stuff is irrelevant, that comes from ctypes, imported from magic, not from apport. But that might also be a case where it could be useful to have a python-ctypes abstraction, probably shipped in python. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apparmor in Ubuntu. https://bugs.launchpad.net/bugs/1824961 Title: AppArmor blocks apport python hook from working Status in AppArmor: New Status in apparmor package in Ubuntu: New Status in kopanocore package in Ubuntu: New Bug description: The Python profile is very strict, but it prevents Python applications from producing proper crash reports using apport, as the apport hook cannot be loaded, as it requires access to dpkg's cputable, and likely also apt config files and dpkg status files. I'm wondering what the right approach here is: Should the apport hook work under AppArmor, and do we thus have to add the files the hook needs; or should we just say "screw it, we want the additional security" and not get proper error reporting while AppArmor is confining the program? This can be seen in recent autopkgtest failure for kopanocore: + kopano-search --help Traceback (most recent call last): File "/usr/sbin/kopano-search", line 4, in <module> import kopano_search File "/usr/lib/python3/dist-packages/kopano_search/__init__.py", line 18, in <module> from queue import Empty File "/usr/lib/python3.7/queue.py", line 16, in <module> from _queue import Empty ImportError: /usr/lib/python3.7/lib-dynload/_queue.cpython-37m-x86_64-linux-gnu.so: failed to map segment from shared object Error in sys.excepthook: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook from apport.fileutils import likely_packaged, get_recent_crashes File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module> from apport.report import Report File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module> import apport.fileutils File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module> from apport.packaging_impl import impl as packaging File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module> import apt File "/usr/lib/python3/dist-packages/apt/__init__.py", line 35, in <module> apt_pkg.init_system() apt_pkg.Error: E:Error reading the CPU table To manage notifications about this bug go to: https://bugs.launchpad.net/apparmor/+bug/1824961/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp