OS-4506

lxbrand preserve /proc/<pid>/cmdline format

Status:
Resolved
Resolution:
Fixed
Created:
2015-07-14T05:58:09.000-0400
Updated:
2019-08-14T08:40:53.619-0400

Description

Ubuntu 14.04 certified:

root@48663c5b-e4d0-62f3-ae44-cc6b8014d4a2:~# ruby test.rb &
[1] 1696
root@48663c5b-e4d0-62f3-ae44-cc6b8014d4a2:~# cat /proc/1696/cmdline | tr '\000' '\n'
ruby
test.rb

Ubuntu 14.04 in LX zone:

root@674dd9a3-b9bc-c8a4-b9d9-968c6dac7d03:~# ruby test.sh &
[1] 88219
root@674dd9a3-b9bc-c8a4-b9d9-968c6dac7d03:~# cat /proc/88219/cmdline | tr '\000' '\n'
ruby

Interestingly, they both behave as expected when tested with Perl or Bash called in the same way.

Comments (8)

Former user commented on 2015-07-14T17:41:07.000-0400:

This appears to be occurring due to ruby manipulating the argv array during runtime. LX currently walks argv to construct /proc/<pid>/cmdline unlike Linux, which stores start/end pointers for argv contents.

Richard Bradley commented on 2015-07-17T06:16:46.000-0400:

I'm trying to understand this ticket in Andrew's absence.

Patrick, I'm not sure if you've got access to the above test.rb and test.sh scripts/machines, and based on your recent comment it looks like you've already got the information you need here, but if you need me to help out at all here then let me know.

Former user commented on 2015-07-17T14:43:31.000-0400:

Are there customers being negatively impacted by this, or is it simply an observed delta between LX and Linux?

Richard Bradley commented on 2015-07-17T14:56:00.000-0400 (edited 2015-08-10T17:37:40.000-0400):

The customer here has reported this when attempting to get their Chef scripts to run on lx.

According to the customer, this is a blocker in their attempts to move from KVM Ubuntu to lx, which they're eager to do.

I'm not certain if this is an issue with Chef itself, or some part of their Chef cookbooks. I can find this out if it helps.

Former user commented on 2015-07-17T14:59:38.000-0400:

Specifics aren't needed. Thanks

Richard Bradley commented on 2015-08-10T06:04:52.000-0400:

Is there an update that I can provide to the customer in this case?

Former user commented on 2015-08-11T15:17:58.000-0400:

I have authored a fix. It is going through review now.

Former user commented on 2015-08-17T16:12:51.000-0400:

illumos-joyent commit fcbca77 (branch master, by Patrick Mooney)

OS-4506#icft=OS-4506 lxbrand preserve /proc/<pid>/cmdline format
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>