Bug 2209105

Summary: [abrt] less: create_hilites(): less killed by SIGSEGV
Product: [Fedora] Fedora Reporter: Jonathan Ryshpan <jonrysh>
Component: lessAssignee: Matej Mužila <mmuzila>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 38CC: fjanus, hhorak, jonrysh, kasal, mmuzila, praiskup
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/a06a01ed5c2c53414e1a0fccece72a7056b7ab1
Whiteboard: abrt_hash:5843cd4512d81d911176536fe4c43e7655498867;VARIANT_ID=kde;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: cpuinfo
none
File: open_fds
none
File: core_backtrace
none
File: os_info
none
File: exploitable
none
File: maps
none
File: proc_pid_status
none
File: environ
none
File: dso_list
none
File: mountinfo
none
File: limits
none
File: backtrace
none
Core dump of the crash of less
none
Coredumpctl output on console while producing less-coredump none

Description Jonathan Ryshpan 2023-05-22 16:20:40 UTC
Description of problem:
I ran
$ locate -i bluetooth | less
In less, I searched for "!home"; less crashed.

Version-Release number of selected component:
less-633-1.fc38

Additional info:
reporter:       libreport-2.17.10
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.kde.konsole-428b45ed4a9a4311ad14fb8889463ab1.scope
backtrace_rating: 4
cmdline:        less
crash_function: create_hilites
runlevel:       N 5
type:           CCpp
kernel:         6.2.15-300.fc38.x86_64
uid:            1000
reason:         less killed by SIGSEGV
package:        less-633-1.fc38
executable:     /usr/bin/less
journald_cursor: s=9e8facd94e854bbf924ea4e24e7df513;i=2ec75;b=62c8ee2bf7674bbda295652111046414;m=221a7187df;t=5fc4a8e32df4a;x=68e08c8630d4dbdb
rootdir:        /

Truncated backtrace:
Thread no. 1 (10 frames)
 #0 create_hilites at /usr/src/debug/less-633-1.fc38.x86_64/search.c:895
 #1 hilite_line.constprop.0 at /usr/src/debug/less-633-1.fc38.x86_64/search.c:960
 #2 search_range at /usr/src/debug/less-633-1.fc38.x86_64/search.c:1357
 #3 prep_hilite at /usr/src/debug/less-633-1.fc38.x86_64/search.c:1758
 #4 forw_line_seg at /usr/src/debug/less-633-1.fc38.x86_64/input.c:112
 #5 repaint_hilite at /usr/src/debug/less-633-1.fc38.x86_64/search.c:274
 #6 search at /usr/src/debug/less-633-1.fc38.x86_64/search.c:1556
 #7 multi_search.constprop.0 at /usr/src/debug/less-633-1.fc38.x86_64/command.c:1104
 #8 mca_char at /usr/src/debug/less-633-1.fc38.x86_64/command.c:704
 #9 commands at /usr/src/debug/less-633-1.fc38.x86_64/command.c:1275

Comment 1 Jonathan Ryshpan 2023-05-22 16:20:43 UTC
Created attachment 1966248 [details]
File: cpuinfo

Comment 2 Jonathan Ryshpan 2023-05-22 16:20:45 UTC
Created attachment 1966249 [details]
File: open_fds

Comment 3 Jonathan Ryshpan 2023-05-22 16:20:46 UTC
Created attachment 1966250 [details]
File: core_backtrace

Comment 4 Jonathan Ryshpan 2023-05-22 16:20:48 UTC
Created attachment 1966251 [details]
File: os_info

Comment 5 Jonathan Ryshpan 2023-05-22 16:20:50 UTC
Created attachment 1966252 [details]
File: exploitable

Comment 6 Jonathan Ryshpan 2023-05-22 16:20:51 UTC
Created attachment 1966253 [details]
File: maps

Comment 7 Jonathan Ryshpan 2023-05-22 16:20:53 UTC
Created attachment 1966254 [details]
File: proc_pid_status

Comment 8 Jonathan Ryshpan 2023-05-22 16:20:54 UTC
Created attachment 1966255 [details]
File: environ

Comment 9 Jonathan Ryshpan 2023-05-22 16:20:56 UTC
Created attachment 1966256 [details]
File: dso_list

Comment 10 Jonathan Ryshpan 2023-05-22 16:20:57 UTC
Created attachment 1966257 [details]
File: mountinfo

Comment 11 Jonathan Ryshpan 2023-05-22 16:20:59 UTC
Created attachment 1966258 [details]
File: limits

Comment 12 Jonathan Ryshpan 2023-05-22 16:21:00 UTC
Created attachment 1966259 [details]
File: backtrace

Comment 13 Matej Mužila 2023-05-30 13:00:06 UTC
Hi, thank you for report.

Unfortunately I'm not able to reproduce the problem. Does the problem occur everytime? If so, could you please provide output of "locate -i bluetooth" (locate -i bluetooth > filename.txt)?

Comment 14 Jonathan Ryshpan 2023-05-30 20:01:05 UTC
I cannot repeat the problem today, though it happened several times, both with 
    $ locate -i bluetooth | less
and with other similar invocations of the form
    $ locate -i <XXX> | less
on the day I reported it.

Foo!

Comment 15 Matej Mužila 2023-05-31 11:49:30 UTC
Unfortunately, if I can't reproduce it, I can't fix it.

I you were able to provide a coredump from that particular crash, I might be able to identify the bug and fix it eventually.

You can list `less` coredumps stored on your system:
  $ coredumpctl list /usr/bin/less

It will output list of coredumps captured in the journal.
If you can find an entry with matching timestamp and *with* COREFILE column saying "present", then run:
  $ coredumpctl dump --output <NEW-FILENAME> /usr/bin/less <PID>

  Where <NEW-FILENAME> is filename (or path) of the coredump file to be created, <PID> is the PID from the matching entry from previous command.

Please be aware, that the coredump file may contain the data that was opened by/piped to less when it was executed (in this particular case the
output of "locate -i <XXX>") [1].

If you can create the coredump and you are ok with its content being public, please attach it to this bug.

---

[1] https://en.wikipedia.org/wiki/Core_dump

Comment 16 Jonathan Ryshpan 2023-07-03 19:23:05 UTC
Created attachment 1973909 [details]
Core dump of the crash of less

Comment 17 Jonathan Ryshpan 2023-07-03 19:26:39 UTC
Created attachment 1973920 [details]
Coredumpctl output on console while producing less-coredump

Comment 18 Carl 2023-08-02 19:42:58 UTC
open any file in less, press / and then ! to do a non-match search, non-search for any char or string that will match a line in the file. boom


reporter:       libreport-2.17.11
type:           CCpp
reason:         less killed by SIGSEGV
journald_cursor: s=882be8df477c4c6496abc167b89cee28;i=41751;b=5f5589de0eb747e5b1c5abac3ef78a37;m=f74ca02ea;t=601f506380142;x=3e016da545a0ff7c
executable:     /usr/bin/less
cmdline:        less /tmp/model-results-violations-1691001633012.txt
cgroup:         0::/user.slice/user-1000.slice/user/app.slice/app-org.gnome.Terminal.slice/gnome-terminal-server.service
rootdir:        /
uid:            1000
kernel:         6.4.4-200.fc38.x86_64
package:        less-633-1.fc38
runlevel:       N 5
backtrace_rating: 4
crash_function: create_hilites
comment:        open any file in less, press / and then ! to do a non-match search, non-search for any char or string that will match a line in the file. boom