** Description changed:

- Here I collect a couple of issues regarding apport-retrace with "-S
- system".
+ If /etc/apt/sources.list only contains https mirrors (and not a single
+ http:// entry), then apport-retrace fails to determine the default
+ mirror:
  
- 1. apport-retrace does not work for https mirros in sources.list
- 2. If the sandbox is built successfully the stack-trace of generated does 
even contain less info than simply calling "apport-retrace -v -s -R" without 
the sandbox.
- 3. I have found fixes / workaround for issue 1. and 2., see the attached 
patches, however in the end I'm still not satisfied with the quality of the 
results:
+ apport-retrace -v -s -R -S system ./crash/_usr_bin_gnome-shell.1000.crash
+ Ign http://ddebs.ubuntu.com focal InRelease                                   
 
+ Get:1 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu focal 
InRelease [20.8 kB]
+ Get:2 http://ddebs.ubuntu.com focal Release [34.7 kB]                         
 
+ Get:3 https://mirror.init7.net/ubuntu focal InRelease [255 kB]                
 
+ Get:4 http://ddebs.ubuntu.com focal Release.gpg [819 B]                       
 
+ Get:5 http://ddebs.ubuntu.com focal/main amd64 Packages [526 kB]              
 
+ Get:6 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu focal/main 
amd64 Packages [1604 B]
+ Get:7 https://mirror.init7.net/ubuntu focal-updates InRelease [79.7 kB]       
 
+ Get:8 http://ppa.launchpad.net/saiarcot895/chromium-dev/ubuntu focal/main 
Translation-en [1084 B]
+ Get:9 https://mirror.init7.net/ubuntu focal-backports InRelease [79.7 kB]     
 
+ Get:10 https://mirror.init7.net/ubuntu focal-security InRelease [79.7 kB]     
 
+ Get:11 https://mirror.init7.net/ubuntu focal/multiverse Sources [175 kB]      
 
+ Get:12 http://ddebs.ubuntu.com focal/universe amd64 Packages [4435 kB]        
 
+ Get:13 https://mirror.init7.net/ubuntu focal/restricted Sources [7032 B]      
 
+ Get:14 https://mirror.init7.net/ubuntu focal/universe Sources [9784 kB]       
 
+ Get:15 http://ddebs.ubuntu.com focal/multiverse amd64 Packages [67.0 kB]      
 
+ Get:16 https://mirror.init7.net/ubuntu focal/main Sources [839 kB]            
 
+ Get:17 https://mirror.init7.net/ubuntu focal/main amd64 Packages [976 kB]     
 
+ Get:18 https://mirror.init7.net/ubuntu focal/main Translation-en [503 kB]     
 
+ Get:19 https://mirror.init7.net/ubuntu focal/main amd64 DEP-11 Metadata [517 
kB]
+ Get:20 https://mirror.init7.net/ubuntu focal/main DEP-11 48x48 Icons [93.7 
kB] 
+ Get:21 https://mirror.init7.net/ubuntu focal/main DEP-11 64x64 Icons [164 kB] 
 
+ Get:22 https://mirror.init7.net/ubuntu focal amd64 Contents (deb) [41.2 MB]   
 
+ Get:23 https://mirror.init7.net/ubuntu focal/restricted amd64 Packages [21.5 
kB]
+ Get:24 https://mirror.init7.net/ubuntu focal/restricted Translation-en [6136 
B]
+ Get:25 https://mirror.init7.net/ubuntu focal/universe amd64 Packages [8623 
kB] 
+ Get:26 https://mirror.init7.net/ubuntu focal/universe Translation-en [5154 
kB] 
+ Get:27 https://mirror.init7.net/ubuntu focal/universe amd64 DEP-11 Metadata 
[3619 kB]
+ Get:28 https://mirror.init7.net/ubuntu focal/universe DEP-11 48x48 Icons 
[3005 kB]
+ Get:29 https://mirror.init7.net/ubuntu focal/universe DEP-11 64x64 Icons 
[7981 kB]
+ Get:30 https://mirror.init7.net/ubuntu focal/multiverse amd64 Packages [145 
kB]
+ Get:31 https://mirror.init7.net/ubuntu focal/multiverse Translation-en [105 
kB]
+ Get:32 https://mirror.init7.net/ubuntu focal/multiverse amd64 DEP-11 Metadata 
[45.0 kB]
+ Get:33 https://mirror.init7.net/ubuntu focal/multiverse DEP-11 48x48 Icons 
[17.6 kB]
+ Get:34 https://mirror.init7.net/ubuntu focal/multiverse DEP-11 64x64 Icons 
[195 kB]
+ Fetched 88.8 MB in 6s (1341 kB/s)                                             
 
+ Fetched 0 B in 0s (0 B/s)                                                     
 
