Bug 2108676

Summary: SIGSEGV in LinuxProcess_makeCommandStr()
Product: [Fedora] Fedora EPEL Reporter: James Hartsock <hartsjc>
Component: htopAssignee: Mukundan Ragavan <nonamedotc>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: epel8CC: admiller, ms, nathans, nonamedotc, rafalzaq, xjakub
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: htop-3.2.1-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-31 02:19:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Hartsock 2022-07-19 16:43:04 UTC
Description of problem:
htop cores periodically with SIGSEGV using latest available 3.0.5 version in EPEL 8.
May just need rebase htop in EPEL to 3.1.0 or later.

Version-Release number of selected component (if applicable):
3.0.5

How reproducible:
periodically

Steps to Reproduce:
1. htop -u $(whoami) --sort-key PERCENT_CPU
2. wait for unkown amount time
3.

Actual results:
  Backtrace information:
  ----------------------
  The following function calls were active when the issue was detected:
  ---
  htop(CRT_handleSIGSEGV+0xda)[0x5555555676ea]
  /lib64/libc.so.6(+0x37880)[0x7ffff7058880]
  htop(LinuxProcess_makeCommandStr+0x5de)[0x5555555782ee]
  htop(+0x26954)[0x55555557a954]
  htop(ProcessList_goThroughEntries+0x7f9)[0x55555557c349]
  htop(ProcessList_scan+0xa7)[0x5555555719a7]
  htop(ScreenManager_run+0x104)[0x555555572d24]
  htop(main+0x5ed)[0x555555562dcd]
  /lib64/libc.so.6(__libc_start_main+0xf3)[0x7ffff70447b3]
  htop(_start+0x2e)[0x55555556303e]
  ---

Expected results:
  No Backtrace

Additional info:
  Looking similar to: https://github.com/htop-dev/htop/issues/361
  Appears above is fixed in 3.1.0; however EPEL 8 only has 3.0.5 available
    $ git tag --contains c865313e2d934bc6890432216f3cab1c7cf8cba9 | head -n 1
    3.1.0

Comment 1 James Hartsock 2022-07-20 13:46:07 UTC
On the surface, looks like rebase  to 3.1.0 (or even to 3.2.1) shouldn't be issue for RPM build

# yumdownloader --source htop
htop-3.0.5-1.el8.src.rpm

# wget -q -O SOURCES/htop-3.1.0.tar.gz https://codeload.github.com/htop-dev/htop/tar.gz/refs/tags/3.1.0

# grep ^Ver SPECS/htop.spec 
Version: 3.1.0

# rpmbuild --ba htop.spec

# dnf localinstall ../RPMS/x86_64/htop-3.1.0-1.el8.x86_64.rpm

Comment 2 Mukundan Ragavan 2022-07-21 00:03:30 UTC
I checked that htop builds when I saw the bug this morning.

I will update to latest version since you have confirmed installation works fine.

Comment 3 Fedora Update System 2022-07-22 13:34:28 UTC
FEDORA-EPEL-2022-b44b84c966 has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-b44b84c966

Comment 4 Fedora Update System 2022-07-23 03:17:56 UTC
FEDORA-EPEL-2022-b44b84c966 has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2022-b44b84c966

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

Comment 5 Fedora Update System 2022-07-31 02:19:07 UTC
FEDORA-EPEL-2022-b44b84c966 has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.