Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 730924 - mail-mta/protonmail-bridge-bin-1.2.7 crashes on Wayland without QT_QPA_PLATFORM=xcb
Summary: mail-mta/protonmail-bridge-bin-1.2.7 crashes on Wayland without QT_QPA_PLATFO...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Piotr Karbowski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-05 13:22 UTC by Althorion
Modified: 2020-12-03 15:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Althorion 2020-07-05 13:22:43 UTC
mail-mta/protonmail-bridge-bin-1.2.7 crashes at start with the following output:

NFO[0000] Run app                                       appLong="Protonmail Bridge" appShort=bridge args="[protonmail-bridge-bin]" build="2020-05-19T00:33:31+0200" pkg=main revision=50ed40f205 runtime=linux version=1.2.7
SIGABRT: abort
PC=0x7ff1f935d53f m=0 sigcode=18446744073709551610
signal arrived during cgo execution

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0xf6ae40, 0xc00053c6e0, 0x10bc000)
	runtime/cgocall.go:128 +0x5b fp=0xc00053c6b0 sp=0xc00053c678 pc=0x4e60db
github.com/therecipe/qt/widgets._Cfunc_QApplication_NewQApplication(0xc000000001, 0x257e3c0, 0x0)
	_cgo_gotypes.go:1857 +0x4e fp=0xc00053c6e0 sp=0xc00053c6b0 pc=0xd222de
github.com/therecipe/qt/widgets.NewQApplication(0x1, 0xc0000321d0, 0x1, 0x1, 0x0)
	github.com/therecipe/qt@v0.0.0-20200126204426-5074eb6d8c41/widgets/widgets-minimal.go:1768 +0xee fp=0xc00053c778 sp=0xc00053c6e0 pc=0xd4a5ee
github.com/ProtonMail/proton-bridge/internal/frontend/qt.(*FrontendQt).qtExecute(0xc000112d80, 0x1266800, 0xc000112d80, 0xc000112d80)
	github.com/ProtonMail/proton-bridge@/internal/frontend/qt/frontend.go:304 +0x74 fp=0xc00053c830 sp=0xc00053c778 pc=0xdd11a4
github.com/ProtonMail/proton-bridge/internal/frontend/qt.(*FrontendQt).Loop(0xc000112d80, 0x0, 0x0, 0x1, 0x1)
	github.com/ProtonMail/proton-bridge@/internal/frontend/qt/frontend.go:172 +0x6e fp=0xc00053c860 sp=0xc00053c830 pc=0xdd014e
main.run(0xc00057a000, 0x0, 0xc000568080)
	github.com/ProtonMail/proton-bridge@/main.go:328 +0x1414 fp=0xc00053ce98 sp=0xc00053c860 pc=0xedb504
github.com/urfave/cli.HandleAction(0x1049640, 0x1269f18, 0xc00057a000, 0xc00057a000, 0x0)
	github.com/urfave/cli@v1.22.3/app.go:526 +0xbe fp=0xc00053cec0 sp=0xc00053ce98 pc=0xebe62e
github.com/urfave/cli.(*App).Run(0xc00055e000, 0xc0000321d0, 0x1, 0x1, 0x0, 0x0)
	github.com/urfave/cli@v1.22.3/app.go:288 +0x5ec fp=0xc00053d208 sp=0xc00053cec0 pc=0xebc59c
main.main()
	github.com/ProtonMail/proton-bridge@/main.go:146 +0xefb fp=0xc00053df60 sp=0xc00053d208 pc=0xed9d2b
runtime.main()
	runtime/proc.go:203 +0x21e fp=0xc00053dfe0 sp=0xc00053df60 pc=0x513d6e
runtime.goexit()
	runtime/asm_amd64.s:1357 +0x1 fp=0xc00053dfe8 sp=0xc00053dfe0 pc=0x540411

goroutine 6 [syscall]:
os/signal.signal_recv(0x0)
	runtime/sigqueue.go:147 +0x9c
os/signal.loop()
	os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
	os/signal/signal_unix.go:29 +0x41

goroutine 82 [sleep]:
runtime.goparkunlock(...)
	runtime/proc.go:310
time.Sleep(0xdf8475800)
	runtime/time.go:105 +0x157
github.com/ProtonMail/proton-bridge/pkg/config.watchLogFileSize.func1(0xc000586240, 0x2d, 0xc00057c140, 0x11)
	github.com/ProtonMail/proton-bridge@/pkg/config/logs.go:162 +0x30
created by github.com/ProtonMail/proton-bridge/pkg/config.watchLogFileSize
	github.com/ProtonMail/proton-bridge@/pkg/config/logs.go:160 +0x5d

