Bug 443983 - khelpcenter man:btrfs-replace(8)
Summary: khelpcenter man:btrfs-replace(8)
Status: RESOLVED FIXED
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: 21.08.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-18 17:23 UTC by Sergey
Modified: 2021-11-01 14:53 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 21.08.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2021-10-18 17:23:34 UTC
SUMMARY

error in opening man page

STEPS TO REPRODUCE
1. open Help
2. type "btrfs-replace" in search field and press enter
3. go to page "man:btrfs-replace(8)"

OBSERVED RESULT

Error dialog box

EXPECTED RESULT

man page 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Jack 2021-10-18 17:30:04 UTC
What is the error?
Comment 2 Yuri Chornoivan 2021-10-18 17:44:34 UTC
Works fine here, btw... (version 5.7.6.210770).
Comment 3 David C. Bryant 2021-10-18 19:26:35 UTC
I booted into Manjaro a few minutes ago, and I was able to reporduce this bug. The error message said "Tne man pages protocol died unexpectedly", or something similar. Only a portion of the relevant man page was displayed. I'll play around with it as time permits. It could be a problem with the man page itself.
Comment 4 David C. Bryant 2021-10-18 20:13:44 UTC
I booted into Manjaro again. The terminal command

man btrfs-replace

works correctly (90 lines). The same page accessed with khelpcenter throws an error message: "The process for the man protocol died unexpectedly." Just 16 lines from the man page are displayed. So it looks like a program bug, to me. BTW, I also tried browsing the man pages with khelpcenter. Most of them work fine. This one (btrfs-replace) doesn't.
Comment 5 Albert Astals Cid 2021-10-18 20:50:15 UTC
It's a man KIO problem

[KCrash Handler]
#4  0x00007f59d23e8d22 in raise () from /usr/lib/libc.so.6
#5  0x00007f59d23d2862 in abort () from /usr/lib/libc.so.6
#6  0x00007f59d242ad28 in __libc_message () from /usr/lib/libc.so.6
#7  0x00007f59d243292a in malloc_printerr () from /usr/lib/libc.so.6
#8  0x00007f59d24341bc in _int_free () from /usr/lib/libc.so.6
#9  0x00007f59d24379e8 in free () from /usr/lib/libc.so.6
#10 0x00007f59cd771915 in out_html (c=0x55fe928d6ef8 "OCTYPE HTML PUBLIC "-//W3C//D1") at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:1102
#11 0x00007f59cd783157 in scan_troff (c=0x55fe928da3cb "OCTYPE HTML PUBLIC \"-//W3C//D1\n", san=true, result=0x7ffc815457f8) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:5994
#12 0x00007f59cd7770ae in scan_expression (c=0x55fe928da3e9 "\n", result=0x7ffc815458c0, numLoop=0) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:2812
#13 0x00007f59cd7777a1 in scan_expression (c=0x55fe928da3ca "", result=0x7ffc815458c0) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:2984
#14 0x00007f59cd77a873 in scan_request (c=0x55fe928d8e52 ".br\nthe filesystem has to be resized to fully take advantage of a larger target device; this can be achieved with\n\\fBbtrfs filesystem resize <devid>:max /path\\fR\n.sp .5v\n.RE\n\\fBOptions\\fR\n.PP\n\\-r\n.RS "...) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:3954
#15 0x00007f59cd782a4a in scan_troff (c=0x55fe928d8441 "\n'\\\" t\n.\\\"     Title: btrfs-replace\n.\\\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]\n.\\\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>\n.\\\"      D"..., san=false, result=0x0) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:5851
#16 0x00007f59cd783561 in scan_man_page (man_page=0x55fe928ccc00 "\n'\\\" t\n.\\\"     Title: btrfs-replace\n.\\\"    Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]\n.\\\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>\n.\\\"      D"...) at /home/tsdgeos/devel/kde/kio-extras/man/man2html.cpp:6085
#17 0x00007f59cd78d338 in MANProtocol::get (this=0x7ffc81545f70, url=...) at /home/tsdgeos/devel/kde/kio-extras/man/kio_man.cpp:529
#18 0x00007f59d2d7113f in KIO::SlaveBase::dispatch(int, QByteArray const&) () from /usr/lib/libKF5KIOCore.so.5
#19 0x00007f59d2d71ac6 in KIO::SlaveBase::dispatchLoop() () from /usr/lib/libKF5KIOCore.so.5
#20 0x00007f59cd78ed2f in kdemain (argc=4, argv=0x7ffc81546080) at /home/tsdgeos/devel/kde/kio-extras/man/kio_man.cpp:735
Comment 6 Albert Astals Cid 2021-10-18 21:15:57 UTC
Jonathan i can reproduce the crash with kio-man from 21.08 branch but not with the one from master, i see you've done some changes in master.

Is this something you fixed on purpose? (or maybe was a side fix?)

Could you have a look to see if you can find which commit fixes it and backport it for the final 21.08.3 ?
Comment 7 Friedrich W. H. Kossebau 2021-10-19 00:25:10 UTC
Git commit 809863617a3fb76ce43f11dec541d4b94f63925a by Friedrich W. H. Kossebau.
Committed on 19/10/2021 at 00:24.
Pushed by kossebau into branch 'release/21.08'.

man kio: fix crash due to bad memory pointer on REQ_ps handling

7d11a0932af2379cd46d338c49f758bc509acec7 accidentally moved the
memory pointer increase out of the '+'-handling branch, which would
either result in bad number being read or the pointer getting behind
the end and resulting in garbage memory processing, potentially ending
in a crash.

Also changing to using dedicated own variable "sign" instead of reusing
function-global variable "j" with meaningless name.
global

Fixed-in: 21.08.3

M  +9    -8    man/man2html.cpp

https://invent.kde.org/network/kio-extras/commit/809863617a3fb76ce43f11dec541d4b94f63925a
Comment 8 Jonathan Marten 2021-11-01 14:53:56 UTC
Not sure that any of my recent kio_man changes should have affected page parsing, but thanks to Friedrich for finding the problem and backporting.