+ Extracting downloaded debs...
+ Traceback (most recent call last):
+   File "/usr/bin/apport-retrace", line 322, in <module>
+     sandbox, cache, outdated_msg = apport.sandboxutils.make_sandbox(
+   File "/usr/lib/python3/dist-packages/apport/sandboxutils.py", line 220, in 
make_sandbox
+     pkgs = needed_runtime_packages(report, sandbox_dir, pkgmap_cache_dir, 
pkg_versions, verbose)
+   File "/usr/lib/python3/dist-packages/apport/sandboxutils.py", line 92, in 
needed_runtime_packages
+     pkg = apport.packaging.get_file_package(l, True, pkgmap_cache_dir,
+   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 490, 
in get_file_package
+     return self._search_contents(file, map_cachedir, release, arch)
+   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 1296, 
in _search_contents
+     url = '%s/dists/%s%s/Contents-%s.gz' % (self._get_mirror(), release, 
pocket, arch)
+   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 1252, 
in _get_mirror
+     self._mirror = 
self._get_primary_mirror_from_apt_sources('/etc/apt/sources.list')
+   File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 1242, 
in _get_primary_mirror_from_apt_sources
+     raise SystemError('cannot determine default mirror: %s does not contain a 
valid deb line'
+ SystemError: cannot determine default mirror: /etc/apt/sources.list does not 
contain a valid deb line
  
- For example I tested apport by invoking a crash of gnome-software with kill 
-s SIGSEGV $(pidof gnome-software).
-    
- Invoking apport-retrace without sandbox (apport-retrace -R --stdout 
_usr_bin_gnome-software.1000.crash) gives me the following backtrace:
+ Tested with Ubuntu 20.04 fully upgraded as of March 14 2020.
+ You can find all relevant files attached in the tar archive attached to 
comment #10.
  
- --- stack trace ---
- #0  0x00007f3e39555c3f in __GI___poll (fds=0x55b072be60f0, nfds=3, 
timeout=6816) at ../sysdeps/unix/sysv/linux/poll.c:29
-         resultvar = 18446744073709551100
-         sc_cancel_oldtype = 0
-         sc_ret = <optimized out>
- #1  0x00007f3e3a4b21ae in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
- No symbol table info available.
- #2  0x00007f3e3a4b22e3 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- No symbol table info available.
- #3  0x00007f3e3a362ec5 in g_application_run () from 
/lib/x86_64-linux-gnu/libgio-2.0.so.0
- No symbol table info available.
- #4  0x000055b07218ed59 in main ()
- No symbol table info available.
- --- source code stack trace ---
- #0  0x00007f3e39555c3f in __GI___poll (fds=0x55b072be60f0, nfds=3, 
timeout=6816) at ../sysdeps/unix/sysv/linux/poll.c:29
-   [Error: poll.c was not found in source tree]
- #1  0x00007f3e3a4b21ae in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
- #2  0x00007f3e3a4b22e3 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- #3  0x00007f3e3a362ec5 in g_application_run () from 
/lib/x86_64-linux-gnu/libgio-2.0.so.0
- #4  0x000055b07218ed59 in main ()
- 
- Invoking apport-retrace with sandbox (apport-retrace -v -s -R -S system
- _usr_bin_gnome-software.1000.crash) gives me the following (which is not
- much better):
- 
- --- stack trace ---
- #0  0x00007f3e39555c3f in poll () from /lib/x86_64-linux-gnu/libc.so.6
- No symbol table info available.
- #1  0x00007f3e3a4b21ae in g_main_context_iterate.isra () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- No symbol table info available.
- #2  0x00007f3e3a4b22e3 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- No symbol table info available.
- #3  0x00007f3e3a362ec5 in g_application_run (application=0x55b072bbd0f0, 
argc=<optimized out>, argv=<optimized out>) at ../../../gio/gapplication.c:2559
-         arguments = 0x55b072be60d0
-         status = 0
-         context = 0x55b072be6130
-         acquired_context = 1
-         __func__ = "g_application_run"
- #4  0x000055b07218ed59 in main ()
- No symbol table info available.
- --- source code stack trace ---
- #0  0x00007f3e39555c3f in poll () from /lib/x86_64-linux-gnu/libc.so.6
- #1  0x00007f3e3a4b21ae in g_main_context_iterate.isra () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- #2  0x00007f3e3a4b22e3 in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
- #3  0x00007f3e3a362ec5 in g_application_run (application=0x55b072bbd0f0, 
argc=<optimized out>, argv=<optimized out>) at ../../../gio/gapplication.c:2559
-   [Error: gapplication.c was not found in source tree]
- #4  0x000055b07218ed59 in main ()
+ This description is updated, comments #2 - #4 shall be ignored, another
+ bug was opened for unrelated issues.

** Summary changed:

- apport-retrace can not be used with https mirrors in sources.list
+ apport-retrace sandbox can not be used with https mirrors in sources.list

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

Title:
  apport-retrace sandbox can not be used with https mirrors in
  sources.list

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to