goroutine 33 [chan receive]:
github.com/ProtonMail/proton-bridge/internal/bridge.(*Bridge).watchBridgeOutdated(0xc0001fc380)
	github.com/ProtonMail/proton-bridge@/internal/bridge/bridge.go:172 +0xb4
github.com/ProtonMail/proton-bridge/internal/bridge.New.func1(0x13cf080, 0xc00056a1f0, 0xc0001fc380)
	github.com/ProtonMail/proton-bridge@/internal/bridge/bridge.go:105 +0x5f
created by github.com/ProtonMail/proton-bridge/internal/bridge.New
	github.com/ProtonMail/proton-bridge@/internal/bridge/bridge.go:103 +0x2cb

goroutine 100 [chan receive]:
github.com/ProtonMail/proton-bridge/internal/bridge.(*Bridge).heartbeat(0xc0001fc380)
	github.com/ProtonMail/proton-bridge@/internal/bridge/bridge.go:125 +0x7a
created by github.com/ProtonMail/proton-bridge/internal/bridge.New
	github.com/ProtonMail/proton-bridge@/internal/bridge/bridge.go:118 +0x4a9

goroutine 98 [IO wait]:
internal/poll.runtime_pollWait(0x7ff1f0855fb8, 0x72, 0xffffffffffffffff)
	runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc00051a418, 0x72, 0x1d00, 0x1d31, 0xffffffffffffffff)
	internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc00051a400, 0xc00019e000, 0x1d31, 0x1d31, 0x0, 0x0, 0x0)
	internal/poll/fd_unix.go:169 +0x1cf
net.(*netFD).Read(0xc00051a400, 0xc00019e000, 0x1d31, 0x1d31, 0x203000, 0x7ff1f6b4af40, 0x7f)
	net/fd_unix.go:202 +0x4f
net.(*conn).Read(0xc00001e000, 0xc00019e000, 0x1d31, 0x1d31, 0x0, 0x0, 0x0)
	net/net.go:184 +0x68
crypto/tls.(*atLeastReader).Read(0xc000222fe0, 0xc00019e000, 0x1d31, 0x1d31, 0x0, 0x8, 0xc0001df8a0)
	crypto/tls/conn.go:780 +0x60
bytes.(*Buffer).ReadFrom(0xc0005785d8, 0x13cd9c0, 0xc000222fe0, 0x4ed415, 0x109b640, 0x115f820)
	bytes/buffer.go:204 +0xb4
crypto/tls.(*Conn).readFromUntil(0xc000578380, 0x13cf220, 0xc00001e000, 0x5, 0xc00001e000, 0x4ef436)
	crypto/tls/conn.go:802 +0xec
crypto/tls.(*Conn).readRecordOrCCS(0xc000578380, 0x0, 0x0, 0x3)
	crypto/tls/conn.go:609 +0x124
crypto/tls.(*Conn).readRecord(...)
	crypto/tls/conn.go:577
crypto/tls.(*Conn).Read(0xc000578380, 0xc000157000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	crypto/tls/conn.go:1255 +0x161
net/http.(*persistConn).Read(0xc00040ca20, 0xc000157000, 0x1000, 0x1000, 0xc000556120, 0xc0001dfc20, 0x4e7ff5)
	net/http/transport.go:1758 +0x75
bufio.(*Reader).fill(0xc00050c5a0)
	bufio/bufio.go:100 +0x103
bufio.(*Reader).Peek(0xc00050c5a0, 0x1, 0x0, 0x0, 0x1, 0xc000042d00, 0x0)
	bufio/bufio.go:138 +0x4f
net/http.(*persistConn).readLoop(0xc00040ca20)
	net/http/transport.go:1911 +0x1d6
created by net/http.(*Transport).dialConn
	net/http/transport.go:1580 +0xb0d

goroutine 85 [chan receive]:
github.com/ProtonMail/proton-bridge/internal/smtp.(*smtpServer).monitorDisconnectedUsers(0xc000208080)
	github.com/ProtonMail/proton-bridge@/internal/smtp/server.go:102 +0x149
created by github.com/ProtonMail/proton-bridge/internal/smtp.(*smtpServer).ListenAndServe
	github.com/ProtonMail/proton-bridge@/internal/smtp/server.go:73 +0x57

goroutine 99 [select]:
net/http.(*persistConn).writeLoop(0xc00040ca20)
	net/http/transport.go:2210 +0x123
created by net/http.(*Transport).dialConn
	net/http/transport.go:1581 +0xb32

goroutine 101 [chan receive]:
github.com/ProtonMail/proton-bridge/internal/imap.(*imapBackend).monitorDisconnectedUsers(0xc00050a360)
	github.com/ProtonMail/proton-bridge@/internal/imap/backend.go:215 +0xc1
created by github.com/ProtonMail/proton-bridge/internal/imap.NewIMAPBackend
	github.com/ProtonMail/proton-bridge@/internal/imap/backend.go:68 +0xfa

goroutine 102 [IO wait]:
internal/poll.runtime_pollWait(0x7ff1f0855d48, 0x72, 0x0)
	runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc0005d2498, 0x72, 0x0, 0x0, 0x11af725)
	internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc0005d2480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	internal/poll/fd_unix.go:384 +0x1f8
