hi, nvidia team.
I encountered a system crash issue caused by uart dma.
We are using Jetpack 5.1.2 RT patch:
./kernel-5.10/scripts/rt-patch.sh apply-patches
We are usingUART2 (/dev/ttyTHS4):
#sudo stty -F /dev/ttyTHS4
speed 460800 baud; line = 0;
intr = <undef>; quit = <undef>; erase = <undef>; kill = <undef>; eof = <undef>; start = <undef>; stop = <undef>; susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = <undef>; discard = <undef>; min = 0; time = 0;
-icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok -echoctl -echoke
When reading data, the system will hang up:
hexdump /dev/ttyTHS4
Kernel panic log:
orin-master login: [ 179.857847] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 179.862160] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 179.867058] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 179.867061] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 179.872078] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 179.872080] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 179.877056] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 179.877058] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 180.257859] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.277153] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.457878] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.457996] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.458115] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.458234] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.462153] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.467089] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 180.467093] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 180.682151] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 180.697148] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 184.250476] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 184.250501] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.250504] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.250520] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.250521] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.251488] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
[ 184.251494] Mem abort info:
[ 184.251495] ESR = 0x96000004
[ 184.251496] EC = 0x25: DABT (current EL), IL = 32 bits
[ 184.251498] SET = 0, FnV = 0
[ 184.251499] EA = 0, S1PTW = 0
[ 184.251500] Data abort info:
[ 184.251500] ISV = 0, ISS = 0x00000004
[ 184.251501] CM = 0, WnR = 0
[ 184.251502] user pgtable: 4k pages, 48-bit VAs, pgdp=000000019e16a000
[ 184.251504] [0000000000000004] pgd=0000000000000000, p4d=0000000000000000
[ 184.251508] Internal error: Oops: 96000004 [#1] PREEMPT_RT SMP
[ 184.251511] Modules linked in: fuse xt_conntrack spidev xt_MASQUERADE nf_conntrack_netlink nfnetlink iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_addrtype iptable_filter br_netfilter lzo_rle lzo_compress mttcan can_dev can_raw zram can overlay ramoops reed_solomon loop snd_soc_tegra186_dspk snd_soc_tegra210_ope snd_soc_tegra186_asrc snd_soc_tegra186_arad snd_soc_tegra210_iqc snd_soc_tegra210_mvc snd_soc_tegra210_afc snd_soc_tegra210_dmic snd_soc_tegra210_adx snd_soc_tegra210_amx snd_soc_tegra210_i2s snd_soc_tegra210_mixer snd_soc_tegra210_admaif snd_soc_tegra210_sfc snd_soc_tegra_pcm aes_ce_blk crypto_simd cryptd aes_ce_cipher ghash_ce sha2_ce sha256_arm64 sha1_ce snd_soc_spdif_tx snd_soc_tegra_machine_driver binfmt_misc nct1008 i2c_nvvrs11 snd_soc_tegra210_adsp cam_cdi_tsc userspace_alert nv_hawk_owl snd_soc_tegra_utils tegra_bpmp_thermal max96712 snd_soc_simple_card_utils snd_soc_tegra210_ahub nvadsp tegra210_adma snd_hda_codec_hdmi snd_soc_rt5640
[ 184.251565] snd_soc_rl6231 snd_hda_tegra snd_hda_codec snd_hda_core spi_tegra114 ina3221 pwm_fan nvgpu nvmap ip_tables x_tables [last unloaded: mtd]
[ 184.251576] CPU: 0 PID: 3815 Comm: irq/116-gpcdma. Not tainted 5.10.120-rt70-tegra #1
[ 184.251579] Hardware name: Unknown Jetson AGX Orin Developer Kit/Jetson AGX Orin Developer Kit, BIOS 4.1-33958178 08/01/2023
[ 184.251581] pstate: 20c00009 (nzCv daif +PAN +UAO -TCO BTYPE=--)
[ 184.251583] pc : tegra_uart_tx_dma_complete+0x5c/0xe0
[ 184.251593] lr : tegra_uart_tx_dma_complete+0x4c/0xe0
[ 184.251595] sp : ffff800011acbb60
[ 184.251596] x29: ffff800011acbb60 x28: ffffdf1e50ef8000
[ 184.251598] x27: 0000000000000007 x26: ffff800011acbc18
[ 184.251599] x25: ffff5f6993f2bb00 x24: dead000000000100
[ 184.251601] x23: dead000000000122 x22: ffff5f6993f2bb00
[ 184.251602] x21: ffff5f69843b69a0 x20: 00000000000000b0
[ 184.251604] x19: ffff5f69873ed480 x18: ffff5f69e202e794
[ 184.251605] x17: 0000000000000000 x16: 00000000000000f5
[ 184.251606] x15: ffff5f69e202e884 x14: 0000000000000d5b
[ 184.251608] x13: 0000000000004bcd x12: 0000000000000024
[ 184.251609] x11: 071c71c71c71c71c x10: 0000000000000ab0
[ 184.251610] x9 : ffff800011acbce0 x8 : ffff5f6993f2c610
[ 184.251612] x7 : 000000000000e7c7 x6 : 00000000215f1c29
[ 184.251613] x5 : 00ffffffffffffff x4 : 0000000000000000
[ 184.251615] x3 : 0000000000000000 x2 : 0000000000000000
[ 184.251616] x1 : 00000000000002cd x0 : ffff5f69873ed480
[ 184.251618] Call trace:
[ 184.251620] tegra_uart_tx_dma_complete+0x5c/0xe0
[ 184.251622] vchan_complete+0x1fc/0x230
[ 184.251626] tasklet_action_common.isra.0+0x10c/0x150
[ 184.251629] tasklet_action+0x30/0x40
[ 184.251631] __do_softirq+0x120/0x3b4
[ 184.251633] __local_bh_enable_ip+0xdc/0x140
[ 184.251635] irq_forced_thread_fn+0x88/0xc0
[ 184.251638] irq_thread+0x188/0x280
[ 184.251639] kthread+0x180/0x1b0
[ 184.251643] ret_from_fork+0x10/0x24
[ 184.251647] Code: b94043e3 f9414a62 aa1303e0 b942aa74 (b9400441)
[ 184.251650] ---[ end trace 0000000000000002 ]---
[ 184.257823] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 184.257941] tegra-gpcdma 2600000.gpcdma: DMA pause timed out
[ 184.257953] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.257955] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.257970] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.257971] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.262064] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.262067] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.267006] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.267008] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.267014] tegra-gpcdma 2600000.gpcdma: slave id already in use
[ 184.267014] serial-tegra 3140000.serial: Not able to get desc for Tx
[ 184.657263] Kernel panic - not syncing:
The corresponding log is as follows.
Please help to see how to solve this problem.
debug.log (95.7 KB)
Thank you.