[rabbitmq-discuss] Crash in rabbit_management_agent-2.7.0

Richard Jones rj at metabrew.com
Fri Nov 11 12:19:02 GMT 2011


I'm running debian lenny: 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55
UTC 2010 x86_64 GNU/Linux

Same if I start rabbit manually, in the foreground, like so (as per
/usr/sbin/rabbitmq-server):
su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmq-server"

Here's the /proc/PID for the relevant beam process:

dr-xr-xr-x   7 rabbitmq rabbitmq 0 2011-11-11 13:06 .
dr-xr-xr-x 527 root     root     0 2011-09-22 09:05 ..
dr-xr-xr-x   2 rabbitmq rabbitmq 0 2011-11-11 13:06 attr
-r--------   1 root     root     0 2011-11-11 13:06 auxv
-r--r--r--   1 root     root     0 2011-11-11 13:06 cgroup
--w-------   1 root     root     0 2011-11-11 13:06 clear_refs
-r--r--r--   1 root     root     0 2011-11-11 13:06 cmdline
-rw-r--r--   1 root     root     0 2011-11-11 13:06 coredump_filter
-r--r--r--   1 root     root     0 2011-11-11 13:06 cpuset
lrwxrwxrwx   1 root     root     0 2011-11-11 13:06 cwd -> /home/rj
-r--------   1 root     root     0 2011-11-11 13:06 environ
lrwxrwxrwx   1 root     root     0 2011-11-11 13:06 exe ->
/usr/local/lib/erlang/erts-5.8.1/bin/beam.smp
dr-x------   2 root     root     0 2011-11-11 13:06 fd
dr-x------   2 root     root     0 2011-11-11 13:06 fdinfo
-r--r--r--   1 root     root     0 2011-11-11 13:06 io
-r--------   1 root     root     0 2011-11-11 13:06 limits
-rw-r--r--   1 root     root     0 2011-11-11 13:06 loginuid
-r--r--r--   1 root     root     0 2011-11-11 13:06 maps
-rw-------   1 root     root     0 2011-11-11 13:06 mem
-r--r--r--   1 root     root     0 2011-11-11 13:06 mountinfo
-r--r--r--   1 root     root     0 2011-11-11 13:06 mounts
-r--------   1 root     root     0 2011-11-11 13:06 mountstats
dr-xr-xr-x   5 rabbitmq rabbitmq 0 2011-11-11 13:06 net
-r--r--r--   1 root     root     0 2011-11-11 13:06 numa_maps
-rw-r--r--   1 root     root     0 2011-11-11 13:06 oom_adj
-r--r--r--   1 root     root     0 2011-11-11 13:06 oom_score
-r--------   1 root     root     0 2011-11-11 13:06 pagemap
lrwxrwxrwx   1 root     root     0 2011-11-11 13:06 root -> /
-rw-r--r--   1 root     root     0 2011-11-11 13:06 sched
-r--r--r--   1 root     root     0 2011-11-11 13:06 sessionid
-r--r--r--   1 root     root     0 2011-11-11 13:06 smaps
-r--r--r--   1 root     root     0 2011-11-11 13:06 stat
-r--r--r--   1 root     root     0 2011-11-11 13:06 statm
-r--r--r--   1 root     root     0 2011-11-11 13:06 status
dr-xr-xr-x  49 rabbitmq rabbitmq 0 2011-11-11 13:06 task
-r--r--r--   1 root     root     0 2011-11-11 13:06 wchan

Conversely, if I just start vim, like so:
  su rabbitmq -s /bin/sh -c "vim"
then everything in the /proc/PID dir *is* owned by rabbitmq.

If I just start erl, it's the same as starting rabbit (proc/PID/fd
owned by root)

At a bit of a loss.

RJ




On 11 November 2011 11:49, Simon MacMullen <simon at rabbitmq.com> wrote:
> On 11/11/11 11:07, Richard Jones wrote:
>>
>> The /proc/<pid>  dir is owned by rabbitmq, but the /proc/<pid>/fd dir
>> is owned (and only readable) by root, along with a bunch of other
>> stuff in /proc/<pid>.
>
> Hmm. Needless to say, that's not what I'm seeing here. I'm on Ubuntu 10.04 -
> you?
>
>> I start rabbit using "sudo /etc/init.d/rabbitmq-server start"
>>
>> Did something change in how rabbit setuids or something since 2.6?  It
>> worked fine prior to installing the new deb.
>
> 2.6.1 did something like 'setsid sh -c "/usr/sbin/rabbitmq-server"'
> 2.7.0 does 'setsid /usr/sbin/rabbitmq-server'
>
> (in both cases with come redirection and environment munging.)
>
> This doesn't feel like something that could cause this failure though.
>
> I'll patch rabbit_management_agent to fall back to lsof if it can't open
> /proc/<pid>/fd, but I'd like to find out why you're seeing this - I've
> googled a bit but can't see anything that would indicate why permissions are
> as they are.
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>


More information about the rabbitmq-discuss mailing list