You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to simulate starting a KrakenTalk phone call with a Javascript script by opening a websocket to the endpoint https://beta.twitarr.com/api/v3/phone/socket/initiate/DCB94249-4562-493D-964C-C3E733FBD5D3/to/46E2B505-FA66-4A4C-80EF-3BF5D253579F. The callID DCB94249-4562-493D-964C-C3E733FBD5D3 is a random UUID I generated. The userID 46E2B505-FA66-4A4C-80EF-3BF5D253579F is the sam user.
If Sam doesn't have a notification socket open (like if it's only logged in via the browser) then the app basically does nothing which is expected and produces the following logs:
[ INFO ] GET /api/v3/phone/socket/initiate/DCB94249-4562-493D-964C-C3E733FBD5D3/to/46E2B505-FA66-4A4C-80EF-3BF5D253579F -> 101 Switching Protocols [request-id: A73EACD1-186D-4825-B3CB-C24FC1D43EDB]
[ NOTICE ] Attempt to call user with no notification socket. [request-id: A73EACD1-186D-4825-B3CB-C24FC1D43EDB]
But if Sam is logged in via Tricordarr which opens a notification socket and the same call is made, the app immediately crashes:
[ INFO ] GET /api/v3/phone/socket/initiate/DCB94249-4562-493D-964C-C3E733FBD5D3/to/46E2B505-FA66-4A4C-80EF-3BF5D253579F -> 101 Switching Protocols [request-id: 03E58630-D14C-4AAD-A90C-BF8AC441B2DC]
[ NOTICE ] Creating phone socket. [request-id: 03E58630-D14C-4AAD-A90C-BF8AC441B2DC]
[ NOTICE ] Sending incoming phonecall to callee. [request-id: 03E58630-D14C-4AAD-A90C-BF8AC441B2DC]
[ NOTICE ] Sending incoming phonecall to callee. [request-id: 03E58630-D14C-4AAD-A90C-BF8AC441B2DC]
Received signal 4. Backtrace:
[ INFO ] GET /api/v3/notification/global -> 200 OK [request-id: 50B32616-134E-4603-A527-8E104788A120]
0x55c43126bdf2, Backtrace.(printBacktrace in _B82A8C0ED7C904841114FDF244F9E58E)(signal: Swift.Int32) -> () at /app/.build/checkouts/swift-backtrace/Sources/Backtrace/Backtrace.swift:80
0x55c43126c067, closure #1 (Swift.Int32) -> () in static Backtrace.Backtrace.install(signals: Swift.Array<Swift.Int32>) -> () at /app/.build/checkouts/swift-backtrace/Sources/Backtrace/Backtrace.swift:94
0x55c43126c067, @objc closure #1 (Swift.Int32) -> () in static Backtrace.Backtrace.install(signals: Swift.Array<Swift.Int32>) -> () at /app/<compiler-generated>:93
0x7fd2dc75751f
0x55c431c76310, Swift runtime failure: precondition failure at /app/<compiler-generated>:0
0x55c431c76310, function signature specialization <Arg[0] = Dead, Arg[1] = Dead> of (extension in NIOCore):NIOCore.EventLoop.preconditionInEventLoop(file: Swift.StaticString, line: Swift.UInt) -> () at /app/<compiler-generated>:0
0x55c431c76310, (extension in NIOCore):NIOCore.EventLoop.preconditionInEventLoop(file: Swift.StaticString, line: Swift.UInt) -> () at /app/<compiler-generated>:0
0x55c431c76310, generic specialization <@Sendable (WebSocketKit.WebSocket, NIOCore.ByteBuffer) -> ()> of NIOCore.NIOLoopBoundBox.value.setter : A at /app/<compiler-generated>:0
0x55c431c76310, WebSocketKit.WebSocket.onBinary((WebSocketKit.WebSocket, NIOCore.ByteBuffer) -> ()) -> () at /app/.build/checkouts/websocket-kit/Sources/WebSocketKit/WebSocket.swift:66
0x55c431e1bf81, (4) suspend resume partial function for swiftarr.PhonecallController.createPhoneSocket(Vapor.Request, WebSocketKit.WebSocket) async -> () at /app/Sources/swiftarr/Controllers/PhonecallController.swift:274
0x7fd2dd2a50cd
0x7fd2dd2a589b
0x7fd2ddde6773
0x7fd2ddde6521
0x7fd2dddf2001
0x7fd2dc7a9ac2
0x7fd2dc83a813
0xffffffffffffffff
The Android app reported a socket message came through matching what we expect, so whatever issue here is happening immediately after the call notification goes through.
I was able to reproduce this in the Beta, my personal instance, and locally. Analyzing the coredump yields:
* thread #1, name = 'swiftarr', stop reason = signal SIGILL: illegal operand
* frame #0: 0x000056135ea49310 swiftarr`$s12WebSocketKit0aB0C8onBinaryyyyAC_7NIOCore10ByteBufferVtcF at <compiler-generated>:0
frame #1: 0x000056135ebeef82 swiftarr`$s8swiftarr19PhonecallControllerV17createPhoneSocketyy5Vapor7RequestC_03WebF3Kit0iF0CtYaFTY3_ at PhonecallController.swift:274:6
frame #2: 0x00007f321b3900ce
The text was updated successfully, but these errors were encountered:
I thought maybe this was being triggered by having multiple NotificationSockets open. But it still died even when I had only one (logged the calleeNotificationSockets.count to be sure).
I was trying to simulate starting a KrakenTalk phone call with a Javascript script by opening a websocket to the endpoint
https://beta.twitarr.com/api/v3/phone/socket/initiate/DCB94249-4562-493D-964C-C3E733FBD5D3/to/46E2B505-FA66-4A4C-80EF-3BF5D253579F
. The callIDDCB94249-4562-493D-964C-C3E733FBD5D3
is a random UUID I generated. The userID46E2B505-FA66-4A4C-80EF-3BF5D253579F
is the sam user.If Sam doesn't have a notification socket open (like if it's only logged in via the browser) then the app basically does nothing which is expected and produces the following logs:
But if Sam is logged in via Tricordarr which opens a notification socket and the same call is made, the app immediately crashes:
The Android app reported a socket message came through matching what we expect, so whatever issue here is happening immediately after the call notification goes through.
I was able to reproduce this in the Beta, my personal instance, and locally. Analyzing the coredump yields:
The text was updated successfully, but these errors were encountered: