Bug #6371
closedosmo-epdg: crash: APN rejected by PGW
100%
Description
osmo-epdg crashs when the PGW rejects the APN.
21:22:19.638 [info] ue_fsm state_authenticated_wait_swx_saa event=rx_swx_saa SAType=13 ResulCode=2001, {ue_fsm_data,"901700000009738","ims",true,false,<0.608.0>} 21:22:19.638 [debug] Rx AAA with ResultCode=2001 21:22:19.638 [info] S6b Tx to {diameter_caps,{"aaa.mnc070.mcc901.3gppnetwork.org","smf.mnc070.mcc901.3gppnetwork.org"},{"mnc070.mcc901.3gppnetwork.org","mnc070.mcc901.3gppnetwork.org"},{[{10,74,0,12}],[{10,74,0,23}]},{0,0},{"osmo-epdg-AAA","freediameter"},{[],[1708460467]},{[10415,13019,5535],[ 5535,10415,13019]},{[],[4]},{[],[0]},{[],[]},{[{'diameter_base_Vendor-Specific-Application-Id',10415,[16777272],[]}],[{'diameter_base_Vendor-Specific-Application-Id',[10415],[16777238],[]},{'diameter_base_Vendor-Specific-Application-Id',[10415],[16777272],[]}]},{[],[10500]},{[],[]}}: {'AAA',"sm f.mnc070.mcc901.3gppnetwork.org;1708460467;1;app_s6b",16777272,2,2001,"aaa.mnc070.mcc901.3gppnetwork.org","mnc070.mcc901.3gppnetwork.org",[],[],[],[],[],[],[],[],[],[],[]} 21:22:19.640 [info] S2b: Rx from IP {10,74,0,23} port 2123: <<72,33,0,14,232,74,53,12,163,3,247,0,2,0,2,0,93,0>> 21:22:19.640 [info] S2b: Rx from IP {10,74,0,23} port 2123: {gtp,v2,create_session_response,3897177356,10683383,undefined,[],#{{v2_cause,0} => {v2_cause,0,apn_access_denied___no_subscription,0,0,0,undefined}}} accept returned {error,closed} - goodbye! 21:22:19.640 [error] gen_server epdg_gtpc_s2b terminated with reason: no match of right hand value #{{v2_cause,0} => {v2_cause,0,apn_access_denied___no_subscription,0,0,0,undefined}} in epdg_gtpc_s2b:rx_gtp/2 line 370 21:22:19.641 [error] CRASH REPORT Process epdg_gtpc_s2b with 0 neighbours crashed with reason: no match of right hand value #{{v2_cause,0} => {v2_cause,0,apn_access_denied___no_subscription,0,0,0,undefined}} in epdg_gtpc_s2b:rx_gtp/2 line 370 21:22:19.643 [error] Supervisor osmo_epdg_sup had child epdg_gtpc_s2b started with epdg_gtpc_s2b:start_link("10.74.0.12", 2123, "10.74.0.23", 2123, "10.74.0.11", []) at <0.550.0> exit with reason no match of right hand value #{{v2_cause,0} => {v2_cause,0,apn_access_denied___no_subscription,0,0, 0,undefined}} in epdg_gtpc_s2b:rx_gtp/2 line 370 in context child_terminated 21:22:19.644 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at undefined exit with reason no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 in context start_error 21:22:19.644 [error] CRASH REPORT Process <0.610.0> with 0 neighbours crashed with reason: no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 21:22:19.644 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at undefined exit with reason no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 in context start_error 21:22:19.645 [error] CRASH REPORT Process <0.612.0> with 0 neighbours crashed with reason: no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 21:22:19.645 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at undefined exit with reason no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 in context start_error 21:22:19.645 [error] CRASH REPORT Process <0.614.0> with 0 neighbours crashed with reason: no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 21:22:19.645 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at undefined exit with reason no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 in context start_error 21:22:19.645 [error] CRASH REPORT Process <0.616.0> with 0 neighbours crashed with reason: no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 21:22:19.646 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at undefined exit with reason no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 in context start_error 21:22:19.646 [error] CRASH REPORT Process <0.618.0> with 0 neighbours crashed with reason: no match of right hand value {error,already_started} in aaa_diameter_swx:init/1 line 131 21:22:19.646 [error] Supervisor osmo_epdg_sup had child aaa_diameter_swx started with aaa_diameter_swx:start_link() at {restarting,undefined} exit with reason reached_max_restart_intensity in context shutdown 21:22:19.647 [info] Application osmo_epdg exited with reason: shutdown
Updated by laforge 2 months ago
On Tue, Feb 20, 2024 at 08:23:15PM +0000, lynxis wrote:
osmo-epdg crashs when the PGW rejects the APN.
that's weird. Normally in Erlang one spawns a new process for every message that was received, and only that process crashes, not affecting anything beyond that.
Also, even if something in the "main" application crashes, there should be a supervisor in the application
that re-spawns that mian process.
Updated by pespin 2 months ago
laforge wrote in #note-1:
On Tue, Feb 20, 2024 at 08:23:15PM +0000, lynxis wrote:
osmo-epdg crashs when the PGW rejects the APN.
that's weird. Normally in Erlang one spawns a new process for every message that was received, and only that process crashes, not affecting anything beyond that.
Yeah well, we are not (yet) doing that when recieving messages from gtplib or ipa/gsup. diameter does that.
lynxis Please add me as watcher when you create tickets, otherwise I only notice by chance when I look at the list of tickets.
Updated by pespin 2 months ago
- Status changed from New to In Progress
- % Done changed from 0 to 40
Issue reproduced with following ttcn3 test:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/36108 epdg: Introduce test TC_s2b_CreateSession_rejected
I'll work on a fix now.
Updated by pespin 2 months ago
- % Done changed from 40 to 60
Per packet process spawn on s2b is implemented here:
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36109 s2b: Spawn process for each received packet
With this I verified that after the crash (TC_s2b_CreateSession_rejected), osmo-epdg can still handle successful cases (TC_authinfo_normal).
Updated by pespin 2 months ago
- Status changed from In Progress to Feedback
- Assignee set to pespin
- % Done changed from 60 to 90
Fixed by:
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/36112 s2b: Handle CreateSession with failed Cause
Updated by pespin about 2 months ago
- Status changed from Feedback to Resolved
- % Done changed from 90 to 100
Patches merged, closing.