** Description changed:

+ [ Impact ]
+ 
+ When using systemd-coredump (that's only a default on Kubuntu if I know
+ correctly), reporting crashes might crash with TypeError:
+ self["ProcMaps"].startswith first arg must be bytes or a tuple of bytes,
+ not str.
+ 
+ [ Test Plan ]
+ 
+ Check that the autopkgtest is run successfully on all architectures
+ (except for riscv64 which hasn't been successful in the past, see bug
+ #2159030).
+ 
+ The test plan for bug #2148656 will cover this part as well.
+ 
+ [ Where problems could occur ]
+ 
+ The change is in the problem report handling. So it could affect
+ reporting bugs against Ubuntu and affect creating crash reports in the
+ first place. Fixing reporting bugs created by systemd-coredump can
+ reveal issues hidden by this failure.
+ 
+ This change has the widest scope of all bugs fixed by this SRU.
+ Monitoring
+ https://errors.ubuntu.com/?release=Ubuntu%2026.04&package=apport&period=month
+ should be done.
+ 
+ [ Other Info ]
+ 
+ This SRU addresses a big number of bugs, because it addresses the
+ several bugs that causes the autopkgtest to fail or fail under certain
+ conditions. I also bundled the fixes around reporting/retracing the bugs
+ reports that we found after modernizing the retracing infrastructure.
+ 
+ [ Orignial Report ]
+ 
  Hi,
  
  plasmashell crashed on my system, and when apport tried to upload the
  problem report, 2 Python errors occurred:
  
  TypeError: cannot use a string pattern on a bytes-like object
  TypeError: startswith first arg must be bytes or a tuple of bytes, not str
  
  Here is more context:
  
  # journalctl -b | grep whoopsie-upload-all
  Mar 30 16:54:18 vougeot whoopsie-upload-all[12777]: INFO:root:Collecting info 
for /var/crash/_usr_bin_plasmashell.1000.crash...
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]: ERROR: hook 
/usr/share/apport/general-hooks/generic.py crashed:
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]: Traceback (most recent 
call last):
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:   File 
"/usr/lib/python3/dist-packages/apport/report.py", line 314, in _run_hook
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:     
symb["add_info"](report, ui)
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:     
~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:   File 
"/usr/share/apport/general-hooks/generic.py", line 70, in add_info
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:     for lib in 
re.finditer(r"\s(/[^ ]+\.so[.0-9]*)$", report["ProcMaps"], re.M):
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:                
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:   File 
"/usr/lib/python3.14/re/__init__.py", line 285, in finditer
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:     return 
_compile(pattern, flags).finditer(string)
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]:            
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
  Mar 30 16:54:20 vougeot whoopsie-upload-all[12777]: TypeError: cannot use a 
string pattern on a bytes-like object
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]: Traceback (most recent 
call last):
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/share/apport/whoopsie-upload-all", line 246, in <module>
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     main()
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     ~~~~^^
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/share/apport/whoopsie-upload-all", line 228, in main
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     stamps = 
collect_info()
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/share/apport/whoopsie-upload-all", line 162, in collect_info
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     res = 
process_report(r)
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/share/apport/whoopsie-upload-all", line 112, in process_report
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     r.add_gdb_info()
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     ~~~~~~~~~~~~~~^^
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/lib/python3/dist-packages/apport/report.py", line 1057, in add_gdb_info
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     addr_signature = 
self.crash_signature_addresses()
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:   File 
"/usr/lib/python3/dist-packages/apport/report.py", line 1797, in 
crash_signature_addresses
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:     if 
self["ProcMaps"].startswith("Error: "):
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]:        
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
  Mar 30 16:54:22 vougeot whoopsie-upload-all[12777]: TypeError: startswith 
first arg must be bytes or a tuple of bytes, not str
  
  ProblemType: Bug
  DistroRelease: Ubuntu 26.04
  Package: apport 2.33.1-0ubuntu7
  Uname: Linux 6.19.10-zabbly+ x86_64
  ApportVersion: 2.33.1-0ubuntu7
  Architecture: amd64
  CasperMD5CheckResult: unknown
  CrashReports:
-  644:1000:110:0:2026-03-30 16:51:25.793400247 +0200:2026-03-30 
16:51:25.793400247 
+0200:/var/crash/_usr_lib_x86_64-linux-gnu_libexec_drkonqi.1000.upload
-  640:1000:110:1561169:2026-03-30 16:51:25.793400247 +0200:2026-03-30 
16:51:25.820400248 
+0200:/var/crash/_usr_lib_x86_64-linux-gnu_libexec_drkonqi.1000.crash
-  640:1000:110:48950892:2026-03-30 16:51:26.564400251 +0200:2026-03-30 
16:54:18.693028271 +0200:/var/crash/_usr_bin_plasmashell.1000.crash
-  640:0:110:24050:2026-03-30 16:54:22.381500008 +0200:2026-03-30 
16:54:22.380028258 
+0200:/var/crash/_usr_share_apport_whoopsie-upload-all.0.crash
+  644:1000:110:0:2026-03-30 16:51:25.793400247 +0200:2026-03-30 
16:51:25.793400247 
+0200:/var/crash/_usr_lib_x86_64-linux-gnu_libexec_drkonqi.1000.upload
+  640:1000:110:1561169:2026-03-30 16:51:25.793400247 +0200:2026-03-30 
16:51:25.820400248 
+0200:/var/crash/_usr_lib_x86_64-linux-gnu_libexec_drkonqi.1000.crash
+  640:1000:110:48950892:2026-03-30 16:51:26.564400251 +0200:2026-03-30 
16:54:18.693028271 +0200:/var/crash/_usr_bin_plasmashell.1000.crash
+  640:0:110:24050:2026-03-30 16:54:22.381500008 +0200:2026-03-30 
16:54:22.380028258 
+0200:/var/crash/_usr_share_apport_whoopsie-upload-all.0.crash
  CurrentDesktop: KDE
  Date: Mon Mar 30 16:55:51 2026
  PackageArchitecture: all
  SourcePackage: apport
  UpgradeStatus: Upgraded to resolute on 2026-03-29 (1 days ago)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2146806

Title:
  TypeError: self["ProcMaps"].startswith first arg must be bytes or a
  tuple of bytes, not str

To manage notifications about this bug go to:
https://bugs.launchpad.net/apport/+bug/2146806/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to