net.(*netFD).accept(0xc0005d2480, 0xc0003c19b0, 0x30, 0x30)
	net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0001f6300, 0xc0003c19b0, 0x126a8b0, 0xc0001cba60)
	net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0001f6300, 0xc0001cbac0, 0x7e68af, 0xc0001cba90, 0x4efca8)
	net/tcpsock.go:261 +0x47
crypto/tls.(*listener).Accept(0xc0001f6e20, 0x111f040, 0xc0003c19b0, 0x1079c40, 0x1d80e50)
	crypto/tls/tls.go:59 +0x37
net/http.(*Server).Serve(0xc0002560e0, 0x1405320, 0xc0001f6e20, 0x0, 0x0)
	net/http/server.go:2896 +0x280
net/http.(*Server).ServeTLS(0xc0002560e0, 0x1406420, 0xc0001f6300, 0xc000262200, 0x32, 0xc000262240, 0x31, 0x0, 0x0)
	net/http/server.go:2968 +0x275
net/http.(*Server).ListenAndServeTLS(0xc0002560e0, 0xc000262200, 0x32, 0xc000262240, 0x31, 0x0, 0x0)
	net/http/server.go:3125 +0x145
github.com/ProtonMail/proton-bridge/internal/api.(*apiServer).ListenAndServe(0xc00022e280)
	github.com/ProtonMail/proton-bridge@/internal/api/api.go:76 +0x24d
main.run.func1(0xc00056a1f0, 0xc000571bc0, 0xc00059a180, 0xc000582000, 0x1410fa0, 0xc00056edb0)
	github.com/ProtonMail/proton-bridge@/main.go:285 +0x152
created by main.run
	github.com/ProtonMail/proton-bridge@/main.go:282 +0xf75

goroutine 103 [IO wait]:
internal/poll.runtime_pollWait(0x7ff1f0855e18, 0x72, 0x0)
	runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc000284098, 0x72, 0x0, 0x0, 0x11af725)
	internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000284080, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	internal/poll/fd_unix.go:384 +0x1f8
net.(*netFD).accept(0xc000284080, 0xc0001e7db0, 0xc00031a000, 0x1700000000000000)
	net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc000236000, 0xc0001e7d10, 0xc0001e7d18, 0x18)
	net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc000236000, 0x1267538, 0xc00024c000, 0xc00031a088, 0x11abf71)
	net/tcpsock.go:261 +0x47
github.com/emersion/go-imap/server.(*Server).Serve(0xc00024c000, 0x1406420, 0xc000236000, 0x0, 0x0)
	@/github.com/emersion/go-imap/server/server.go:211 +0x211
github.com/emersion/go-imap/server.(*Server).ListenAndServe(0xc00024c000, 0x4, 0xc0000b6ef8)
	@/github.com/emersion/go-imap/server/server.go:242 +0xad
github.com/ProtonMail/proton-bridge/internal/imap.(*imapServer).ListenAndServe(0xc000210200)
	github.com/ProtonMail/proton-bridge@/internal/imap/server.go:120 +0x116
main.run.func2(0xc00056a1f0, 0xc000571bc0, 0xc000590000, 0xc00059a180, 0xc00050a360, 0x1410fa0, 0xc00056edb0)
	github.com/ProtonMail/proton-bridge@/main.go:292 +0xe6
created by main.run
	github.com/ProtonMail/proton-bridge@/main.go:288 +0xff2

goroutine 104 [IO wait]:
internal/poll.runtime_pollWait(0x7ff1f0855ee8, 0x72, 0x0)
	runtime/netpoll.go:184 +0x55
internal/poll.(*pollDesc).wait(0xc00051a498, 0x72, 0x0, 0x0, 0x11af725)
	internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc00051a480, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	internal/poll/fd_unix.go:384 +0x1f8
