The following code reproduces the bug:

#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <fcntl.h>

int main(void)
{
        char path[1024];
        int fd;
        const pid_t pid = getpid();
        char buffer[1];

        snprintf(path, sizeof(path), "/proc/%d/task/%d/attr/context",
pid, pid);

        fd = open(path, O_RDWR);
        if (fd >= 0) {
                (void)write(fd, buffer, 0);
                (void)close(fd);
        }
}

-- 
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/1720779

Title:
  linux 4.13.0-13.14 ADT test failure with linux 4.13.0-13.14

Status in linux package in Ubuntu:
  In Progress

Bug description:
  Testing failed on:
      amd64: 
https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-artful-canonical-kernel-team-bootstrap/artful/amd64/l/linux/20171001_175518_8c658@/log.gz

  ubuntu_stress_smoke_test is failing on amd64. It looks like stress-ng
  might be terminating during the procfs test.

  17:41:42 DEBUG| [stdout] procfs STARTING
  17:52:47 INFO |               ERROR   
ubuntu_stress_smoke_test.stress-smoke-test      
ubuntu_stress_smoke_test.stress-smoke-test      timestamp=1506880367    
localtime=Oct 01 17:52:47       Test subprocess failed rc=9
  17:52:49 INFO |       END ERROR       
ubuntu_stress_smoke_test.stress-smoke-test      
ubuntu_stress_smoke_test.stress-smoke-test      timestamp=1506880368    
localtime=Oct 01 17:52:48

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

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to