You are not logged in.

#1 2023-06-27 04:44:31

STUART
Member
From: Seattle, WA
Registered: 2010-08-19
Posts: 52
Website

Segfault when starting mozillavpn

I've tried installing mozillavpn from the AUR using `paru mozillavpn` (plus a couple `makepkg -si` calls with the alternative PKGBUILDs listed in the comments there), and every time I run `mozillavpn` (not counting commands like `mozillavpn --help`, which prints usage and exits successfully), the command fails with a segmentation fault.

Here's the stack trace from `coredumpctl info`:

Stack trace of thread 90508:
                #0  0x00007fef82c927dc n/a (libc.so.6 + 0x1697dc)
                #1  0x00007fef81735b3a px_manager_is_ignore (libpxbackend-1.0.so + 0x5b3a)
                #2  0x00007fef8173627b n/a (libpxbackend-1.0.so + 0x627b)
                #3  0x00007fef81736a8f px_manager_get_configuration (libpxbackend-1.0.so + 0x6a8f)
                #4  0x00007fef81736fee px_manager_get_proxies_sync (libpxbackend-1.0.so + 0x6fee)
                #5  0x00007fef85d5723e px_proxy_factory_get_proxies (libproxy.so.1 + 0x123e)
                #6  0x00007fef84d682b8 _ZN20QNetworkProxyFactory19systemProxyForQueryERK18QNetworkProxyQuery (libQt6Network.so.6 + 0xfc2b8)
                #7  0x00007fef84d04bc6 n/a (libQt6Network.so.6 + 0x98bc6)
                #8  0x00007fef84d05c1b _ZN20QNetworkProxyFactory13proxyForQueryERK18QNetworkProxyQuery (libQt6Network.so.6 + 0x99c1b)
                #9  0x00007fef84d0f270 n/a (libQt6Network.so.6 + 0xa3270)
                #10 0x00007fef84d0f998 n/a (libQt6Network.so.6 + 0xa3998)
                #11 0x00007fef84d06978 n/a (libQt6Network.so.6 + 0x9a978)
                #12 0x00007fef84d07541 _ZN15QAbstractSocket4bindEt6QFlagsINS_8BindFlagEE (libQt6Network.so.6 + 0x9b541)
                #13 0x0000558514b839aa n/a (mozillavpn + 0x2ba9aa)
                #14 0x0000558514b7428f n/a (mozillavpn + 0x2ab28f)
                #15 0x0000558514bc37b8 n/a (mozillavpn + 0x2fa7b8)
                #16 0x0000558514b619d0 n/a (mozillavpn + 0x2989d0)
                #17 0x0000558514b5656f n/a (mozillavpn + 0x28d56f)
                #18 0x0000558514b60ed0 n/a (mozillavpn + 0x297ed0)
                #19 0x0000558514b5834c n/a (mozillavpn + 0x28f34c)
                #20 0x0000558514a326cb n/a (mozillavpn + 0x1696cb)
                #21 0x00007fef82b4c850 n/a (libc.so.6 + 0x23850)
                #22 0x00007fef82b4c90a __libc_start_main (libc.so.6 + 0x2390a)
                #23 0x0000558514a359f5 n/a (mozillavpn + 0x16c9f5)
                
                Stack trace of thread 90513:
                #0  0x0000558514c8be03 n/a (mozillavpn + 0x3c2e03)
                #1  0x0000558514c351e7 n/a (mozillavpn + 0x36c1e7)
                #2  0x0000558514c63171 n/a (mozillavpn + 0x39a171)
                #3  0x0000558514c61cb5 n/a (mozillavpn + 0x398cb5)
                #4  0x0000558514c61bfa n/a (mozillavpn + 0x398bfa)
                #5  0x0000558514c87c25 n/a (mozillavpn + 0x3bec25)
                ELF object binary architecture: AMD x86-64

Offline

#2 2023-06-27 11:59:54

loqs
Member
Registered: 2014-03-06
Posts: 18,041

Re: Segfault when starting mozillavpn

The issue looks to be in libproxy.  Can you produce a backtrace with debug symbols?

Offline

#3 2023-06-27 17:35:57

STUART
Member
From: Seattle, WA
Registered: 2010-08-19
Posts: 52
Website

Re: Segfault when starting mozillavpn

Here's the output from running:

Starting program: /usr/bin/mozillavpn 
[Thread debugging using libthread_db enabled]                                                                                                                                            
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff14a56c0 (LWP 142736)]                                                                                                                                                 
[New Thread 0x7fffc57ff6c0 (LWP 142737)]
[New Thread 0x7fffc4ffe6c0 (LWP 142738)]
[New Thread 0x7fffbf7fe6c0 (LWP 142739)]
[New Thread 0x7fffbffff6c0 (LWP 142740)]
[New Thread 0x7fffbeffd6c0 (LWP 142741)]
[New Thread 0x7fffbe7fc6c0 (LWP 142742)]                                                                                                                                                 
[New Thread 0x7fffbd10b6c0 (LWP 142743)]                                                                                                                                                 
[New Thread 0x7fffbc90a6c0 (LWP 142744)]
[New Thread 0x7fff9ffff6c0 (LWP 142745)]
[New Thread 0x7fff9f7fe6c0 (LWP 142746)]
[New Thread 0x7fff9effd6c0 (LWP 142747)]                                                                                                                                                 
[New Thread 0x7fff9e6dc6c0 (LWP 142748)]                                                                                                                                                 
[Thread 0x7fff9e6dc6c0 (LWP 142748) exited]
[New Thread 0x7fff9e6dc6c0 (LWP 142749)]
[New Thread 0x7fff9ce3b6c0 (LWP 142750)]
[Thread 0x7fff9e6dc6c0 (LWP 142749) exited]
[New Thread 0x7fff9e6dc6c0 (LWP 142751)]
[New Thread 0x7fff87fff6c0 (LWP 142752)]
[Thread 0x7fff9e6dc6c0 (LWP 142751) exited]
[New Thread 0x7fff9e6dc6c0 (LWP 142753)]
[New Thread 0x7fff877fe6c0 (LWP 142754)]
[Thread 0x7fff9ce3b6c0 (LWP 142750) exited]
[Thread 0x7fff9e6dc6c0 (LWP 142753) exited]
[New Thread 0x7fff9e6dc6c0 (LWP 142755)]
[New Thread 0x7fff9ce3b6c0 (LWP 142756)]
[Thread 0x7fff87fff6c0 (LWP 142752) exited]                                                                                                                                              
[Thread 0x7fff877fe6c0 (LWP 142754) exited]
[New Thread 0x7fff877fe6c0 (LWP 142757)]
[New Thread 0x7fff87fff6c0 (LWP 142758)]                                                                                                                                                 
[New Thread 0x7fff869ff6c0 (LWP 142759)]
[New Thread 0x7fff861fe6c0 (LWP 142760)]
[New Thread 0x7fff859fd6c0 (LWP 142761)]

Thread 1 "mozillavpn" received signal SIGSEGV, Segmentation fault.
__strlen_evex () at ../sysdeps/x86_64/multiarch/strlen-evex.S:88
88              VPCMPEQ (%rdi), %VZERO, %k0

Here is the full gdb trace log.

Offline

#4 2023-06-27 17:55:01

loqs
Member
Registered: 2014-03-06
Posts: 18,041

Re: Segfault when starting mozillavpn

I think the issue is https://github.com/libproxy/libproxy/bl … ger.c#L719

    if (ignore_host[0] == '.' && ((g_ascii_strncasecmp (host, ignore_host + 1, strlen (host)) == 0) || g_str_has_suffix (host, ignore_host)))

The backtrace shows host is NULL.  Can g_ascii_strncasecmp handle host being NULL?
Edit:
What if you patch libproxy with the following change (note the last line has a space on it)

diff --git a/src/backend/px-manager.c b/src/backend/px-manager.c
index 204d517..8b5700d 100644
--- a/src/backend/px-manager.c
+++ b/src/backend/px-manager.c
@@ -715,7 +715,7 @@ ignore_domain (GUri *uri,
    *  - *.domain.com or *.domain.com:80
    *  - domain.com or domain.com:80
    */
-  if (strlen (ignore_host) > 2) {
+  if (host && strlen (ignore_host) > 2) {
     if (ignore_host[0] == '.' && ((g_ascii_strncasecmp (host, ignore_host + 1, strlen (host)) == 0) || g_str_has_suffix (host, ignore_host)))
       return (ignore_port == -1 || port == ignore_port);
 

Last edited by loqs (2023-06-27 19:31:12)

Offline

#5 2023-07-01 08:36:09

STUART
Member
From: Seattle, WA
Registered: 2010-08-19
Posts: 52
Website

Re: Segfault when starting mozillavpn

Ran another update (which updated libproxy) and restarted, and the segfault issue seems to be fixed - thanks for the help!

Offline

Board footer

Powered by FluxBB