[DCOS_OSS-1403] Rename beam.smp to individual erlang Created: 22/Sep/16  Updated: 09/Nov/18  Resolved: 11/Jul/17

Status: Resolved
Project: DC/OS
Component/s: networking
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Medium
Reporter: Cody Maloney (Inactive) Assignee: Sergey Urbanovich (Inactive)
Resolution: Done  
Labels: 1.11
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Fixes
Resolves
is resolved by DCOS_OSS-1400 Upgrade OTP version Resolved
Epic Link: dcos-net
Sprint: Networking Team 1.10 Sprint 4, Networking Team 1.10 Sprint 8
Story Points: 1

 Description   

Currently all of these show up in `ps` and everywhere else as beam.smp, and when someone reports an issue, they report it as "beam.smp" and then step 0 of triage is always figuring out "which beam.smp"

If we could name the binaries which get run properly, or they could overwrite argv[0] with the proper program name after starting would help debugging and triaging random issues to the right components.



 Comments   
Comment by Sargun Dhillon (Inactive) [ 26/Sep/16 ]

Either we can overwrite argv[0], or prctl (PR_SET_MM_ARG_START, PR_SET_MM_ARG_END – the preferred way). We can do this via a NIF.

Comment by Anatoly Yakovenko (Inactive) [ 26/Sep/16 ]

does `prctl (PR_SET_MM_ARG_START, PR_SET_MM_ARG_END – the preferred way).` override the memory that argv points to?

Comment by Albert Strasheim (Inactive) [ 04/Jan/17 ]

systemd can help us. In ExecStart=

For each of the specified commands, the first argument must be an absolute path to an executable. Optionally, if this file name is prefixed with "@", the second token will be passed as "argv[0]" to the executed process, followed by the further arguments specified. If the absolute filename is prefixed with "", an exit code of the command normally considered a failure (i.e. non-zero exit status or abnormal exit due to signal) is ignored and considered success. If both "" and "@" are used, they can appear in either order.

Comment by Sergey Urbanovich (Inactive) [ 12/May/17 ]

From Erlang 20.0-rc1 release notes:

OTP-14381 Application(s): erts

Changed erts startup program name, argv 0, to use the
environment variable ESCRIPT_NAME so that erlc,
dialyzer, typer, ct_run, or the escript name can be
seen with external programs, such as ps and htop
(depending on options), on unix.

If environment variable ESCRIPT_NAME is not set, argv 0
of the invoking program will be used, e.g. the name
will be erl, cerl, or the soft link name.

Comment by Sergey Urbanovich (Inactive) [ 11/Jul/17 ]

I've made it as part of https://jira.mesosphere.com/browse/DCOS_OSS-1400

 

Generated at Tue May 24 03:50:32 CDT 2022 using JIRA 7.8.4#78004-sha1:5704c55c9196a87d91490cbb295eb482fa3e65cf.