| Author |
Message |
< Erlang ~ Unexpected beam.smp process |
| odi |
Posted: Fri Sep 09, 2011 11:27 am |
|
|
|
Joined: 19 Feb 2009
Posts: 9
|
Hi,
We've been running an Erlang application on multicore machine and we've noticed that our monitoring tool (atop) sometimes informs that there're multiple instances of beam.smp process (however there should be only one Erlang VM running).
Output from atop:
Quote:
PRG S2 1315467785 2011/09/08 09:43:05 5 32589 (beam.smp) S 0 0 32589 29 0 1315466977 (/home/services/bin/beam.smp -sbt db -P 134217727 -- -root /home/services -progname erl -- -home /root -- -boot ./r) 1 2 26 1 0 0 0 0 0 0 0
PRG S2 1315467785 2011/09/08 09:43:05 5 13225 (beam.smp) D 0 0 13225 1 -2147483648 1315467784 (/home/services/bin/beam.smp -sbt db -P 134217727 -- -root /home/services -progname erl -- -home /root -- -boot ./r) 32589 0 0 1 0 0 0 0 0 0 0
It looks like there're 2 Erlang VMs with the same name, but the second one (PID 13225) is in a D state (uninterruptible sleep) and is a child of the real beam.smp process (PID 32589).
Does anybody know what is the 2nd process? Is it some kind of port or something like that? What else can we check?
P.S. We use OTP R14B01 |
|
|
| Back to top |
|
| rvirding |
Posted: Sun Sep 18, 2011 9:46 pm |
|
|
|
User
Joined: 30 Aug 2006
Posts: 452
Location: Stockholm, Sweden
|
| I am not familiar with atop but could these be separate threads within the same process? The beam normally runs at least one thread pre core. |
_________________ Robert Virding, Erlang Solutions Ltd. |
|
| Back to top |
|
| odi |
Posted: Mon Sep 19, 2011 7:19 am |
|
|
|
Joined: 19 Feb 2009
Posts: 9
|
These are certainly system processes forked by beam.smp.
You can try simple program:
Code: -module(spawn).
-export([do/1]).
do(N) ->
PIDs = spawn_do(N, []),
ok = start_do(PIDs, self()),
ok = wait_do(PIDs).
spawn_do(0, PIDs) ->
PIDs;
spawn_do(N, PIDs) ->
PID = spawn_link(fun() ->
receive
{start, PPID} ->
ok
end,
os:cmd("ping -c 1 -W 1 127.0.0.1"),
PPID ! {done, self()}
end),
spawn_do(N - 1, [PID | PIDs]).
start_do([], _PPID) ->
ok;
start_do([PID | PIDs], PPID) ->
PID ! {start, PPID},
start_do(PIDs, PPID).
wait_do([]) ->
io:format("Test finished!~n", []),
ok;
wait_do([PID | PIDs]) ->
receive {done, PID} ->
io:format("~p process is done.~n", [PID])
end,
wait_do(PIDs).
By running it with Quote: [user@arch workspace]$ erl -sname node
Erlang R14B (erts-5.8.1) [source] [64-bit] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]
Eshell V5.8.1 (abort with ^G)
(node@arch)1> spawn:do(1000). and checking system processes with Quote: while [ 1 -eq 1 ]; do ps ax | grep -E "beam|unix" | grep -v "grep"; done | tee spawn_test.log you can see that there're forked child_setup processes and sometimes there's more than one beam.smp process with '-sname node'.
I suppose that Erlang VM forks child process for the purpose of 'os:cmd/1' and before exec is run, the new beam.smp process is reported by 'ps' with the same name as main Erlang VM process. |
|
|
| Back to top |
|
| NedFrank |
Posted: Wed Dec 21, 2011 3:14 pm |
|
|
|
Joined: 21 Dec 2011
Posts: 7
Location: Kansas
|
odi wrote: Hi,
We've been running an Erlang application on multicore machine and we've noticed that our monitoring tool (atop) sometimes informs that there're multiple instances of beam.smp process (however there should be only one Erlang VM running).
Can anyone tell me if the corporate blogging software they use is able to be merged with Erlang? I know there's some third-party stuff out there. We want it to look unique, but still be functional and recognizable by visitors. |
|
|
| Back to top |
|
| wuji |
Posted: Thu Aug 16, 2012 7:29 am |
|
|
|
User
Joined: 10 Aug 2012
Posts: 654
|
walk-in refrigerator died of suffocation from carbon dioxide inside, and and cheap replica *beep* and was likely overcome by the gas in a matter
minutes, the Nashville medical examiner ruled today.Jay Luther, 47, was was [h4]cheap designer *beep*[/h4] was found dead Monday morning in the cooler of the
East Cafe. Luther, who was co-owner of the cafe, pressed pressed cheap jordans pressed a burglar alarm in the cooler that called police
the scene.There were no signs of foul play, police said.The said.The cheap jordans said.The restaurant had been closed for the weekend because of
planned power outage. Dry ice -- frozen carbon dioxide -- -- cheap Ralph Lauren -- had been used to keep food cool for the |
|
|
| Back to top |
|
| dongdongwu |
Posted: Thu Sep 20, 2012 5:24 am |
|
|
|
User
Joined: 19 Sep 2012
Posts: 236
|
His good friend Diane said: "Christian Louboutin Men Shoes was a magician, he make shoes is immediately put his female people with legs and advantage. He understands women wanted to do and can make them into beautiful Cinderella." Madonna often in its concert wearing Christian louboutin high heels , and some famous superstar like Angelina jolie, mariah Carey, beyonce Knowles, the famous Japanese singer YaYouMei Hamasaki helps Christian Louboutin Men Shoes set up its powerful position. The youngest customers will count Tom cruise's daughter sully cruz. Louboutin made for only a pair of handmade Christian Louboutin high heel Shoes! Want to be more fashion? Put on Christian Louboutin Outlet !
Candy colors of the chalaza high-heeled shoes with lolita type allure, set full finely gem blue "neon shoes" is to need to use "sexy" to describe. Each pair are worth careful appreciation of lithe and graceful fairy ludaoli, what kind of most let you move?Christian Louboutin Men Shoes that one brush red is always cannot resist the temptation, Christian Louboutin men outlet continue to use the days of high 8cm above slender heel proclaim the sexy and luxuriant. The bowknot on black pointed high-heeled shoes with sharp rivet concomitant, wild python met enchanting color printing grain, It is that pairs of high-heeled shoes lets Carrie more feminine flavour. Like Christian Louboutin for men her word. |
|
|
| Back to top |
|
|
|