Bug 912003
| Summary: | /usr/bin/memusage: line 266: 6787 Floating point exception(core dumped) $memusagestat $memusagestat_args "$datafile" "$png" | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Honggang LI <honli> | ||||
| Component: | glibc | Assignee: | Siddhesh Poyarekar <spoyarek> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | qe-baseos-tools-bugs | ||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | fweimer, mfranc, mnewsome, pfrankli, spoyarek | ||||
| Target Milestone: | rc | Keywords: | Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | glibc-2.17-10.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 977874 (view as bug list) | Environment: | |||||
| Last Closed: | 2014-06-13 11:14:40 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: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1331304 | ||||||
| Attachments: |
|
||||||
It's easily reproducible with this:
int main () {return 0;}
I'll see what's wrong; it looks like a divide-by-zero.
I've posted a candidate patch: http://sourceware.org/ml/libc-alpha/2013-02/msg00378.html Created attachment 699761 [details]
core dump
Fixed upstream: http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=7da6d9ed266105e0ebefd01a4b6bf08bf56257c3 [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]#
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. |
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: