According to SIG specs the BLE Mesh max payload is = 384 ( 12 * 32)
nrf52 MAXLEN = 255 (but I can transfer 265 bytes in zephyr (259 bytes data + 2 bytes opcode + 4 bytes MIC = 265 bytes) )
Now configure CONFIG_BT_MESH_TX_SEG_MAX = 32 (max data payload 12 * 32 = 384)
try to send data more than 265 bytes and the result is fatal error
***** USAGE FAULT *****
Illegal load of EXC_RETURN into PC
***** Hardware exception *****
Current thread ID = 0x20000cf4
Faulting instruction address = 0x20
Fatal fault in thread 0x20000cf4! Aborting.
[00:00:17.502,532] <err> bt_ctlr_llsw_ctrl: assert: '!_radio.ticker_id_prepare'd
***** Kernel OOPS! *****
Current thread ID = 0x20000cf4
Faulting instruction address = 0x1cda6
Fatal fault in ISR! Spinning...
but If we configure CONFIG_BT_MESH_TX_SEG_MAX = 22
And now try to send data more than 264 (12 * 22) then we get a proper error "Too big message" from the access layer which is good.
I think there should be a MAXLEN checker for particular hardware according to it's limitation.
addr2line command output -
zephyr@ubuntu$addr2line -e zephyr.elf -p 0x1cda6
home/<sdk-path>/fw-nrfconnect-zephyr/subsys/bluetooth/controller/ll_sw/ctrl.c:11068