zfifo can crash chunter if called when ssh login happens at same time

Description

It appears that if zfifo issues a command though a door at the same time as a ssh login is happening the messages get out of order, causing chunter to crash.

2016-11-15 06:28:08 =ERROR REPORT====

  •  

    • Generic server ezdoor_server terminating

    • Last message in was {#Port<0.5261>,{data,{eol,<<"g3IAA2QAEWNodW50ZXJAMTI3LjAuMC4xAQAAGN4AAAADAAAAAA== {\"action\": \"vm-get\"}">>}}}

    • When Server state == {state,#Port<0.5261>,[{door,#Ref<0.0.2.3924>,<<"057790ec-8655-4de2-8da4-d93f74cb5a06">>,"_fifo",<0.1787.0>,#Ref<0.0.2.3920>,chunter_vm_fsm},{door,#Ref<0.0.2.3919>,<<"057790ec-8655-4de2-8da4-d93f74cb5a06">>,"_joyent_sshd_key_is_authorized",<0.1787.0>,#Ref<0.0.2.3920>,chunter_vm_fsm},{door,#Ref<0.0.2.3889>,<<"051da77e-ca26-41a9-b615-0b36de6612d1">>,"_fifo",<0.1813.0>,#Ref<0.0.2.3886>,chunter_vm_fsm},{door,#Ref<0.0.2.3885>,<<"051da77e-ca26-41a9-b615-0b36de6612d1">>,"_joyent_sshd_key_is_authorized",<0.1813.0>,#Ref<0.0.2.3886>,chunter_vm_fsm},{door,#Ref<0.0.2.3840>,<<"053ea9e3-4507-4166-83bb-4ae2f9395255">>,"_fifo",<0.1770.0>,#Ref<0.0.2.3838>,chunter_vm_fsm},{door,#Ref<0.0.2.3837>,<<"053ea9e3-4507-4166-83bb-4ae2f9395255">>,"_joyent_sshd_key_is_authorized",<0.1770.0>,#Ref<0.0.2.3838>,chunter_vm_fsm},{door,#Ref<0.0.2.3817>,<<"05e8e823-011b-4004-9f74-9e28fe7d00b1">>,"_fifo",<0.1748.0>,#Ref<0.0.2.3815>,chunter_vm_fsm},{door,#Ref<0.0.2.3814>,<<"05e8e823-011b-4004-9f74-9e28fe7d00b1">>,"_joyent_sshd_key_is_authorized",<0.1748.0>,#Ref<0.0.2.3815>,chunter_vm_fsm},{door,#Ref<0.0.3.6500>,<<"050737ae-7d58-4999-89a3-a23f5c1bdddf">>,"_fifo",<0.1799.0>,#Ref<0.0.3.6498>,chunter_vm_fsm},{door,#Ref<0.0.3.6497>,<<"050737ae-7d58-4999-89a3-a23f5c1bdddf">>,"_joyent_sshd_key_is_authorized",<0.1799.0>,#Ref<0.0.3.6498>,chunter_vm_fsm},{door,#Ref<0.0.2.3758>,<<"0530d26e-65a9-46ee-980b-91b7426d71b2">>,"_fifo",<0.1778.0>,#Ref<0.0.2.3756>,chunter_vm_fsm},{door,#Ref<0.0.2.3755>,<<"0530d26e-65a9-46ee-980b-91b7426d71b2">>,"_joyent_sshd_key_is_authorized",<0.1778.0>,#Ref<0.0.2.3756>,chunter_vm_fsm},{door,#Ref<0.0.2.3723>,<<"0556f930-2c8b-43c2-b20e-2f306d510249">>,"_fifo",<0.1755.0>,#Ref<0.0.2.3721>,chunter_vm_fsm},{door,#Ref<0.0.2.3720>,<<"0556f930-2c8b-43c2-b20e-2f306d510249">>,"_joyent_sshd_key_is_authorized",<0.1755.0>,#Ref<0.0.2.3721>,chunter_vm_fsm},{door,#Ref<0.0.3.6414>,<<"05aa57c9-3eeb-43dc-bc37-3aab44e6f836">>,"_fifo",<0.1751.0>,#Ref<0.0.3.6411>,chunter_vm_fsm},{door,#Ref<0.0.3.6410>,<<"05aa57c9-3eeb-43dc-bc37-3aab44e6f836">>,"_joyent_sshd_key_is_authorized",<0.1751.0>,#Ref<0.0.3.6411>,chunter_vm_fsm},{door,#Ref<0.0.3.6366>,<<"0597bb79-06e5-472b-8cf9-3b75d139d320">>,"_fifo",<0.1828.0>,#Ref<0.0.3.6364>,chunter_vm_fsm},{door,#Ref<0.0.3.6363>,<<"0597bb79-06e5-472b-8cf9-3b75d139d320">>,"_joyent_sshd_key_is_authorized",<0.1828.0>,#Ref<0.0.3.6364>,chunter_vm_fsm},{door,#Ref<0.0.2.3698>,<<"054dc0fc-7280-407f-be63-a5bc8ae0b511">>,"_fifo",<0.1762.0>,#Ref<0.0.2.3696>,chunter_vm_fsm},{door,#Ref<0.0.2.3695>,<<"054dc0fc-7280-407f-be63-a5bc8ae0b511">>,"_joyent_sshd_key_is_authorized",<0.1762.0>,#Ref<0.0.2.3696>,chunter_vm_fsm}]}

    • Reason for termination ==

    • timeout,{gen_fsm,sync_send_all_state_event,[<0.1828.0>,{door,#Ref<0.0.3.6366>,<<"{\"action\": \"vm-get\"}">>},1000],[{gen_fsm,sync_send_all_state_event,3,[{file,"gen_fsm.erl"},{line,257}]},{ezdoor_server,handle_info,2,[{file,"/opt/local/go-agent/pipelines/Chunter-Dev/_build/prod/lib/chunter/src/ezdoor_server.erl"},{line,183}]},{gen_server,try_dispatch,4,[{file,"gen_server.erl"},{line,615}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,681}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
      2016-11-15 06:28:08 =CRASH REPORT====
      crasher:
      initial call: ezdoor_server:init/1
      pid: <0.214.0>
      registered_name: ezdoor_server
      exception exit: timeout,{gen_fsm,sync_send_all_state_event,[<0.1828.0>,{door,#Ref<0.0.3.6366>,<<"{\"action\": \"vm-get\"}">>},1000],[{gen_server,terminate,7,[{file,"gen_server.erl"},{line,826}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]}
      ancestors: [chunter_sup,<0.203.0>]
      messages: [{'$gen_call',{<0.1828.0>,#Ref<0.0.13107202.245039>},{remove,#Ref<0.0.3.6363>}},{'$gen_call',{<0.1770.0>,#Ref<0.0.25952257.63414>},{add,chunter_
      vm_fsm,<<"053ea9e3-4507-4166-83bb-4ae2f9395255">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1751.0>,#Ref<0.0.13107202.245041>},{add,chunter_vm_fsm,<
      <"05aa57c9-3eeb-43dc-bc37-3aab44e6f836">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1748.0>,#Ref<0.0.13107202.245042>},{add,chunter_vm_fsm,<<"05e8e8
      23-011b-4004-9f74-9e28fe7d00b1">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1762.0>,#Ref<0.0.13107202.245043>},{add,chunter_vm_fsm,<<"054dc0fc-7280-
      407f-be63-a5bc8ae0b511">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1778.0>,#Ref<0.0.25952257.63415>},{add,chunter_vm_fsm,<<"0530d26e-65a9-46ee-980b
      -91b7426d71b2">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1755.0>,#Ref<0.0.13107202.245044>},{add,chunter_vm_fsm,<<"0556f930-2c8b-43c2-b20e-2f306d5
      10249">>,"_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1799.0>,#Ref<0.0.25952257.63416>},{add,chunter_vm_fsm,<<"050737ae-7d58-4999-89a3-a23f5c1bdddf">>,
      "_joyent_sshd_key_is_authorized"}},{'$gen_call',{<0.1787.0>,#Ref<0.0.13107202.245045>},{add,chunter_vm_fsm,<<"057790ec-8655-4de2-8da4-d93f74cb5a06">>,"_joyent
      _sshd_key_is_authorized"}},heartbeat,{'$gen_call',{<0.1813.0>,#Ref<0.0.13107202.245046>},{add,chunter_vm_fsm,<<"051da77e-ca26-41a9-b615-0b36de6612d1">>,"_joye
      nt_sshd_key_is_authorized"}},{'EXIT',#Port<0.5261>,normal}]
      links: [<0.213.0>]

Environment

None

Status

Assignee

Kevin Meziere

Reporter

Kevin Meziere

Labels

None

Components

Fix versions

Affects versions

Priority

High
Configure