Bug 484712 - SMB4K crashed when iPhone is connected on Fedora 40
Summary: SMB4K crashed when iPhone is connected on Fedora 40
Status: REPORTED
Alias: None
Product: Smb4k
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR crash
Target Milestone: ---
Assignee: Alexander Reinholdt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-29 13:24 UTC by Gregory Duhamel
Modified: 2024-10-26 12:50 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Backtrace (7.08 KB, text/plain)
2024-03-30 16:12 UTC, Gregory Duhamel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory Duhamel 2024-03-29 13:24:31 UTC
***
This is what i see using strace : 

newfstatat(AT_FDCWD, "/var/run/usbmuxd", {st_mode=S_IFSOCK|0666, st_size=0, ...}, 0) = 0
socket(AF_UNIX, SOCK_STREAM, 0)         = 23
setsockopt(23, SOL_SOCKET, SO_SNDBUF, [131072], 4) = 0
setsockopt(23, SOL_SOCKET, SO_RCVBUF, [131072], 4) = 0
fcntl(23, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(23, F_SETFL, O_RDWR|O_NONBLOCKKCrash: Application 'smb4k' crashing...
)   = 0
connect(23, {sa_family=AF_UNIX, sun_path="/var/run/usbmuxd"}, 110) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1b} ---
The Wayland connection experienced a fatal error: Bad file descriptor
+++ exited with 1 +++
***

SUMMARY


STEPS TO REPRODUCE
1. Connect iPhone to workstation
2. Open smb4k
3. Instant crash

OBSERVED RESULT

smb4K crash instantly

EXPECTED RESULT

When iPhone is not connected smb4k work like a charm.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40
KDE Plasma Version: 6.0.2
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.8.2-300.fc40.x86_64 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
Comment 1 Alexander Reinholdt 2024-03-29 17:59:35 UTC
Thank you for reporting this issue! I tried to reproduce this by plugging in my Android based phone via USB-C, but Smb4K did not crash. Could you please shortly explain, how you connect your iPhone? Also, is it possible to get a backtrace of the crash? That would be very helpful for finding the problem.
Comment 2 Gregory Duhamel 2024-03-30 16:12:18 UTC
(In reply to Alexander Reinholdt from comment #1)
> Thank you for reporting this issue! I tried to reproduce this by plugging in
> my Android based phone via USB-C, but Smb4K did not crash. Could you please
> shortly explain, how you connect your iPhone? Also, is it possible to get a
> backtrace of the crash? That would be very helpful for finding the problem.

Hello Alexander,

Thanks for your quick answer. My iPhone is plugged through USB-C also. And it seems the issue is with usbmuxd (https://github.com/libimobiledevice/usbmuxd) socket, at least it's what I'm looking, and this is dedicated to iOS devices so i think you would not be able to reproduce this with an Android phone (or at least i don't know how to do that).

You will find the backtrace attached.
Comment 3 Gregory Duhamel 2024-03-30 16:12:45 UTC
Created attachment 167948 [details]
Backtrace
Comment 4 Alexander Reinholdt 2024-03-31 07:52:08 UTC
Thank you very much for the backtrace. It indicates that the crash seems to happen when QNetworkInterface::allInterfaces() is called in Smb4KHardwareManager::checkOnlineState(). Also, the backtrace points indeed to usbmuxd as the route cause. So, I think the problem is located outside of Smb4K. At the moment I'm wondering whether I can do anything about the crash on the Smb4K side...
Comment 5 Brett Hagen 2024-10-11 19:10:35 UTC
This has happened to me as well.  What traces could I include to help with this?
Comment 6 Alexander Reinholdt 2024-10-26 12:50:26 UTC
(In reply to Brett Hagen from comment #5)
> This has happened to me as well.  What traces could I include to help with
> this?

Could you please provide the crash report that is generated when Smb4K crashes? If possible, please install debug symbols so that the location where the application crashed can be identified.