← Back to team overview

kernel-packages team mailing list archive

[Bug 1590069] Re: vDSO syscalls don't work on yakkety/master-next (and unstable/master)

 

Hi Tim,

I just tested this in a fresh yakkety VM using the daily cloud images
and the kernel team PPA you mentioned and reproduced it with your
program:

ubuntu@yakkety:~$ strace ./tester
execve("./tester", ["./tester"], [/* 17 vars */]) = 0
brk(NULL)                               = 0x55dbbabdf000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f444ba48000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23765, ...}) = 0
mmap(NULL, 23765, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f444ba42000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f444b45c000
mprotect(0x7f444b61c000, 2093056, PROT_NONE) = 0
mmap(0x7f444b81b000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7f444b81b000
mmap(0x7f444b821000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f444b821000
close(3)                                = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f444ba41000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f444ba40000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f444ba3f000
arch_prctl(ARCH_SET_FS, 0x7f444ba40700) = 0
mprotect(0x7f444b81b000, 16384, PROT_READ) = 0
mprotect(0x55dbb9616000, 4096, PROT_READ) = 0
mprotect(0x7f444ba4a000, 4096, PROT_READ) = 0
munmap(0x7f444ba42000, 23765)           = 0
nanosleep({1, 0}, 0x7ffd91f7c6c0)       = 0
gettimeofday({1465946468, 561043}, {tz_minuteswest=0, tz_dsttime=0}) = 0
fstat(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 64), ...}) = 0
ioctl(1, TCGETS, {B9600 opost isig icanon echo ...}) = 0
brk(NULL)                               = 0x55dbbabdf000
brk(0x55dbbac01000)                     = 0x55dbbac01000
write(1, "sec 1465946468\n", 15sec 1465946468
)        = 15
nanosleep({1, 0}, 0x7ffd91f7c6c0)       = 0
gettimeofday({1465946469, 567377}, {tz_minuteswest=0, tz_dsttime=0}) = 0
write(1, "sec 1465946469\n", 15sec 1465946469
)        = 15
nanosleep({1, 0}, 0x7ffd91f7c6c0)       = 0
gettimeofday({1465946470, 570615}, {tz_minuteswest=0, tz_dsttime=0}) = 0
write(1, "sec 1465946470\n", 15sec 1465946470
)        = 15
nanosleep({1, 0}, 0x7ffd91f7c6c0)       = 0
gettimeofday({1465946471, 574084}, {tz_minuteswest=0, tz_dsttime=0}) = 0
write(1, "sec 1465946471\n", 15sec 1465946471
)        = 15
nanosleep({1, 0}, 0x7ffd91f7c6c0)       = 0
gettimeofday({1465946472, 576646}, {tz_minuteswest=0, tz_dsttime=0}) = 0
write(1, "sec 1465946472\n", 15sec 1465946472
)        = 15
nanosleep({1, 0}, ^Cstrace: Process 1490 detached
 <detached ...>
ubuntu@yakkety:~$ uname -a
Linux yakkety 4.6.0-7-generic #8-Ubuntu SMP Fri Jun 3 15:08:18 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@yakkety:~$ apt-cache showpkg linux-image-4.6.0-7-generic 
Package: linux-image-4.6.0-7-generic
Versions: 
4.6.0-7.8 (/var/lib/apt/lists/ppa.launchpad.net_canonical-kernel-team_ppa_ubuntu_dists_yakkety_main_binary-amd64_Packages) (/var/lib/dpkg/status)
 Description Language: 
                 File: /var/lib/apt/lists/ppa.launchpad.net_canonical-kernel-team_ppa_ubuntu_dists_yakkety_main_binary-amd64_Packages
                  MD5: eb70ad30d136e11219815e66f14ab797
 Description Language: en
                 File: /var/lib/apt/lists/ppa.launchpad.net_canonical-kernel-team_ppa_ubuntu_dists_yakkety_main_i18n_Translation-en
                  MD5: eb70ad30d136e11219815e66f14ab797


Reverse Depends: 
  linux-image-generic,linux-image-4.6.0-7-generic
  linux-image-extra-4.6.0-7-generic,linux-image-4.6.0-7-generic
  linux-image-virtual,linux-image-4.6.0-7-generic
Dependencies: 
4.6.0-7.8 - initramfs-tools (16 (null)) linux-initramfs-tool (0 (null)) kmod (0 (null)) grub-pc (16 (null)) grub-efi-amd64 (16 (null)) grub-efi-ia32 (16 (null)) grub (16 (null)) lilo (0 (null)) fdutils (0 (null)) linux-doc-4.6.0 (16 (null)) linux-source-4.6.0 (0 (null)) linux-tools (0 (null)) linux-headers-4.6.0-7-generic (0 (null)) 
Provides: 
4.6.0-7.8 - zfs-dkms (= ) virtualbox-guest-modules (= ) spl-dkms (= ) redhat-cluster-modules (= ) linux-image (= ) kvm-api-4 (= ) ivtv-modules (= ) fuse-module (= ) 
Reverse Provides: 
ubuntu@yakkety:~$ 

Here the kernel has a 4.6.0-7 version number, not a 4.6.0-7.8 as you
mentioned. Where do I get that kernel?

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1590069

Title:
  vDSO syscalls don't work on yakkety/master-next (and unstable/master)

Status in linux package in Ubuntu:
  Triaged
Status in linux source package in Yakkety:
  Triaged

Bug description:
  Hi guys,

  I'm having a problem where vDSO syscalls don't work on yakkety-next:

  dev:~ uname -a
  Linux dev 4.6.0-8-generic #9 SMP Mon Jun 6 14:21:30 MDT 2016 x86_64 x86_64 x86_64 GNU/Linux
  dev:~ cat tester.c 
  #include <unistd.h>
  #include <stdio.h>
  #include <sys/time.h>

  int main()
  {
  	struct timeval tv;
  	struct timezone tz;

  	while (1) {
  		sleep(1);
  		if (gettimeofday(&tv, &tz) < 0) {
  			perror("gettimeofday");
  		}
  	}

  	return 0;
  }
  dev:~ make tester
  make: 'tester' is up to date.
  dev:~ strace tester
  strace: Can't stat 'tester': No such file or directory
  dev:~ 1 strace ./tester
  execve("./tester", ["./tester"], [/* 35 vars */]) = 0
  brk(NULL)                               = 0x19e4000
  access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
  mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbca234b000
  access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
  open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  fstat(3, {st_mode=S_IFREG|0644, st_size=44113, ...}) = 0
  mmap(NULL, 44113, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fbca2340000
  close(3)                                = 0
  access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
  open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
  fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
  mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fbca1d5f000
  mprotect(0x7fbca1f1f000, 2093056, PROT_NONE) = 0
  mmap(0x7fbca211e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fbca211e000
  mmap(0x7fbca2124000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fbca2124000
  close(3)                                = 0
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbca233f000
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbca233e000
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbca233d000
  arch_prctl(ARCH_SET_FS, 0x7fbca233e700) = 0
  mprotect(0x7fbca211e000, 16384, PROT_READ) = 0
  mprotect(0x600000, 4096, PROT_READ)     = 0
  mprotect(0x7fbca234d000, 4096, PROT_READ) = 0
  munmap(0x7fbca2340000, 44113)           = 0
  nanosleep({1, 0}, 0x7fffc8ec71f0)       = 0
  gettimeofday({1465317034, 813437}, {tz_minuteswest=0, tz_dsttime=0}) = 0
  nanosleep({1, 0}, 0x7fffc8ec71f0)       = 0
  gettimeofday({1465317035, 813718}, {tz_minuteswest=0, tz_dsttime=0}) = 0
  nanosleep({1, 0}, 0x7fffc8ec71f0)       = 0
  gettimeofday({1465317036, 814008}, {tz_minuteswest=0, tz_dsttime=0}) = 0
  nanosleep({1, 0}, ^Cstrace: Process 15793 detached
   <detached ...>

  whereas on a normal machine, they do:

  ~ uname -a
  Linux hopstrocity 4.4.0-22-generic #40-Ubuntu SMP Thu May 12 22:03:46 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  ~ cat tester.c 
  #include <unistd.h>
  #include <stdio.h>
  #include <sys/time.h>

  int main()
  {
  	struct timeval tv;
  	struct timezone tz;

  	while (1) {
  		sleep(1);
  		if (gettimeofday(&tv, &tz) < 0) {
  			perror("gettimeofday");
  		}
  	}

  	return 0;
  }

  ~ make tester
  make: 'tester' is up to date.
  ~ strace ./tester
  execve("./tester", ["./tester"], [/* 60 vars */]) = 0
  brk(NULL)                               = 0x12c7000
  access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
  mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb544a9b000
  access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
  open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
  fstat(3, {st_mode=S_IFREG|0644, st_size=143083, ...}) = 0
  mmap(NULL, 143083, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb544a78000
  close(3)                                = 0
  access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
  open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
  read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
  fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
  mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fb5444af000
  mprotect(0x7fb54466f000, 2093056, PROT_NONE) = 0
  mmap(0x7fb54486e000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fb54486e000
  mmap(0x7fb544874000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fb544874000
  close(3)                                = 0
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb544a77000
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb544a76000
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb544a75000
  arch_prctl(ARCH_SET_FS, 0x7fb544a76700) = 0
  mprotect(0x7fb54486e000, 16384, PROT_READ) = 0
  mprotect(0x600000, 4096, PROT_READ)     = 0
  mprotect(0x7fb544a9d000, 4096, PROT_READ) = 0
  munmap(0x7fb544a78000, 143083)          = 0
  nanosleep({1, 0}, 0x7fffb8b22f40)       = 0
  nanosleep({1, 0}, 0x7fffb8b22f40)       = 0
  nanosleep({1, 0}, 0x7fffb8b22f40)       = 0
  nanosleep({1, 0}, ^Cstrace: Process 16752 detached
   <detached ...>

  I suspect this is due to 3d26b8d8361a9cfa098fe8548f1836573925cc7d, but
  I'm not sure.

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


References