[Bug 1673414] [NEW] sched_getcpu on ppc64le produces an illegal instruction

Colin Ian King 1673414 at bugs.launchpad.net
Thu Mar 16 10:43:35 UTC 2017


Public bug reported:

I'm getting SIGILL on a call to sched_getcpu:

gcc 6.3.0 201700221 (Ubuntu 6.3.0-8ubuntu1) and libc6:ppc64el
2.24-7ubuntu2

$ cat example.c
#define _GNU_SOURCE

#include <sched.h>

int main(void)
{
        return sched_getcpu();
}

gcc -g example.c -o example
./example
Illegal instruction

$ gdb ./example 
GNU gdb (Ubuntu 7.12.50.20170207-0ubuntu2) 7.12.50.20170207-git
Copyright (C) 2017 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 "powerpc64le-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./example...done.
(gdb) run
Starting program: /home/king/example 

Program received signal SIGILL, Illegal instruction.
__kernel_getcpu ()
    at /build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S:32
32	/build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S: No such file or directory.
(gdb) where
#0  __kernel_getcpu ()
    at /build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S:32
#1  0x00003fffb7ea08e8 in sched_getcpu ()
    at ../sysdeps/unix/sysv/linux/sched_getcpu.c:32
#2  0x00000000200007f0 in main () at example.c:7

** Affects: glibc (Ubuntu)
     Importance: High
         Status: New

** Changed in: glibc (Ubuntu)
   Importance: Undecided => High

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1673414

Title:
  sched_getcpu on ppc64le produces an illegal instruction

Status in glibc package in Ubuntu:
  New

Bug description:
  I'm getting SIGILL on a call to sched_getcpu:

  gcc 6.3.0 201700221 (Ubuntu 6.3.0-8ubuntu1) and libc6:ppc64el
  2.24-7ubuntu2

  $ cat example.c
  #define _GNU_SOURCE

  #include <sched.h>

  int main(void)
  {
          return sched_getcpu();
  }

  gcc -g example.c -o example
  ./example
  Illegal instruction

  $ gdb ./example 
  GNU gdb (Ubuntu 7.12.50.20170207-0ubuntu2) 7.12.50.20170207-git
  Copyright (C) 2017 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 "powerpc64le-linux-gnu".
  Type "show configuration" for configuration details.
  For bug reporting instructions, please see:
  <http://www.gnu.org/software/gdb/bugs/>.
  Find the GDB manual and other documentation resources online at:
  <http://www.gnu.org/software/gdb/documentation/>.
  For help, type "help".
  Type "apropos word" to search for commands related to "word"...
  Reading symbols from ./example...done.
  (gdb) run
  Starting program: /home/king/example 

  Program received signal SIGILL, Illegal instruction.
  __kernel_getcpu ()
      at /build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S:32
  32	/build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S: No such file or directory.
  (gdb) where
  #0  __kernel_getcpu ()
      at /build/linux-mMU5bT/linux-4.10.0/arch/powerpc/kernel/vdso64/getcpu.S:32
  #1  0x00003fffb7ea08e8 in sched_getcpu ()
      at ../sysdeps/unix/sysv/linux/sched_getcpu.c:32
  #2  0x00000000200007f0 in main () at example.c:7

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1673414/+subscriptions



More information about the foundations-bugs mailing list