mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-03-02 22:57:32 -05:00
Sockets are help open by child processes after exiting #14510
Labels
No labels
Accessibility
AppImage
Bounty
Build system
CI
Can't reproduce
Code cleanup
Confirmed bug
Confirmed bug
Core
Crash
Data loss
Discussion
Docker
Documentation
Duplicate
Feature
Feature request
Feature request
Feature request
Filters
Flatpak
GUI
Has workaround
I2P
Invalid
Libtorrent
Look and feel
Meta
NSIS
Network
Not an issue
OS: *BSD
OS: Linux
OS: Windows
OS: macOS
PPA
Performance
Project management
Proxy/VPN
Qt bugs
Qt6 compat
RSS
Search engine
Security
Temp folder
Themes
Translations
Triggers
Waiting diagnosis
Waiting info
Waiting upstream
Waiting web implementation
Watched folders
WebAPI
WebUI
autoCloseOldIssue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/qBittorrent#14510
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @szaszm on GitHub (Apr 11, 2023).
qBittorrent & operating system versions
qBittorrent: 4.5.2 x64
Operating system: Arch Linux
Qt: 5.15.8
libtorrent-rasterbar: 2.0.8
What is the problem?
Child processes inherit all open files, including sockets, and keep them open even after qBittorrent is closed. This causes failure to listen on the configured port when qBittorrent is restarted, but any of the previously spawned processes are still running. I've experienced this through starting a video in mpv from the Contents tab, or opening an image in gwenview, then trying to restart qBittorrent without closing all of these first.
qBittorrent should close all open file descriptors, except stdin, stdout and stderr, after
forkand beforeexec, possibly by using theO_CLOEXEC/SOCK_CLOEXECflag onopen/socket.Steps to reproduce
ss -tlnpwill list the file viewer (e.g. mpv, gwenview) as the processes having the listening socket open on the configured port.Additional context
Log(s) & preferences file(s)
No response
@cteqpah commented on GitHub (Apr 27, 2023):
@szaszm It's a long standing bug. I hope it will be fixed soon because it can be really annoying when you forget about this and wonder why your instance can't connect. Check this comment.
@szaszm commented on GitHub (Apr 27, 2023):
Closing this issue as duplicate of #10312