Bug 1910841

Summary: sadf segfault at 55f14d8e7fe0 ip 00007f61dabc859a sp 00007ffe1d4623c8 error 4 in libc-2.28.so
Product: Red Hat Enterprise Linux 8 Reporter: Jing Huo <jhuo>
Component: sysstatAssignee: Michal Sekletar <msekleta>
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: fsumsal, qguo
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sysstat-11.7.3-7.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-05-10 14:11:09 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 Jing Huo 2020-12-25 06:28:53 UTC
Description of problem:

run `sadf -x` against specified sadd file dumped core due to segfault 

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

sysstat-11.7.3-5.el8.x86_64

How reproducible:


Steps to Reproduce:

1.install sysstat package on a system with timezone UTC

# yum install sysstat
# date --set=16:00:00
Fri Dec 25 16:00:00 UTC 2020

2.start sysstat service, confirm /var/log/sa/sa25 is created

# systemctl start sysstat
# ls /var/log/sa/sa25
/var/log/sa/sa25

3.Before sysstat-collector.service starts for the first time,
run :

# sadf -x sa25 > sa25.xml
Segmentation fault (core dumped) <==

/var/log/messages:
~~~
sadf[8714]: segfault at 55c93f40afe0 ip 00007fbf5b60659a sp 00007ffcacc91c38 error 4 in libc-2.28.so[7fbf5b4a8000+1b9000]

Process 8714 (sadf) of user 0 dumped core.#012#012Stack trace of thread 8714:#012#0  0x00007fbf5b60659a __memmove_avx_unaligned_erms (libc.so.6)#012#1  0x000055c93daf45eb copy_structures (sadf)#012#2  0x000055c93dac141a logic1_display_loop (sadf)#012#3  0x000055c93dac1f4e read_stats_from_file (sadf)#012#4  0x000055c93dabf337 main (sadf)#012#5  0x00007fbf5b4cb873 __libc_start_main (libc.so.6)#012#6  0x000055c93dabfafe _start (sadf)
~~~

After sysstat-collector.service starts for the first time,
the issue doesn't happen again. 

4.However, if change timezone to Asia/Tokyo before sysstat-collector.service starts for the first time.

# timedatectl set-timezone Asia/Tokyo
# date
Sat Dec 26 01:01:48 JST 2020

At this time, sa26 is created, which has no problem. 
However, `sadf -x sa25` is executed when collecting sosreport, it dumps core during sosreport collection each time.

Actual results:

sadf segfault at 55f14d8e7fe0 ip 00007f61dabc859a sp 00007ffe1d4623c8 error 4 in libc-2.28.so

Expected results:

sadf doesn't dump core

Additional info:

Comment 10 errata-xmlrpc 2022-05-10 14:11:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (sysstat bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:1892