numactl segfault

Issues related to applications and software problems
Post Reply
patmans
Posts: 3
Joined: 2019/02/27 20:31:53

numactl segfault

Post by patmans » 2019/09/27 21:12:44

I'm getting a segfault running numactl.

Running:

Code: Select all

/usr/bin/numactl --length 10485760  --file /var/run/buffer --membind 1 --touch
Gets a core dump.

Back trace is as follows:

Code: Select all

[root@localhost ~]# gdb -c ./core.15192 /usr/bin/numactl 
GNU gdb (GDB) Red Hat Enterprise Linux 7.6.1-115.el7
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /usr/bin/numactl...Reading symbols from /usr/lib/debug/usr/bin/numactl.debug...done.
done.
[New LWP 15192]
Core was generated by `/usr/bin/numactl --length 10485760 --file /var/run/capture1_vi_buf --membind 1'.
Program terminated with signal 11, Segmentation fault.
#0  0x00007ff979c428e3 in numa_police_memory (mem=0x7ff978c5a000, size=10485760) at libnuma.c:863
863	        ((volatile char*)mem)[i] = ((volatile char*)mem)[i];
(gdb) bt
#0  0x00007ff979c428e3 in numa_police_memory (mem=0x7ff978c5a000, size=10485760) at libnuma.c:863
#1  0x000000000040215e in main (ac=8, av=0x7ffeeea74bc8) at numactl.c:614

I see nothing in the log files - well besides the segfault being logged.

This failed running with an older kernel (3.10.0-957.10.1.el7.x86_64) as well as the current kernel (3.10.0-1062.1.1.el7.x86_64).

Running:

[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1062.1.1.el7.x86_64 #1 SMP Fri Sep 13 22:55:44 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

[root@localhost ~]# rpm -q -f /usr/bin/numactl
numactl-2.0.12-3.el7.x86_64

It works fine with no core dump with numactl-2.0.9-7.el7.x86_64:

Code: Select all

[root@localhost ~]# /usr/bin/numactl --length 10485760  --file /var/run/buffer --membind 1 --touch
[root@localhost ~]# echo $?
0
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-957.10.1.el7.x86_64 #1 SMP Mon Mar 18 15:06:45 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# rpm -q -f /usr/bin/numactl 
numactl-2.0.9-7.el7.x86_64
Thanks for any assistance :-)

-- Patrick

patmans
Posts: 3
Joined: 2019/02/27 20:31:53

Re: numactl segfault

Post by patmans » 2019/09/30 23:50:46

I figured out the problem, and posted a fix / pull request on github here:

https://github.com/numactl/numactl/pull/80

In summary, if you hit this problem workaround is to not use the "--touch" option, as it probably wasn't doing what you wanted before, and now it's just seg faulting :-P

Post Reply