Bug 977874 - /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 ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 19
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Siddhesh Poyarekar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 13:53 UTC by Siddhesh Poyarekar
Modified: 2016-11-24 12:12 UTC (History)
10 users (show)

Fixed In Version: glibc-2.17-11.fc19
Clone Of: 912003
Environment:
Last Closed: 2013-06-29 18:05:58 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 15160 0 None None None Never

Description Siddhesh Poyarekar 2013-06-25 13:53:35 UTC
+++ This bug was initially created as a clone of Bug #912003 +++

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:

--- Additional comment from Siddhesh Poyarekar on 2013-02-19 07:30:23 EST ---

It's easily reproducible with this:

  int main () {return 0;}

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

--- Additional comment from Siddhesh Poyarekar on 2013-02-19 09:31:40 EST ---

I've posted a candidate patch:

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

--- Additional comment from Honggang LI on 2013-02-19 20:43:47 EST ---



--- Additional comment from Siddhesh Poyarekar on 2013-02-26 03:57:12 EST ---

Fixed upstream:

http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=7da6d9ed266105e0ebefd01a4b6bf08bf56257c3

Comment 1 Fedora Update System 2013-06-25 17:31:23 UTC
glibc-2.17-11.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/glibc-2.17-11.fc19

Comment 2 Fedora Update System 2013-06-26 17:09:49 UTC
Package glibc-2.17-11.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing glibc-2.17-11.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-11737/glibc-2.17-11.fc19
then log in and leave karma (feedback).

Comment 3 Fedora Update System 2013-06-29 18:05:58 UTC
glibc-2.17-11.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


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