net.(*netFD).accept(0xc00051a480, 0x0, 0x0, 0x13ffb20)
	net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc0002080e0, 0x0, 0x11abf71, 0x51117a)
	net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0002080e0, 0x140cee0, 0xc000038100, 0x11abf71, 0x3)
	net/tcpsock.go:261 +0x47
github.com/emersion/go-smtp.(*Server).Serve(0xc00029c000, 0x1406420, 0xc0002080e0, 0x0, 0x0)
	@/github.com/emersion/go-smtp/server.go:73 +0xdb
github.com/emersion/go-smtp.(*Server).ListenAndServe(0xc00029c000, 0xc000000004, 0xc0001dcc50)
	@/github.com/emersion/go-smtp/server.go:139 +0xac
github.com/ProtonMail/proton-bridge/internal/smtp.(*smtpServer).ListenAndServe(0xc000208080)
	github.com/ProtonMail/proton-bridge@/internal/smtp/server.go:81 +0x512
main.run.func3(0xc00056a1f0, 0xc000571bc0, 0xc000590000, 0xc00059a180, 0xc000111270, 0x1410fa0, 0xc00056edb0)
	github.com/ProtonMail/proton-bridge@/main.go:300 +0x150
created by main.run
	github.com/ProtonMail/proton-bridge@/main.go:295 +0x106f

goroutine 11 [chan receive]:
github.com/ProtonMail/proton-bridge/internal/imap.(*imapServer).monitorDisconnectedUsers(0xc000210200)
	github.com/ProtonMail/proton-bridge@/internal/imap/server.go:140 +0x19f
created by github.com/ProtonMail/proton-bridge/internal/imap.(*imapServer).ListenAndServe
	github.com/ProtonMail/proton-bridge@/internal/imap/server.go:117 +0x54

goroutine 105 [select]:
github.com/ProtonMail/proton-bridge/internal/frontend/qt.(*FrontendQt).watchEvents(0xc000112d80)
	github.com/ProtonMail/proton-bridge@/internal/frontend/qt/frontend.go:191 +0x71b
github.com/ProtonMail/proton-bridge/internal/frontend/qt.(*FrontendQt).Loop.func1(0xc000112d80)
	github.com/ProtonMail/proton-bridge@/internal/frontend/qt/frontend.go:170 +0x62
created by github.com/ProtonMail/proton-bridge/internal/frontend/qt.(*FrontendQt).Loop
	github.com/ProtonMail/proton-bridge@/internal/frontend/qt/frontend.go:168 +0x54

goroutine 68 [chan receive]:
github.com/emersion/go-imap/server.(*Server).listenUpdates(0xc00024c000, 0xc00031a088, 0x11abf71)
	@/github.com/emersion/go-imap/server/server.go:298 +0xc8
created by github.com/emersion/go-imap/server.(*Server).Serve
	@/github.com/emersion/go-imap/server/server.go:208 +0x138

rax    0x0
rbx    0x7ff1f6b81780
rcx    0x7ff1f935d53f
rdx    0x0
rdi    0x2
rsi    0x7fff7fac4f90
rbp    0x7fff7fac5440
rsp    0x7fff7fac4f90
r8     0x0
r9     0x7fff7fac4f90
r10    0x8
r11    0x246
r12    0x25873d0
r13    0x7fff7fac5440
r14    0x18
r15    0x7fff7fac5450
rip    0x7ff1f935d53f
rflags 0x246
cs     0x33
fs     0x0
gs     0x0

Reproducible: Always

Steps to Reproduce:
1. Emerge the package.
2. Run it.
Actual Results:  
immediate crash with the above error
Comment 1 Piotr Karbowski (RETIRED) gentoo-dev 2020-07-08 19:19:22 UTC
Hi,

I have a handful of questions:
- How do you run it? As root, as normal user?
- Are you running Xorg or Wayland?
- Have you tried on another user?
Comment 2 Althorion 2020-07-13 17:10:36 UTC
Normal user, under Wayland. I installed XWayland and it works under that, so probably it work too under X.org.

Creating new user changes nothing.
Comment 3 Piotr Karbowski (RETIRED) gentoo-dev 2020-07-18 07:16:45 UTC
So, it works when you have installed Xwayland? Does it mean that it was crashing for you without Xserver around, or what is the nature of this bug?
Comment 4 Althorion 2020-07-18 17:27:27 UTC
It crashes on a default install. I can make it work by installing XWayland and forcing it to use it by QT_QPA_PLATFORM=xcb, just installing XWayland is not enough.
Comment 5 Piotr Karbowski (RETIRED) gentoo-dev 2020-07-18 17:34:06 UTC
In that case you should report it upstream, that protonmail-bridge does not work on Wayland without QT_QPA_PLATFORM=xcb.