RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 912003 - /usr/bin/memusage: line 266: 6787 Floating point exception(core dumped) $memusagestat $memusagestat_args "$datafile" "$png"
Summary: /usr/bin/memusage: line 266: 6787 Floating point exception(core dumped) $mem...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Siddhesh Poyarekar
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 1331304
TreeView+ depends on / blocked
 
Reported: 2013-02-17 07:26 UTC by Honggang LI
Modified: 2016-11-24 12:06 UTC (History)
5 users (show)

Fixed In Version: glibc-2.17-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 977874 (view as bug list)
Environment:
Last Closed: 2014-06-13 11:14:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
core dump (99.11 KB, application/x-gzip)
2013-02-20 01:43 UTC, Honggang LI
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Sourceware 15160 0 None None None 2019-04-23 03:44:17 UTC

Description Honggang LI 2013-02-17 07:26:23 UTC
Description of problem:


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


How reproducible:
always

Steps to Reproduce:
(You may need a beaker machine.)
1 yum install -y kernel-kernel-infiniband-stream

2 cd /mnt/tests/kernel/infiniband/stream

3 make (after the stream_c.exe build, kill make. We only need stream_c.exe, it is unnecessary to wait make exit.)

4 [root@rdma02 stream]# sh -x memusage -p x.png ./stream_c.exe
+ memusageso='/usr/\$LIB/libmemusage.so'
+ memusagestat=/usr/bin/memusagestat
+ TEXTDOMAIN=libc
+ buffer=
+ data=
+ memusagestat_args=
+ notimer=
+ png=
+ progname=
+ tracemmap=
+ test 3 -gt 0
+ case "$1" in
+ test 3 -eq 1
+ shift
+ png=x.png
+ shift
+ test 1 -gt 0
+ case "$1" in
+ break
+ test 1 -eq 0
+ add_env='LD_PRELOAD=/usr/\$LIB/libmemusage.so'
+ datafile=
+ test -n ''
+ test -n x.png
++ mktemp -t memusage.XXXXXX
+ datafile=/tmp/memusage.ISTXXc
+ trap 'rm -f "$datafile"; exit 1' HUP INT QUIT TERM PIPE
+ test -n /tmp/memusage.ISTXXc
+ add_env='LD_PRELOAD=/usr/\$LIB/libmemusage.so MEMUSAGE_OUTPUT=/tmp/memusage.ISTXXc'
+ test -n ''
+ test -n ''
+ test -n ''
+ test -n ''
+ eval 'LD_PRELOAD=/usr/\$LIB/libmemusage.so' MEMUSAGE_OUTPUT=/tmp/memusage.ISTXXc '"$@"'
++ LD_PRELOAD='/usr/$LIB/libmemusage.so'
++ MEMUSAGE_OUTPUT=/tmp/memusage.ISTXXc
++ ./stream_c.exe
-------------------------------------------------------------
STREAM version $Revision: 5.9 $
-------------------------------------------------------------
This system uses 8 bytes per DOUBLE PRECISION word.
-------------------------------------------------------------
Array size = 200000000, Offset = 0
Total memory required = 4577.6 MB.
Each test is run 10 times, but only
the *best* time for each is used.
-------------------------------------------------------------
Printing one line per active thread....
-------------------------------------------------------------
Your clock granularity/precision appears to be 1 microseconds.
Each test below will take on the order of 304234 microseconds.
   (= 304234 clock ticks)
Increase the size of the arrays if this shows that
you are not getting at least 20 clock ticks per test.
-------------------------------------------------------------
WARNING -- The above is only a rough guideline.
For best results, please be sure you know the
precision of your system timer.
-------------------------------------------------------------
Function      Rate (MB/s)   Avg time     Min time     Max time
Copy:        7861.7711       0.4102       0.4070       0.4155
Scale:       7041.7094       0.4576       0.4544       0.4611
Add:         7227.5554       0.6695       0.6641       0.6745
Triad:       7719.6845       0.6267       0.6218       0.6308
-------------------------------------------------------------
Solution Validates
-------------------------------------------------------------

Memory usage summary: heap total: 0, heap peak: 0, stack peak: 1696
         total calls   total memory   failed calls
 malloc|          0              0              0
realloc|          0              0              0  (nomove:0, dec:0, free:0)
 calloc|          0              0              0
   free|         22              0
Histogram for block sizes:
+ result=0
+ test -n x.png -a -n /tmp/memusage.ISTXXc -a -s /tmp/memusage.ISTXXc
+ case $png in
+ /usr/bin/memusagestat /tmp/memusage.ISTXXc x.png
/usr/bin/memusage: line 266:  6787 Floating point exception(core dumped) $memusagestat $memusagestat_args "$datafile" "$png"
+ test -z '' -a -n /tmp/memusage.ISTXXc
+ rm -f /tmp/memusage.ISTXXc
+ exit 0

