openat03 in ubuntu_ltp_syscall failed with Trusty

Bug #1785207 reported by Po-Hsu Lin
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Triaged
Undecided
Unassigned
linux (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

<<<test_start>>>
tag=openat03 stime=1533289807
cmdline="openat03"
contacts=""
analysis=exit
<<<test_output>>>
openat03 0 TINFO : creating a file with O_TMPFILE flag
incrementing stop
openat03 0 TINFO : writing data to the file
openat03 0 TINFO : file size is '4096'
openat03 0 TINFO : looking for the file in '.'
openat03 0 TINFO : file not found, OK
openat03 0 TINFO : renaming '/tmp/ltp-5saSOZV2Gx/opea7u155/#286254 (deleted)' -> 'tmpfile'
openat03 0 TINFO : found a file: tmpfile
openat03 1 TPASS : single file tests passed
openat03 0 TINFO : create files in multiple directories
openat03 0 TINFO : removing test directories
openat03 0 TINFO : writing/reading temporary files
openat03 0 TINFO : closing temporary files
openat03 2 TPASS : multiple files tests passed
openat03 0 TINFO : create multiple directories, link files into them
openat03 0 TINFO : and check file permissions
openat03 3 TFAIL : openat03.c:223: file mode read 0, but expected 7777
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=1 corefile=no
cutime=0 cstime=0
<<<test_end>>>

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: linux-image-3.13.0-153-generic 3.13.0-153.203
ProcVersionSignature: User Name 3.13.0-153.203-generic 3.13.11-ckt39
Uname: Linux 3.13.0-153-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Aug 3 07:50 seq
 crw-rw---- 1 root audio 116, 33 Aug 3 07:50 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.14.1-0ubuntu3.29
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Fri Aug 3 09:49:41 2018
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
PciMultimedia:

ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.13.0-153-generic root=UUID=41f2a2b1-0082-4a56-ad3b-9f99ca574aeb ro
RelatedPackageVersions:
 linux-restricted-modules-3.13.0-153-generic N/A
 linux-backports-modules-3.13.0-153-generic N/A
 linux-firmware 1.127.24
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: Ubuntu-1.8.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-xenial
dmi.modalias: dmi:bvnSeaBIOS:bvrUbuntu-1.8.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-xenial:cvnQEMU:ct1:cvrpc-i440fx-xenial:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-xenial
dmi.sys.vendor: QEMU

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Triaged
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: New → Confirmed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

The result is a bit different on PowerPC and ARM64:
<<<test_start>>>
tag=openat03 stime=1541585769
cmdline="openat03"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
openat03 1 TBROK : openat03.c:59: openat() failed: errno=EINVAL(22): Invalid argument
openat03 2 TBROK : openat03.c:59: Remaining cases broken
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=0
<<<test_end>>>

Po-Hsu Lin (cypressyew)
tags: added: ubuntu-ltp-syscalls
Revision history for this message
Sean Feole (sfeole) wrote :

4.15.0-1066.71~14.04.1 linux-azure

9384. 12/14 04:45:22 DEBUG| utils:0153| [stdout] startup='Sat Dec 14 04:00:32 2019'
9385. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : creating a file with O_TMPFILE flag
9386. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : writing data to the file
9387. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : file size is '4096'
9388. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : looking for the file in '.'
9389. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : file not found, OK
9390. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : renaming '/tmp/ltp-AU7RWwSEJ6/opeERQyaw/#272670 (deleted)' -> 'tmpfile'
9391. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : found a file: tmpfile
9392. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 1 TPASS : single file tests passed
9393. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : create files in multiple directories
9394. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : removing test directories
9395. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : writing/reading temporary files
9396. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : closing temporary files
9397. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 2 TPASS : multiple files tests passed
9398. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : create multiple directories, link files into them
9399. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 0 TINFO : and check file permissions
9400. 12/14 04:45:22 DEBUG| utils:0153| [stdout] openat03 3 TFAIL : openat03.c:223: file mode read 0, but expected 7777
9401. 12/14 04:45:22 DEBUG| utils:0153| [stdout] tag=openat03 stime=1576296032 dur=0 exit=exited stat=1 core=no cu=0 cs=1
9402. 12/14 04:45:22 DEBUG| utils:0153| [stdout] startup='Sat Dec 14 04:00:34 2019'

tags: added: sru-20191202
Changed in ubuntu-kernel-tests:
status: Confirmed → Triaged
Po-Hsu Lin (cypressyew)
tags: added: sru-20200316
Po-Hsu Lin (cypressyew)
tags: added: sru-20200720
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

still visible on 4.4.0-1082.86 aws

tags: added: 4.4 aws sru-20201109
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

Found with trusty/linux-azure 4.15.0-1114.127~14.04.1.

tags: added: 4.15 azure sru-20210412
Revision history for this message
Guilherme G. Piccoli (gpiccoli) wrote :

Found in T-4.15/Azure, cycle sru-20210531 .

tags: added: sru-20210531
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Found on T-4.15/Azure 4.15.0-1124.137~14.04.1

tags: added: sru-20210906
Revision history for this message
Thadeu Lima de Souza Cascardo (cascardo) wrote :

From glibc:

int
__libc_openat (int fd, const char *file, int oflag, ...)
{
  mode_t mode = 0;
  if (__OPEN_NEEDS_MODE (oflag))
    {
      va_list arg;
      va_start (arg, oflag);
      mode = va_arg (arg, mode_t);
      va_end (arg);
    }

  return SYSCALL_CANCEL (openat, fd, file, oflag, mode);
}

/* Detect if open needs mode as a third argument (or for openat as a fourth
   argument). */
#ifdef __O_TMPFILE
# define __OPEN_NEEDS_MODE(oflag) \
  (((oflag) & O_CREAT) != 0 || ((oflag) & __O_TMPFILE) == __O_TMPFILE)
#else
# define __OPEN_NEEDS_MODE(oflag) (((oflag) & O_CREAT) != 0)
#endif

So, very likely __OPEN_NEEDS_MODE does not support O_TMPFILE on trusty. So, this specific test will always fail on trusty. I wonder if this might cause issues in the real world, and, then, justify a glibc update on trusty ESM.

Cascardo.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.