[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session" on kernel 4.4 (bu

2016-03-04 Thread Alan Griffiths
Now affecting trusty 3.13.0-79-generic (which is what a lot of CI slaves
are running today)

** Changed in: linux (Ubuntu)
   Status: Fix Released => Confirmed

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session" on
  kernel 4.4 (but kernel 4.3 works)

Status in GLibC:
  New
Status in Mir:
  Invalid
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

  ===
  Kernel-Description: recvmsg() fails SCM_CREDENTIALS request with EOPNOTSUPP.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session" on kernel 4.4 (bu

2016-03-04 Thread Alan Griffiths
https://mir-jenkins.ubuntu.com/job/build-2-binpkg-
mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/336/consoleFull

09:55:24 9: [ RUN ] LP.1540731
09:55:24 9: 
/��BUILDDIR��/mir-0.20.1+16.04.20160225.1+vivid345bzr3362/tests/acceptance-tests/test_prompt_session_client_api.cpp:672:
 Failure
09:55:24 9: Value of: recvmsg(socket_fd[server], &msgh, MSG_PEEK)
09:55:24 9: Expected: isn't equal to -1
09:55:24 9: Actual: -1 (of type long)
09:55:24 9: Operation not supported
09:55:24 9: [ FAILED ] LP.1540731 (31 ms)

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session" on
  kernel 4.4 (but kernel 4.3 works)

Status in GLibC:
  New
Status in Mir:
  Invalid
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

  ===
  Kernel-Description: recvmsg() fails SCM_CREDENTIALS request with EOPNOTSUPP.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session" on kernel 4.4 (bu

2016-02-05 Thread Alan Griffiths
Confirmed:
http://kernel.ubuntu.com/~jsalisbury/lp1540731/Commit3822b5cReverted/
fixes this problem.

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session" on
  kernel 4.4 (but kernel 4.3 works)

Status in GLibC:
  New
Status in Mir:
  Confirmed
Status in linux package in Ubuntu:
  In Progress

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session"

2016-02-04 Thread Alan Griffiths
-rc5 succeeds

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session"

Status in GLibC:
  New
Status in Mir:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session"

2016-02-03 Thread Alan Griffiths
Also "This happens with kernel-4.5.0-0.rc1.git2.1.fc24.x86_64 as well."
(from https://sourceware.org/bugzilla/show_bug.cgi?id=19557)

** Bug watch added: Sourceware.org Bugzilla #19557
   http://sourceware.org/bugzilla/show_bug.cgi?id=19557

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session"

Status in GLibC:
  New
Status in Mir:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session"

2016-02-03 Thread Alan Griffiths
-final fails
-rc6 fails
-rc4 succeeds

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session"

Status in GLibC:
  New
Status in Mir:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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


[Kernel-packages] [Bug 1540731] Re: SocketMessenger::update_session_creds() fails to get client PID, causing "[ FAILED ] PromptSessionClientAPI.client_pid_is_associated_with_session"

2016-02-03 Thread Alan Griffiths
** Description changed:

  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.
  
  This manifests as a test failure in Mir:
  
- [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
- unknown file: Failure
+ [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
+ unknown file: Failure
  
  Test case:
  
- #include 
- #include 
+ #include 
+ #include 
  #include 
  #include 
+ #include 
+ #include 
+ #include 
  
- TEST(IsItBroken, recvmsg)
+ int main()
  {
- using namespace testing;
- 
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;
  
- ASSERT_THAT(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd), Eq(0));
+ assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);
  
- auto const msg = "A random message";
+ char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);
  
- ASSERT_THAT(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
- &opt, sizeof(opt)), Ne(-1));
+ assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED, &opt,
+ sizeof(opt)) != -1);
  
  union {
  struct cmsghdr cmh;
- char   control[CMSG_SPACE(sizeof(ucred))];
+ char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;
  
  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;
  
  msghdr msgh;
- msgh.msg_name = nullptr;
+ msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
- msgh.msg_iov = nullptr;
+ msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);
  
  errno = 0;
  
- EXPECT_THAT(recvmsg(socket_fd[server], &msgh, MSG_PEEK), Ne(-1))
- << "Error: " << strerror(errno);
- 
- for (auto socket : socket_fd) close(socket);
+ if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
+ {
+ printf("Error: %s\n", strerror(errno));
+ exit(EXIT_FAILURE);
+ }
+ else
+ {
+ printf("Success!\n");
+ exit(EXIT_SUCCESS);
+ }
  }

** Changed in: mir
   Importance: High => Critical

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

Title:
  SocketMessenger::update_session_creds() fails to get client PID,
  causing "[ FAILED ]
  PromptSessionClientAPI.client_pid_is_associated_with_session"

Status in GLibC:
  New
Status in Mir:
  Confirmed
Status in linux package in Ubuntu:
  Confirmed

Bug description:
  Since updating to the 4.4.0-2 kernel recvmsg() fails SCM_CREDENTIALS
  request with EOPNOTSUPP.

  This manifests as a test failure in Mir:

  [ RUN  ] PromptSessionClientAPI.client_pid_is_associated_with_session
  unknown file: Failure

  Test case:

  #include 
  #include 
  #include 
  #include 
  #include 
  #include 
  #include 

  int main()
  {
  enum { server, client, size };
  int socket_fd[size];
  int const opt = 1;

  assert(socketpair(AF_LOCAL, SOCK_STREAM, 0, socket_fd) == 0);

  char const msg[] = "A random message";
  send(socket_fd[client], msg, sizeof msg, MSG_DONTWAIT | MSG_NOSIGNAL);

  assert(setsockopt(socket_fd[server], SOL_SOCKET, SO_PASSCRED,
  &opt, sizeof(opt)) != -1);

  union {
  struct cmsghdr cmh;
  char control[CMSG_SPACE(sizeof(ucred))];
  } control_un;

  control_un.cmh.cmsg_len = CMSG_LEN(sizeof(ucred));
  control_un.cmh.cmsg_level = SOL_SOCKET;
  control_un.cmh.cmsg_type = SCM_CREDENTIALS;

  msghdr msgh;
  msgh.msg_name = NULL;
  msgh.msg_namelen = 0;
  msgh.msg_iov = NULL;
  msgh.msg_iovlen = 0;
  msgh.msg_control = control_un.control;
  msgh.msg_controllen = sizeof(control_un.control);

  errno = 0;

  if (recvmsg(socket_fd[server], &msgh, MSG_PEEK) == -1)
  {
  printf("Error: %s\n", strerror(errno));
  exit(EXIT_FAILURE);
  }
  else
  {
  printf("Success!\n");
  exit(EXIT_SUCCESS);
  }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/glibc/+bug/1540731/+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