Bug 2188136 - [abrt] rtorrent: snprintf(): rtorrent killed by SIGABRT
Summary: [abrt] rtorrent: snprintf(): rtorrent killed by SIGABRT
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rtorrent
Version: 38
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Conrad Meyer
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:26fa8eb0869dd692df05bf00967...
: 2188138 (view as bug list)
Depends On:
Blocks: 2188138
TreeView+ depends on / blocked
 
Reported: 2023-04-19 20:22 UTC by Ed Marshall
Modified: 2023-04-21 02:09 UTC (History)
4 users (show)

Fixed In Version: rtorrent-0.9.8-11.fc38
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-04-21 02:09:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: proc_pid_status (1.40 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: maps (3.91 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: limits (1.29 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: open_fds (1.17 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: mountinfo (3.86 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: os_info (734 bytes, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: cpuinfo (2.74 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: core_backtrace (5.31 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: dso_list (716 bytes, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: backtrace (28.77 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details
File: environ (4.98 KB, text/plain)
2023-04-19 20:22 UTC, Ed Marshall
no flags Details

Description Ed Marshall 2023-04-19 20:22:06 UTC
Description of problem:
ran /usr/bin/rtorrent with an existing collection of active torrents

Version-Release number of selected component:
rtorrent-0.9.8-10.fc38

Additional info:
reporter:       libreport-2.17.9
type:           CCpp
reason:         rtorrent killed by SIGABRT
journald_cursor: s=3772fea4bd19444c9f281dc0a7e5c395;i=1d879;b=00feb2cbcf1e40c299beeb564960518d;m=41f0b18;t=5f9b613f49a2d;x=11d4f49852982c06
executable:     /usr/bin/rtorrent
cmdline:        rtorrent
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/vte-spawn-2437f6e3-0c79-46f7-989b-a23f25154c49.scope
rootdir:        /
uid:            1000
kernel:         6.2.11-300.fc38.x86_64
package:        rtorrent-0.9.8-10.fc38
runlevel:       N 5
backtrace_rating: 4
crash_function: snprintf
comment:        ran /usr/bin/rtorrent with an existing collection of active torrents

Truncated backtrace:
Thread no. 1 (4 frames)
 #8 snprintf at /usr/include/bits/stdio2.h:54
 #9 utils::Lockfile::try_lock at utils/lockfile.cc:101
 #10 core::DownloadStore::enable at core/download_store.cc:74
 #11 Control::initialize at /usr/src/debug/rtorrent-0.9.8-10.fc38.x86_64/src/control.cc:115

Comment 1 Ed Marshall 2023-04-19 20:22:09 UTC
Created attachment 1958372 [details]
File: proc_pid_status

Comment 2 Ed Marshall 2023-04-19 20:22:11 UTC
Created attachment 1958373 [details]
File: maps

Comment 3 Ed Marshall 2023-04-19 20:22:12 UTC
Created attachment 1958374 [details]
File: limits

Comment 4 Ed Marshall 2023-04-19 20:22:16 UTC
Created attachment 1958375 [details]
File: open_fds

Comment 5 Ed Marshall 2023-04-19 20:22:19 UTC
Created attachment 1958376 [details]
File: mountinfo

Comment 6 Ed Marshall 2023-04-19 20:22:20 UTC
Created attachment 1958377 [details]
File: os_info

Comment 7 Ed Marshall 2023-04-19 20:22:21 UTC
Created attachment 1958378 [details]
File: cpuinfo

Comment 8 Ed Marshall 2023-04-19 20:22:22 UTC
Created attachment 1958379 [details]
File: core_backtrace

Comment 9 Ed Marshall 2023-04-19 20:22:23 UTC
Created attachment 1958380 [details]
File: dso_list

Comment 10 Ed Marshall 2023-04-19 20:22:25 UTC
Created attachment 1958381 [details]
File: backtrace

Comment 11 Ed Marshall 2023-04-19 20:22:26 UTC
Created attachment 1958382 [details]
File: environ

Comment 12 Conrad Meyer 2023-04-19 20:37:40 UTC
 #8 snprintf at /usr/include/bits/stdio2.h:54
 #9 utils::Lockfile::try_lock at utils/lockfile.cc:101
 #10 core::DownloadStore::enable at core/download_store.cc:74
 #11 Control::initialize at /usr/src/debug/rtorrent-0.9.8-10.fc38.x86_64/src/control.cc:115

This is almost certainly fallout from https://fedoraproject.org/wiki/Changes/Add_FORTIFY_SOURCE%3D3_to_distribution_build_flags

This usage of snprintf is obviously incorrect:

   97   char buf[256];
   98   int pos = ::gethostname(buf, 255);
   99
  100   if (pos == 0) {
  101     ::snprintf(buf + std::strlen(buf), 255, ":+%i\n", ::getpid());

(There are not guaranteed to be 255 bytes in 'buf' beyond 'buf + strlen(buf)'.)

":+%i\n" is going to be, like, ~15 bytes total, so we definitely don't need 255.

Comment 13 Conrad Meyer 2023-04-19 20:43:24 UTC
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=100147491

Comment 15 Conrad Meyer 2023-04-19 20:49:24 UTC
*** Bug 2188138 has been marked as a duplicate of this bug. ***

Comment 16 Ed Marshall 2023-04-19 21:01:52 UTC
Ah, you beat me to it: it looks like upstream addressed it here: https://github.com/rakshasa/rtorrent/pull/1169

Comment 17 Fedora Update System 2023-04-19 21:34:40 UTC
FEDORA-2023-6f1d4e2d5b has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f1d4e2d5b

Comment 18 Conrad Meyer 2023-04-19 21:36:13 UTC
(In reply to Ed Marshall from comment #16)
> Ah, you beat me to it: it looks like upstream addressed it here:
> https://github.com/rakshasa/rtorrent/pull/1169

Ah, I didn't see the upstream fix.  We can probably just keep this patch until upstream (finally) releases a new version.

Comment 19 Fedora Update System 2023-04-20 04:30:16 UTC
FEDORA-2023-6f1d4e2d5b has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-6f1d4e2d5b`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-6f1d4e2d5b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 20 Fedora Update System 2023-04-21 02:09:19 UTC
FEDORA-2023-6f1d4e2d5b has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.