transmission-daemon: Couldn't save file "/tmp/transmission/settings.json": Resource busy (variant.c:1226)
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
<package-name>: transmission-daemon
OpenWrt 22.03.0
Askey RT4230W REV6 / RAC2V1K
Issue
Couldn't save file "/tmp/transmission/settings.json": Resource busy (variant.c:1226)
When starting daemon.
Removing procd-ujail from the system fixes it temporarily but when added torrent to download it crashes daemon and autostarts it on its own.
Hashing jail part from init script also result same issue of crashing daemon.
Removing package and reinstalling, enabling in config and starting /etc/init.d/transmission start result following in logread
daemon.err transmission-daemon[16422]: [2022-09-15 19:28:11.861] Couldn't save temporary file "/tmp/transmission/settings.json.tmp.XXXXXX": Permission denied (variant.c:1235)
Changing in settings user and group to root
option user 'root'
option group 'root'
result in
Thu Sep 15 19:30:00 2022 daemon.err transmission-daemon[16779]: [2022-09-15 19:30:00.803] Couldn't save file "/tmp/transmission/settings.json": Resource busy (variant.c:1226)
The only solution that still working is to comment jail and seccomp from transmission init file like described here
Temporary solution
# seccomp_path="/etc/seccomp/transmission-daemon.json"
# if [ -f "$seccomp_path" ]; then
# procd_set_param seccomp "$seccomp_path"
# fi
if [ -z "$USE" ]; then
procd_set_param limits core="0 0"
else
procd_set_param limits core="0 0" as="$USE $USE"
logger -t transmission "Starting with $USE virt mem"
fi
[ -d "$web_home" ] && procd_set_param env TRANSMISSION_WEB_HOME="$web_home"
[ "$ca_bundle" -gt 0 ] && procd_set_param env CURL_CA_BUNDLE="$ca_bundle_file"
# procd_add_jail transmission log
# procd_add_jail_mount "$config_file"
# procd_add_jail_mount_rw "$config_dir/resume"
# procd_add_jail_mount_rw "$config_dir/torrents"
# procd_add_jail_mount_rw "$config_dir/blocklists"
# procd_add_jail_mount_rw "$config_dir/stats.json"
# procd_add_jail_mount_rw "$download_dir"
web_home="${web_home:-/usr/share/transmission/web}"
# [ -d "$web_home" ] && procd_add_jail_mount "$web_home"
# [ -f "$ca_bundle_file" ] && procd_add_jail_mount "$ca_bundle_file"
procd_close_instance
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the transmission init script, especially its procd-ujail jail mounts and seccomp configuration, and compare them with the workaround and the referenced issue 17674. Reproduce the daemon start and torrent-download sequence on the reported OpenWrt setup; done means settings can be saved and downloads proceed without the daemon crashing while jail and seccomp remain enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, shell
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100