[root@rdma02 stream]# gdb -q /usr/bin/memusagestat core.6787 
Reading symbols from /usr/bin/memusagestat...Reading symbols from /usr/lib/debug/usr/bin/memusagestat.debug...done.
done.
[New LWP 6787]
Core was generated by `/usr/bin/memusagestat /tmp/memusage.ISTXXc x.png'.
Program terminated with signal 8, Arithmetic exception.
#0  0x00000000004017ba in main (argc=<optimized out>, argv=<optimized out>) at memusagestat.c:323
323	      cnt = ((ysize - 40) * (maxsize_heap / 4 * line / heap_scale)) /
Missing separate debuginfos, use: debuginfo-install expat-2.1.0-4.el7.x86_64 fontconfig-2.10.2-1.el7.x86_64 freetype-2.4.10-2.4.el7.x86_64 libX11-1.5.0-3.el7.x86_64 libXau-1.0.6-4.el7.x86_64 libXpm-3.5.10-2.el7.x86_64 libjpeg-turbo-1.2.1-4.el7.x86_64 libxcb-1.9-1.el7.x86_64
(gdb) l
318	  gdImageString (im_out, gdFontSmall, xsize - 37, 14,
319			 (unsigned char *) buf, green);
320	
321	  for (line = 1; line <= 3; ++line)
322	    {
323	      cnt = ((ysize - 40) * (maxsize_heap / 4 * line / heap_scale)) /
324		(maxsize_heap / heap_scale);
325	      gdImageDashedLine (im_out, 40, ysize - 20 - cnt, xsize - 40,
326				 ysize - 20 - cnt, red);
327	      snprintf (buf, sizeof (buf), heap_format, maxsize_heap / 4 * line /
Actual results:
core dumped.

Expected results:
No core dumped.

Additional info:

Comment 3 Siddhesh Poyarekar 2013-02-19 12:30:23 UTC
It's easily reproducible with this:

  int main () {return 0;}

I'll see what's wrong; it looks like a divide-by-zero.

Comment 4 Siddhesh Poyarekar 2013-02-19 14:31:40 UTC
I've posted a candidate patch:

http://sourceware.org/ml/libc-alpha/2013-02/msg00378.html

Comment 6 Honggang LI 2013-02-20 01:43:47 UTC
Created attachment 699761 [details]
core dump

Comment 8 Honggang LI 2014-01-14 02:04:11 UTC
[root@rdma01 stream]# rpm -qf /usr/bin/memusage
glibc-utils-2.17-44.el7.x86_64
[root@rdma01 stream]# sh -x memusage -p x.png ./stream_c.exe
+ memusageso='/usr/\$LIB/libmemusage.so'
+ memusagestat=/usr/bin/memusagestat
+ TEXTDOMAIN=libc
+ buffer=
+ data=
+ memusagestat_args=
+ notimer=
+ png=
+ progname=
+ tracemmap=
+ test 3 -gt 0
+ case "$1" in
+ test 3 -eq 1
+ shift
+ png=x.png
+ shift
+ test 1 -gt 0
+ case "$1" in
+ break
+ test 1 -eq 0
+ add_env='LD_PRELOAD=/usr/\$LIB/libmemusage.so'
+ datafile=
+ test -n ''
+ test -n x.png
++ mktemp -t memusage.XXXXXX
+ datafile=/tmp/memusage.h3ZvGZ
+ trap 'rm -f "$datafile"; exit 1' HUP INT QUIT TERM PIPE
+ test -n /tmp/memusage.h3ZvGZ
+ add_env='LD_PRELOAD=/usr/\$LIB/libmemusage.so MEMUSAGE_OUTPUT=/tmp/memusage.h3ZvGZ'
+ test -n ''
+ test -n ''
+ test -n ''
+ test -n ''
+ eval 'LD_PRELOAD=/usr/\$LIB/libmemusage.so' MEMUSAGE_OUTPUT=/tmp/memusage.h3ZvGZ '"$@"'
++ LD_PRELOAD='/usr/$LIB/libmemusage.so'
++ MEMUSAGE_OUTPUT=/tmp/memusage.h3ZvGZ
++ ./stream_c.exe
-------------------------------------------------------------
STREAM version $Revision: 5.9 $
-------------------------------------------------------------
This system uses 8 bytes per DOUBLE PRECISION word.
-------------------------------------------------------------
Array size = 200000000, Offset = 0
Total memory required = 4577.6 MB.
Each test is run 10 times, but only
the *best* time for each is used.
-------------------------------------------------------------
Printing one line per active thread....
-------------------------------------------------------------
Your clock granularity/precision appears to be 1 microseconds.
Each test below will take on the order of 300112 microseconds.
   (= 300112 clock ticks)
Increase the size of the arrays if this shows that
you are not getting at least 20 clock ticks per test.
-------------------------------------------------------------
WARNING -- The above is only a rough guideline.
For best results, please be sure you know the
precision of your system timer.
-------------------------------------------------------------
Function      Rate (MB/s)   Avg time     Min time     Max time
Copy:        7994.4849       0.4007       0.4003       0.4014
Scale:       6680.2508       0.4798       0.4790       0.4808
Add:         7974.3505       0.6024       0.6019       0.6030
Triad:       7412.8295       0.6479       0.6475       0.6488
-------------------------------------------------------------
Solution Validates
-------------------------------------------------------------

Memory usage summary: heap total: 0, heap peak: 0, stack peak: 1712
         total calls   total memory   failed calls
 malloc|          0              0              0
realloc|          0              0              0  (nomove:0, dec:0, free:0)
 calloc|          0              0              0
   free|         22              0
Histogram for block sizes:
+ result=0
+ test -n x.png -a -n /tmp/memusage.h3ZvGZ -a -s /tmp/memusage.h3ZvGZ
+ case $png in
+ /usr/bin/memusagestat /tmp/memusage.h3ZvGZ x.png
+ test -z '' -a -n /tmp/memusage.h3ZvGZ
+ rm -f /tmp/memusage.h3ZvGZ
+ exit 0
[root@rdma01 stream]# ls
Makefile         max_avg_min.c   PURPOSE     stream_c.exe      stream_f.exe      stream_smp.o  testinfo.desc
Makefile_stream  mysecond.c      runtest.sh  stream_c_smp.exe  stream_f_smp.exe  stream.xml    x.png
max_avg_min      mysecond_smp.o  stream.c    stream.f          stream.o          stream.xsl
[root@rdma01 stream]#

Comment 9 Ludek Smid 2014-06-13 11:14:40 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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