ps segfaults when users have large numbers of group memberships

Asked by Robert Beaty on 2013-04-29

When a user logs in via ssh with a large number of group memberships it causes a seg fault when running ps (procps version 3.2.8).

Description: Ubuntu 12.04.2 LTS
Release: 12.04

procps:
  Installed: 1:3.2.8-11ubuntu6
  Candidate: 1:3.2.8-11ubuntu6
  Version table:
 *** 1:3.2.8-11ubuntu6 0
        500 http://us.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status

Expected results: ps completes and returns to prompt

  PID TTY TIME CMD
12707 pts/1 00:00:00 sudo
12708 pts/1 00:00:00 bash

Actual results:

  PID TTY TIME CMD
12707 pts/1 00:00:00 sudo
12708 pts/1 00:00:00 bash

Signal 11 (SEGV) caught by ps (procps version 3.2.8).

Here is the end of a strace on a ps:

mmap(NULL, 135168, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4da880e000
mremap(0x7f4da880e000, 135168, 266240, MREMAP_MAYMOVE) = 0x7f4da87cd000
mremap(0x7f4da87cd000, 266240, 528384, MREMAP_MAYMOVE) = 0x7f4da929d000
mremap(0x7f4da929d000, 528384, 1052672, MREMAP_MAYMOVE) = 0x7f4da919c000
mremap(0x7f4da919c000, 1052672, 2101248, MREMAP_MAYMOVE) = 0x7f4da862e000
mremap(0x7f4da862e000, 2101248, 4198400, MREMAP_MAYMOVE) = 0x7f4da822d000
mremap(0x7f4da822d000, 4198400, 8392704, MREMAP_MAYMOVE) = 0x7f4da7a2c000
mremap(0x7f4da7a2c000, 8392704, 16781312, MREMAP_MAYMOVE) = 0x7f4da6a2b000
mremap(0x7f4da6a2b000, 16781312, 33558528, MREMAP_MAYMOVE) = 0x7f4da4a2a000
mremap(0x7f4da4a2a000, 33558528, 67112960, MREMAP_MAYMOVE) = 0x7f4da0a29000
mremap(0x7f4da0a29000, 67112960, 134221824, MREMAP_MAYMOVE) = 0x7f4d98a28000
mremap(0x7f4d98a28000, 134221824, 268439552, MREMAP_MAYMOVE) = 0x7f4d88a27000
mremap(0x7f4d88a27000, 268439552, 536875008, MREMAP_MAYMOVE) = 0x7f4d68a26000
mremap(0x7f4d68a26000, 536875008, 1073745920, MREMAP_MAYMOVE) = 0x7f4d28a25000
mremap(0x7f4d28a25000, 1073745920, 2147487744, MREMAP_MAYMOVE) = 0x7f4ca8a24000
mremap(0x7f4ca8a24000, 2147487744, 4096, MREMAP_MAYMOVE) = 0x7f4ca8a24000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
write(2, "\n\nSignal 11 (SEGV) caught by ps "..., 132

Signal 11 (SEGV) caught by ps (procps version 3.2.8).
Please send bug reports to <email address hidden> or <email address hidden>
) = 132
exit_group(139)

Here is the debian bug report on it.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702965

It looks like the 12.10 repos have the newer version of the procps and libprocps0 packages which address the problem.

My question being can these newer version be put into place for 12.04 or am I stuck trying to manually intall a newer version fro the 12.10 repos or something along those lines to fix this issue.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu procps Edit question
Assignee:
No assignee Edit question
Last query:
2013-04-29
Last reply:
2013-04-29

I suggest you report a bug.

Can you help with this problem?

Provide an answer of your own, or ask Robert Beaty for more information if necessary.

To post a message you must log in.