Scheduler hang
max_feng <[email protected]> Thu, 25 Feb 2016 10:47:56 +0800
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAMMFCTgUr18zbHg-itxmG7_NVrXsp1fDGjrqOYc3=K2hfyvANw@mail.gmail.com> |
--===============4274353601397043390==
Content-Type: multipart/alternative; boundary=001a113988d2ae7f30052c8f353a
--001a113988d2ae7f30052c8f353a
Content-Type: text/plain; charset=UTF-8
On Erlang 18.1, my application run several weeks, and I found one
scheduler hanging for several hourse (But work fine on Erlang-17.5 fine for
several months ! ), here is my experiment:
0) my application run several weeks
1) attach
2) run one process on each scheduler
5> [erlang:spawn(fun() -> erlang:process_flag(scheduler, I), io:format("Id:
~p~n", [I]) end) || I <- lists:seq(1, 24) ].
Id: 1
Id: 2
Id: 3
Id: 4
Id: 6
Id: 5
Id: 7
Id: 8
Id: 9
Id: 10
Id: 11
Id: 13
Id: 12
Id: 14
Id: 15
Id: 16
Id: 17
Id: 18
Id: 19
Id: 21
Id: 22
Id: 24
Id: 23
But scheduler-20 not responsed !.
This is run queue length:
6> erlang:statistics(run_queues).
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0}
The run queue length of scheduler-20 is 1, and increased by when I rerun
[erlang:spawn(fun() -> erlang:process_flag(scheduler, I), io:format("Id:
~p~n", [I]) end) || I <- lists:seq(1, 24) ].
Here is the callstack of scheduler-20, and most schedulers's callstack are
the same:
#0 0x0000003895ee4049 in syscall () from /lib64/libc.so.6
#1 0x000000000060f71e in ethr_event_twait ()
#2 0x00000000004d9edc in scheduler_wait ()
#3 0x00000000004e5926 in schedule ()
#4 0x00000000004383c3 in process_main ()
#5 0x00000000004d431f in sched_thread_func ()
#6 0x000000000060ee12 in thr_wrapper ()
#7 0x0000003896207851 in start_thread () from /lib64/libpthread.so.0
#8 0x0000003895ee767d in clone () from /lib64/libc.so.6
But after several hours scheduler-20 resume again !
Max Feng
--001a113988d2ae7f30052c8f353a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Erlang 18.1, my =C2=A0application run several weeks, an=
d I found one scheduler hanging for several hourse (But work fine on Erlang=
-17.5 fine for several months ! ), here is my experiment:<div><br>0) my app=
lication run several weeks</div><div>1) attach</div><div>2) run one process=
on each scheduler</div><div><div>5> [erlang:spawn(fun() -> erlang:pr=
ocess_flag(scheduler, I), io:format("Id: ~p~n", [I]) end) || I &l=
t;- lists:seq(1, 24) ].</div><div>Id: 1</div><div>Id: 2</div><div>Id: 3</di=
v><div>Id: 4</div><div>Id: 6</div><div>Id: 5</div><div>Id: 7</div><div>Id: =
8</div><div>Id: 9</div><div>Id: 10</div><div>Id: 11</div><div>Id: 13</div><=
div>Id: 12</div><div>Id: 14</div><div>Id: 15</div><div>Id: 16</div><div>Id:=
17</div><div>Id: 18</div><div>Id: 19</div><div>Id: 21</div><div>Id: 22</di=
v><div>Id: 24</div><div>Id: 23</div></div><div><br></div><div>But scheduler=
-20 not responsed !.</div><div><br></div><div>This is run queue length:</di=
v><div><div>6> erlang:statistics(run_queues).</div><div>{0,0,0,0,0,0,0,0=
,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0}</div></div><div><br></div><div>The run qu=
eue length of scheduler-20 is 1, and increased by when I rerun [erlang:spaw=
n(fun() -> erlang:process_flag(scheduler, I), io:format("Id: ~p~n&q=
uot;, [I]) end) || I <- lists:seq(1, 24) ].</div><div><br></div><div><br=
></div><div>Here is the callstack of scheduler-20, and most schedulers'=
s callstack are the same:</div><div><div><br></div><div>#0 =C2=A00x00000038=
95ee4049 in syscall () from /lib64/libc.so.6</div><div>#1 =C2=A00x000000000=
060f71e in ethr_event_twait ()</div><div>#2 =C2=A00x00000000004d9edc in sch=
eduler_wait ()</div><div>#3 =C2=A00x00000000004e5926 in schedule ()</div><d=
iv>#4 =C2=A00x00000000004383c3 in process_main ()</div><div>#5 =C2=A00x0000=
0000004d431f in sched_thread_func ()</div><div>#6 =C2=A00x000000000060ee12 =
in thr_wrapper ()</div><div>#7 =C2=A00x0000003896207851 in start_thread () =
from /lib64/libpthread.so.0</div><div>#8 =C2=A00x0000003895ee767d in clone =
() from /lib64/libc.so.6</div></div><div><br></div><div>But after several h=
ours scheduler-20 resume again !</div><div><br></div><div>Max Feng</div><di=
v><br></div><div><br></div></div>
--001a113988d2ae7f30052c8f353a--
--===============4274353601397043390==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs
--===============4274353601397043390==--