Re: BUG: using smp_processor_id() in preemptible [00000000] code: TCPTSK/1809


Rainer Kloud
 

Hello Pavel,

I notice you are using -rt kernel. Do you actually need realtime
features?
Yes, I actually need the realtime feature. I have one task which
needs to run periodically in realtime (triggered every 10ms by an
external IRQ).

Can you try to reproduce the problem on 4.19.193?
This is only a problem with the realtime patch. The patch
introduces migrate_enable which is part of the callstack:

Jun 1 09:11:46 sicam kernel: [46802.944165] BUG: using smp_processor_id() in preemptible [00000000] code: TCPTSK/1809
Jun 1 09:11:46 sicam kernel: [46802.944210] caller is migrate_enable+0x40/0x488
Jun 1 09:11:46 sicam kernel: [46802.944221] CPU: 0 PID: 1809 Comm: TI4SDTSK#135 Tainted: G W 4.19.165-cip41-rt18 #1
Jun 1 09:11:46 sicam kernel: [46802.944225] Hardware name: Altera SOCFPGA
Jun 1 09:11:46 sicam kernel: [46802.944252] [<c010e9d4>] (unwind_backtrace) from [<c010b9f4>] (show_stack+0x10/0x14)
Jun 1 09:11:46 sicam kernel: [46802.944272] [<c010b9f4>] (show_stack) from [<c062f854>] (dump_stack+0x94/0xa8)
Jun 1 09:11:46 sicam kernel: [46802.944299] [<c062f854>] (dump_stack) from [<c03a57ec>] (check_preemption_disabled+0x110/0x114)
Jun 1 09:11:46 sicam kernel: [46802.944316] [<c03a57ec>] (check_preemption_disabled) from [<c014163c>] (migrate_enable+0x40/0x488)
Jun 1 09:11:46 sicam kernel: [46802.944338] [<c014163c>] (migrate_enable) from [<c053ff0c>] (ip_finish_output2+0x21c/0x460)
Jun 1 09:11:46 sicam kernel: [46802.944353] [<c053ff0c>] (ip_finish_output2) from [<c0542854>] (ip_output+0x140/0x184)
Jun 1 09:11:46 sicam kernel: [46802.944364] [<c0542854>] (ip_output) from [<c0542128>] (__ip_queue_xmit+0x134/0x40c)
Jun 1 09:11:46 sicam kernel: [46802.944381] [<c0542128>] (__ip_queue_xmit) from [<c055cf70>] (__tcp_transmit_skb+0x53c/0xb20)
Jun 1 09:11:46 sicam kernel: [46802.944392] [<c055cf70>] (__tcp_transmit_skb) from [<c055e188>] (tcp_write_xmit+0x27c/0xfd0)
Jun 1 09:11:46 sicam kernel: [46802.944403] [<c055e188>] (tcp_write_xmit) from [<c055ef10>] (__tcp_push_pending_frames+0x34/0xa8)
Jun 1 09:11:46 sicam kernel: [46802.944413] [<c055ef10>] (__tcp_push_pending_frames) from [<c054f5cc>] (tcp_sendmsg_locked+0x66c/0xc40)
Jun 1 09:11:46 sicam kernel: [46802.944422] [<c054f5cc>] (tcp_sendmsg_locked) from [<c054fbc8>] (tcp_sendmsg+0x28/0x3c)
Jun 1 09:11:46 sicam kernel: [46802.944441] [<c054fbc8>] (tcp_sendmsg) from [<c04cb3f4>] (sock_sendmsg+0x14/0x24)
Jun 1 09:11:46 sicam kernel: [46802.944455] [<c04cb3f4>] (sock_sendmsg) from [<c04cc6d0>] (__sys_sendto+0xc4/0x104)
Jun 1 09:11:46 sicam kernel: [46802.944467] [<c04cc6d0>] (__sys_sendto) from [<c04cc72c>] (sys_send+0x18/0x20)
Jun 1 09:11:46 sicam kernel: [46802.944479] [<c04cc72c>] (sys_send) from [<c0101000>] (ret_fast_syscall+0x0/0x5c)
Jun 1 09:11:46 sicam kernel: [46802.944484] Exception stack(0xda337fa8 to 0xda337ff0)
Jun 1 09:11:46 sicam kernel: [46802.944493] 7fa0: 001c6f2c 00000001 00000037 0020ae40 00000006 00000000
Jun 1 09:11:46 sicam kernel: [46802.944502] 7fc0: 001c6f2c 00000001 00000001 00000121 001651c8 001ea378 ffff0000 00000006
Jun 1 09:11:46 sicam kernel: [46802.944508] 7fe0: 00000000 b3efea18 00000000 b6a2ff40

Best Regards,
Rainer

Join cip-dev@lists.cip-project.org to automatically receive all group messages.