B/S架构下的Timer.stop()

本文介绍了在B/S架构中如何有效停止一个正在运行的定时器对象。通过设置一个静态公共变量来控制定时器的停止,并在定时事件处理方法内进行检查,实现了跨页面的定时器控制。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

首先,感谢小沈阳同学提供的启发。
关于Timer.stop方法,网上介绍的一直是C/S架构下的方法。最近做的程序中,有一个是定时播放声音的,例子如下:

        [DllImport("winmm")]
        public static extern bool PlaySound(string szSound, IntPtr hMod, int i);//注册声音的事件

        protected void Button3_Click(object sender, EventArgs e)//播放声音的按钮。
        {
            PlaySound(@Server.MapPath("/wav/ding.wav"), IntPtr.Zero, 1);
           
        }

        protected void Button5_Click(object sender, EventArgs e)//停止
        {
            t.Stop();
        }

        protected void Button6_Click(object sender, EventArgs e)//循环播放
        {
            t = new System.Timers.Timer(Convert.ToDouble(1000));
            t.Elapsed += new System.Timers.ElapsedEventHandler(Button3_Click);
            t.AutoReset = true;
            t.Enabled = true;
        }

调试时发现想让t.stop()没起作用,Timer对象根本就停不下来。Button5_Click里t.Stop()只要一执行就发生“未将对象引用到实例”的错误,而且发现t对象竟然为空。我Timer对象是在外部建立的,不可能访问不到。而且网上说都可以这样停,可是在这里却不可能实现。在Button6_Click里设断点也检测不到Timer对象。在网上搜了竟然有人说这个东西在B/S架构里竟然不好停,因为它不像C/S里对象不会随页面刷新而重建,而在B/S里当按钮提交了,页面生存周期结束了就捕捉不到了。非要写Application才可以,而且Application还很耗资源。

 

 

不甘心就这样放弃,问题是Timer对象建立了就根本停不下来了,除非关闭.net端口。连关闭页面都不行,照响不误。

 

最后,在小沈阳同学的提议下试了在Button3_Click里捕捉Timer对象,没想到t很快就找到了,看来关键是System.Timers.ElapsedEventHandler所响应的事件里,t在那里生存和循环。

 

解决办法有了。如果要停下Timer对象,在Button3_Click里加个判断就可以了:

        public static string stopp = "";//stopp对象一定要是静态的,否则页面刷新将导致变量值丢失。
        protected void Button3_Click(object sender, EventArgs e)
        {
            PlaySound(@Server.MapPath("/wav/ding.wav"), IntPtr.Zero, 1);
            if (stopp == "stopd")//关闭并释放资源
            {
                t1.Stop();
                t1.Close();
                t1.Dispose();
                t1 = null;
            }
        }

        protected void Button5_Click(object sender, EventArgs e)
        {
            stopp = "stopd";//其实,要Timer对象停,只要做这个stopp变量(一定要静态公共变量),并给它赋停下来的值就可以了,这个可以自己定义。而且,在任何页面,任何地方,只要赋值,它就会停下。
        }

        protected void Button6_Click(object sender, EventArgs e)
        {
            stopp = "xunhuan";
            t = new System.Timers.Timer(Convert.ToDouble(1000));
            t.Elapsed += new System.Timers.ElapsedEventHandler(Button3_Click);
            t.AutoReset = true;
            t.Enabled = true;
        }

没想到这么简单就实现了,Timer对象的停止。看来,在编程中的注意观察,和对类的了解十分重要。

[ 38.584592][ C7] SError Interrupt on CPU7, code 0xbe000011 -- SError [ 38.584593][ C7] CPU: 7 PID: 417 Comm: provider@2.4-ex Not tainted 5.10.160 #421 [ 38.584594][ C7] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.584595][ C7] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--) [ 38.584595][ C7] pc : rkcif_write_register_and+0x104/0x134 [ 38.584596][ C7] lr : rkcif_csi_channel_set_v1+0x84/0xc80 [ 38.584597][ C7] sp : ffffffc00bd23810 [ 38.584597][ C7] x29: ffffffc00bd23810 x28: 0000000000000003 [ 38.584599][ C7] x27: ffffff81013d8880 x26: 000000000000bbf4 [ 38.584601][ C7] x25: ffffff810373ce70 x24: 0000000000000005 [ 38.584602][ C7] x23: ffffff8103730080 x22: 0000000000000000 [ 38.584603][ C7] x21: 0000000000000001 x20: ffffff810373bbb8 [ 38.584605][ C7] x19: ffffff8103733ec8 x18: ffffffc00b5d5090 [ 38.584606][ C7] x17: ffffff810373bbbe x16: ffffff810373bbbf [ 38.584608][ C7] x15: 000000000000b915 x14: 0000000000000000 [ 38.584609][ C7] x13: ffffff810373bbd8 x12: 0000000000000000 [ 38.584610][ C7] x11: 0000000000000000 x10: 000000000000005b [ 38.584611][ C7] x9 : ffffffc009843478 x8 : ffffffc00c9f7000 [ 38.584613][ C7] x7 : 205d373134542020 x6 : ffffffc00a253dd8 [ 38.584614][ C7] x5 : ffffffffffffffff x4 : 0000000000000000 [ 38.584616][ C7] x3 : 00000000ff7f3f3f x2 : 000000000000005b [ 38.584617][ C7] x1 : 000000000000005b x0 : ffffff8103730080 [ 38.584618][ C7] Kernel panic - not syncing: Asynchronous SError Interrupt [ 38.584619][ C7] CPU: 7 PID: 417 Comm: provider@2.4-ex Not tainted 5.10.160 #421 [ 38.584620][ C7] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.584621][ C7] Call trace: [ 38.584621][ C7] dump_backtrace+0x0/0x1c8 [ 38.584622][ C7] show_stack+0x18/0x24 [ 38.584622][ C7] dump_stack_lvl+0xcc/0x114 [ 38.584623][ C7] dump_stack+0x18/0x5c [ 38.584624][ C7] panic+0x154/0x39c [ 38.584624][ C7] test_taint+0x0/0x28 [ 38.584625][ C7] arm64_serror_panic+0x74/0x80 [ 38.584625][ C7] do_serror+0xd0/0xf0 [ 38.584626][ C7] el1_error+0x90/0x114 [ 38.584627][ C7] rkcif_write_register_and+0x104/0x134 [ 38.584627][ C7] rkcif_csi_channel_set_v1+0x84/0xc80 [ 38.584628][ C7] rkcif_csi_stream_start+0x9ac/0xd98 [ 38.584629][ C7] rkcif_do_start_stream+0xa98/0x1120 [ 38.584629][ C7] rkcif_start_streaming+0x18/0x24 [ 38.584630][ C7] vb2_start_streaming+0x60/0x134 [ 38.584631][ C7] vb2_core_streamon+0x10c/0x150 [ 38.584631][ C7] vb2_ioctl_streamon+0x5c/0x8c [ 38.584632][ C7] v4l_streamon+0x24/0x30 [ 38.584633][ C7] __video_do_ioctl+0x2d0/0x3e8 [ 38.584633][ C7] video_usercopy+0x3d4/0x80c [ 38.584634][ C7] video_ioctl2+0x18/0x24 [ 38.584635][ C7] v4l2_ioctl+0x4c/0x5c [ 38.584635][ C7] __arm64_sys_ioctl+0x90/0xc8 [ 38.584636][ C7] el0_svc_common+0xac/0x1ac [ 38.584636][ C7] do_el0_svc+0x1c/0x28 [ 38.584637][ C7] el0_svc+0x10/0x1c [ 38.584638][ C7] el0_sync_handler+0x68/0xac [ 38.584638][ C7] el0_sync+0x160/0x180 [ 38.584643][ C6] CPU6: stopping [ 38.584645][ C0] CPU0: stopping [ 38.584647][ C3] CPU3: stopping [ 38.584649][ C2] CPU2: stopping [ 38.584654][ C0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.160 #421 [ 38.584696][ C4] CPU4: stopping [ 38.584698][ C1] CPU1: stopping [ 38.584704][ C5] CPU5: stopping [ 38.689741][ C0] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.690252][ C0] Call trace: [ 38.690539][ C0] dump_backtrace+0x0/0x1c8 [ 38.690923][ C0] show_stack+0x18/0x24 [ 38.691284][ C0] dump_stack_lvl+0xcc/0x114 [ 38.691678][ C0] dump_stack+0x18/0x5c [ 38.692029][ C0] local_cpu_stop+0x68/0x84 [ 38.692413][ C0] smp_send_reschedule+0x0/0x3c [ 38.692830][ C0] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.693354][ C0] __handle_domain_irq+0x7c/0xc8 [ 38.693782][ C0] gic_handle_irq+0x70/0x130 [ 38.694175][ C0] el1_irq+0xe0/0x1c0 [ 38.694517][ C0] cpuidle_enter_state+0x17c/0x3a0 [ 38.694953][ C0] cpuidle_enter+0x38/0x50 [ 38.695338][ C0] cpuidle_idle_call+0x14c/0x220 [ 38.695764][ C0] do_idle+0xa8/0xf0 [ 38.696093][ C0] cpu_startup_entry+0x24/0x28 [ 38.696498][ C0] rest_init+0xd4/0xe4 [ 38.696850][ C0] arch_call_rest_init+0x10/0x1c [ 38.697276][ C0] start_kernel+0x3a8/0x43c [ 38.697660][ C6] CPU: 6 PID: 424 Comm: allocator@4.0-s Not tainted 5.10.160 #421 [ 38.698328][ C6] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.698841][ C6] Call trace: [ 38.699118][ C6] dump_backtrace+0x0/0x1c8 [ 38.699502][ C6] show_stack+0x18/0x24 [ 38.699853][ C6] dump_stack_lvl+0xcc/0x114 [ 38.700246][ C6] dump_stack+0x18/0x5c [ 38.700597][ C6] local_cpu_stop+0x68/0x84 [ 38.700982][ C6] smp_send_reschedule+0x0/0x3c [ 38.701399][ C6] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.701913][ C6] __handle_domain_irq+0x7c/0xc8 [ 38.702339][ C6] gic_handle_irq+0x70/0x130 [ 38.702733][ C6] el1_irq+0xe0/0x1c0 [ 38.703074][ C6] _raw_spin_lock+0x3c/0x70 [ 38.703460][ C6] remap_pfn_range+0x174/0x270 [ 38.703867][ C6] system_heap_mmap+0xc0/0x108 [ 38.704272][ C6] dma_buf_mmap_internal+0x60/0x64 [ 38.704710][ C6] mmap_region+0x3e0/0x87c [ 38.705083][ C6] do_mmap+0x42c/0x510 [ 38.705433][ C6] vm_mmap_pgoff+0xac/0x114 [ 38.705816][ C6] ksys_mmap_pgoff+0x78/0xf0 [ 38.706211][ C6] __arm64_sys_mmap+0x34/0x40 [ 38.706605][ C6] el0_svc_common+0xac/0x1ac [ 38.707000][ C6] do_el0_svc+0x1c/0x28 [ 38.707351][ C6] el0_svc+0x10/0x1c [ 38.707680][ C6] el0_sync_handler+0x68/0xac [ 38.708074][ C6] el0_sync+0x160/0x180 [ 38.708426][ C1] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.10.160 #421 [ 38.709038][ C1] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.709550][ C1] Call trace: [ 38.709837][ C1] dump_backtrace+0x0/0x1c8 [ 38.710220][ C1] show_stack+0x18/0x24 [ 38.710582][ C1] dump_stack_lvl+0xcc/0x114 [ 38.710975][ C1] dump_stack+0x18/0x5c [ 38.711326][ C1] local_cpu_stop+0x68/0x84 [ 38.711710][ C1] smp_send_reschedule+0x0/0x3c [ 38.712126][ C1] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.712649][ C1] __handle_domain_irq+0x7c/0xc8 [ 38.713075][ C1] gic_handle_irq+0x70/0x130 [ 38.713469][ C1] el1_irq+0xe0/0x1c0 [ 38.713810][ C1] cpuidle_enter_state+0x17c/0x3a0 [ 38.714246][ C1] cpuidle_enter+0x38/0x50 [ 38.714630][ C1] cpuidle_idle_call+0x14c/0x220 [ 38.715056][ C1] do_idle+0xa8/0xf0 [ 38.715386][ C1] cpu_startup_entry+0x24/0x28 [ 38.715791][ C1] secondary_start_kernel+0x1a8/0x24c [ 38.716251][ C2] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.10.160 #421 [ 38.716863][ C2] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.717375][ C2] Call trace: [ 38.717662][ C2] dump_backtrace+0x0/0x1c8 [ 38.718045][ C2] show_stack+0x18/0x24 [ 38.718397][ C2] dump_stack_lvl+0xcc/0x114 [ 38.718790][ C2] dump_stack+0x18/0x5c [ 38.719151][ C2] local_cpu_stop+0x68/0x84 [ 38.719535][ C2] smp_send_reschedule+0x0/0x3c [ 38.719951][ C2] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.720474][ C2] __handle_domain_irq+0x7c/0xc8 [ 38.720900][ C2] gic_handle_irq+0x70/0x130 [ 38.721294][ C2] el1_irq+0xe0/0x1c0 [ 38.721634][ C2] cpuidle_enter_state+0x17c/0x3a0 [ 38.722071][ C2] cpuidle_enter+0x38/0x50 [ 38.722454][ C2] cpuidle_idle_call+0x14c/0x220 [ 38.722880][ C2] do_idle+0xa8/0xf0 [ 38.723209][ C2] cpu_startup_entry+0x24/0x28 [ 38.723614][ C2] secondary_start_kernel+0x1a8/0x24c [ 38.724074][ C3] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.10.160 #421 [ 38.724686][ C3] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.725198][ C3] Call trace: [ 38.725485][ C3] dump_backtrace+0x0/0x1c8 [ 38.725868][ C3] show_stack+0x18/0x24 [ 38.726230][ C3] dump_stack_lvl+0xcc/0x114 [ 38.726623][ C3] dump_stack+0x18/0x5c [ 38.726985][ C3] local_cpu_stop+0x68/0x84 [ 38.727368][ C3] smp_send_reschedule+0x0/0x3c [ 38.727784][ C3] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.728308][ C3] __handle_domain_irq+0x7c/0xc8 [ 38.728734][ C3] gic_handle_irq+0x70/0x130 [ 38.729128][ C3] el1_irq+0xe0/0x1c0 [ 38.729468][ C3] cpuidle_enter_state+0x17c/0x3a0 [ 38.729905][ C3] cpuidle_enter+0x38/0x50 [ 38.730288][ C3] cpuidle_idle_call+0x14c/0x220 [ 38.730714][ C3] do_idle+0xa8/0xf0 [ 38.731043][ C3] cpu_startup_entry+0x24/0x28 [ 38.731448][ C3] secondary_start_kernel+0x1a8/0x24c [ 38.731908][ C4] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 5.10.160 #421 [ 38.732519][ C4] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.733031][ C4] Call trace: [ 38.733313][ C4] dump_backtrace+0x0/0x1c8 [ 38.733703][ C4] show_stack+0x18/0x24 [ 38.734060][ C4] dump_stack_lvl+0xcc/0x114 [ 38.734450][ C4] dump_stack+0x18/0x5c [ 38.734808][ C4] local_cpu_stop+0x68/0x84 [ 38.735198][ C4] smp_send_reschedule+0x0/0x3c [ 38.735612][ C4] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.736136][ C4] __handle_domain_irq+0x7c/0xc8 [ 38.736560][ C4] gic_handle_irq+0x70/0x130 [ 38.736950][ C4] el1_irq+0xe0/0x1c0 [ 38.737286][ C4] cpuidle_enter_state+0x17c/0x3a0 [ 38.737721][ C4] cpuidle_enter+0x38/0x50 [ 38.738099][ C4] cpuidle_idle_call+0x14c/0x220 [ 38.738524][ C4] do_idle+0xa8/0xf0 [ 38.738859][ C4] cpu_startup_entry+0x24/0x28 [ 38.739261][ C4] secondary_start_kernel+0x1a8/0x24c [ 38.739721][ C5] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 5.10.160 #421 [ 38.740331][ C5] Hardware name: Embedfire LubanCat-5IO (DT) [ 38.740843][ C5] Call trace: [ 38.741124][ C5] dump_backtrace+0x0/0x1c8 [ 38.741514][ C5] show_stack+0x18/0x24 [ 38.741871][ C5] dump_stack_lvl+0xcc/0x114 [ 38.742262][ C5] dump_stack+0x18/0x5c [ 38.742619][ C5] local_cpu_stop+0x68/0x84 [ 38.742999][ C5] smp_send_reschedule+0x0/0x3c [ 38.743412][ C5] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 38.743935][ C5] __handle_domain_irq+0x7c/0xc8 [ 38.744358][ C5] gic_handle_irq+0x70/0x130 [ 38.744747][ C5] el1_irq+0xe0/0x1c0 [ 38.745082][ C5] cpuidle_enter_state+0x17c/0x3a0 [ 38.745517][ C5] cpuidle_enter+0x38/0x50 [ 38.745897][ C5] cpuidle_idle_call+0x14c/0x220 [ 38.746320][ C5] do_idle+0xa8/0xf0 [ 38.746656][ C5] cpu_startup_entry+0x24/0x28 [ 38.747067][ C5] secondary_start_kernel+0x1a8/0x24c [ 39.749199][ C7] rockchip-thermal fec00000.tsadc: channal 0: temperature(40 C) [ 39.749874][ C7] cpu cpu6: cur_freq: 1608000000 Hz, volt_vdd: 700000 uV, volt_mem: 700000 uV [ 39.750630][ C7] cpu cpu4: cur_freq: 1200000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV [ 39.751384][ C7] cpu cpu0: cur_freq: 1800000000 Hz, volt_vdd: 875000 uV, volt_mem: 875000 uV [ 39.752141][ C7] rockchip-dmc dmc: cur_freq: 1560000000 Hz, volt_vdd: 725000 uV, volt_mem: 700000 uV [ 39.752962][ C7] SMP: stopping secondary CPUs [ 39.752963][ C7] CRU REGS: [ 39.752963][ C7] LPLL 0x58040: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 39.752965][ C7] B0PLL 0x50000: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 39.752966][ C7] B1PLL 0x52020: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 39.752968][ C7] GPLL 0x001c0: 000000c6 00000042 00000000 00000000 00000000 00000000 00009400 00000000 [ 39.752969][ C7] CPLL 0x001a0: 000000fa 00000042 00000000 00000000 00000000 00000000 00009c00 00000000 [ 39.752970][ C7] V0PLL 0x00160: 000000c6 00002042 00000000 00000000 00000000 00000000 00004000 00000000 [ 39.752972][ C7] AUPLL 0x00180: 00000106 00000082 ffff24dd 00000000 00000000 00000000 0000a000 00000000 [ 39.752973][ C7] PPLL 0x08200: 00000226 00002083 00000000 00000000 00000000 00000000 00004000 00000000 [ 39.752974][ C7] DSUCRU_SEL 0x58300: 0000b0c0 00001083 00000843 00000063 00000665 0000403f 000020c1 0000e0c1 [ 39.752976][ C7] DSUCRU_GATE 0x58800: 00000000 00000000 00000063 00000000 00000000 00000000 00000000 00000000 [ 39.752977][ C7] BIG0CRU_SEL 0x50300: 00004240 00005fc2 00000005 00000000 00000000 00000000 00000000 00000000 [ 39.752978][ C7] BIG0CRU_GATE 0x50800: 00003400 00000001 00000000 00000000 00000000 00000000 00000000 00000000 [ 39.752980][ C7] BIG1CRU_SEL 0x52300: 00004240 00005fc2 00000005 00000000 00000000 00000000 00000000 00000000 [ 39.752981][ C7] BIG1CRU_GATE 0x52800: 00003400 00000001 00000000 00000000 00000000 00000000 00000000 00000000 [ 39.752983][ C7] CRU_SEL 0x00300: 00000bbd 00000169 00000925 000000a1 00000881 00000881 00000820 00000020 [ 39.752984][ C7] CRU_SEL 0x00320: 00000881 00000881 00000820 00000020 00000421 00000000 000030ff 00000000 [ 39.752985][ C7] CRU_SEL 0x00340: 00000421 00000000 000030ff 00000000 00000000 00000000 00000000 0000bb9d [ 39.752987][ C7] CRU_SEL 0x00360: 00000000 00000000 00000000 0000bb9d 000000bb 00000200 00000000 00000000 [ 39.752988][ C7] CRU_SEL 0x00380: 000000bb 00000200 00000000 00000000 00000000 00000000 00000000 00000000 [ 39.752990][ C7] CRU_SEL 0x003a0: 00000000 00000000 00000000 00000000 00000010 03355460 00000007 03355460 [ 39.752991][ C7] CRU_SEL 0x003c0: 00000010 03355460 00000007 03355460 0000001b 03355460 0000000f 03355460 [ 39.752992][ C7] CRU_SEL 0x003e0: 0000001b 03355460 0000000f 03355460 0000000f 03355460 00000006 03355460 [ 39.752994][ C7] CRU_SEL 0x00400: 0000000f 03355460 00000006 03355460 00000092 00000000 00000023 000002cb [ 39.752995][ C7] CRU_SEL 0x00420: 00000092 00000000 00000023 000002cb 000045cb 0000030b 001403de 00000006 [ 39.752996][ C7] CRU_SEL 0x00440: 000045cb 0000030b 001403de 00000006 001403de 00000006 001403de 00000006 [ 39.752998][ C7] CRU_SEL 0x00460: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00000006 [ 39.752999][ C7] CRU_SEL 0x00480: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00000006 [ 39.753001][ C7] CRU_SEL 0x004a0: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00008002 [ 39.753002][ C7] CRU_SEL 0x004c0: 001403de 00000006 001403de 00008002 0000020a 00000041 000003ff 0000003f [ 39.753003][ C7] CRU_SEL 0x004e0: 0000020a 00000041 000003ff 0000003f 00000000 0000003f 00000000 0000c021 [ 39.753005][ C7] CRU_SEL 0x00500: 00000000 0000003f 00000000 0000c021 00000000 00000000 00000000 00000000 [ 39.753006][ C7] CRU_SEL 0x00520: 00000000 00000000 00000000 00000000 00000000 00007c14 00001010 00000000 [ 39.753007][ C7] CRU_SEL 0x00540: 00000000 00007c14 00001010 00000000 00000000 00000590 00000385 00000000 [ 39.753009][ C7] CRU_SEL 0x00560: 00000000 00000590 00000385 00000000 00000288 0000070e 00009d9d 00008b9d [ 39.753010][ C7] CRU_SEL 0x00580: 00000288 0000070e 00009d9d 00008b9d 0000049d 00000000 00000000 00000000 [ 39.753012][ C7] CRU_SEL 0x005a0: 0000049d 00000000 00000000 00000000 00000000 00000300 00001801 00000001 [ 39.753013][ C7] CRU_SEL 0x005c0: 00000000 00000300 00001801 00000001 00000000 00000300 000000e0 00000000 [ 39.753015][ C7] CRU_GATE 0x00800: 00000900 00000140 00000050 00004000 00000008 00003e78 00000000 0000fff3 [ 39.753016][ C7] CRU_GATE 0x00820: 00000008 00003e78 00000000 0000fff3 0000c01f 000000ff 0000ffe0 00003fff [ 39.753017][ C7] CRU_GATE 0x00840: 0000c01f 000000ff 0000ffe0 00003fff 0000fff4 0000fffe 0000ffff 00002ff8 [ 39.753019][ C7] CRU_GATE 0x00860: 0000fff4 0000fffe 0000ffff 00002ff8 00003fff 000001c0 00003e00 00000000 [ 39.753020][ C7] CRU_GATE 0x00880: 00003fff 000001c0 00003e00 00000000 0000aa05 000000a0 00000263 0000aa05 [ 39.753022][ C7] CRU_GATE 0x008a0: 0000aa05 000000a0 00000263 0000aa05 000000a0 00000263 000001ff 00000005 [ 39.753023][ C7] CRU_GATE 0x008c0: 000000a0 00000263 000001ff 00000005 00000005 0000ffd7 0000016a 00000e00 [ 39.753024][ C7] CRU_GATE 0x008e0: 00000005 0000ffd7 0000016a 00000e00 0000ed19 0000ffff 00000dbf 000007e0 [ 39.753026][ C7] CRU_GATE 0x00900: 0000ed19 0000ffff 00000dbf 000007e0 00000000 00001ff7 0000e3f8 00000003 [ 39.753027][ C7] CRU_GATE 0x00920: 00000000 00001ff7 0000e3f8 00000003 000003ff 000001ff 00003000 00000000 [ 39.753028][ C7] PMUCRU_SEL 0x30300: 000000b7 00000400 00000020 00000080 001403de 00000006 03355460 00000007 [ 39.753030][ C7] PMUCRU_SEL 0x30320: 001403de 00000006 03355460 00000007 03355460 0000000b 00000000 00000000 [ 39.753031][ C7] PMUCRU_SEL 0x30340: 03355460 0000000b 00000000 00000000 00000000 00000000 00000000 00000000 [ 39.753033][ C7] PMUCRU_GATE 0x30800: 00000009 00005fc0 0000fff8 00000001 00000800 00000000 00000000 00000000 [ 39.753034][ C7] CPU0 online:0 [ 39.753035][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753035][ C7] [ 39.753036][ C7] CPU1 online:0 [ 39.753037][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753037][ C7] [ 39.753038][ C7] CPU2 online:0 [ 39.753039][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753039][ C7] [ 39.753040][ C7] CPU3 online:0 [ 39.753041][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753041][ C7] [ 39.753041][ C7] CPU4 online:0 [ 39.753042][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753043][ C7] [ 39.753043][ C7] CPU5 online:0 [ 39.753044][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753044][ C7] [ 39.753045][ C7] CPU6 online:0 [ 39.753046][ C7] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 39.753046][ C7] [ 39.753047][ C7] CPU7 online:1 [ 39.753048][ C7] EL2(NS) PC: <0xffffffc0086de410> rockchip_panic_notify+0x274/0x394 [ 39.753048][ C7] [ 39.753049][ C7] CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 [ 39.753050][ C7] 13: 7751 4759 12010 40210 6869 9433 4670 4697 GICv3 26 Level arch_timer [ 39.753052][ C7] 14: 1007 1341 3548 1383 328 531 198 228 GICv3 321 Level rk_timer [ 39.753053][ C7] 15: 0 0 0 0 0 0 0 0 GICv3 23 Level arm-pmu [ 39.753054][ C7] 16: 2 0 0 0 0 0 0 0 GICv3 105 Level dmc [ 39.753055][ C7] 17: 6158 0 0 0 0 0 0 0 GICv3 126 Level fb000000.gpu [ 39.753056][ C7] 18: 1 0 0 0 0 0 0 0 GICv3 125 Level fb000000.gpu [ 39.753057][ C7] 19: 8762 0 0 0 0 0 0 0 GICv3 124 Level fb000000.gpu [ 39.753059][ C7] 20: 0 0 0 0 0 0 0 0 GICv3 247 Level ehci_hcd:usb1 [ 39.753060][ C7] 21: 0 0 0 0 0 0 0 0 GICv3 248 Level ohci_hcd:usb2 [ 39.753061][ C7] 24: 0 0 0 0 0 0 0 0 GICv3 425 Level rockchip_usb2phy [ 39.753062][ C7] 25: 0 0 0 0 0 0 0 0 GICv3 423 Level rockchip_usb2phy [ 39.753064][ C7] 26: 6704 0 0 0 0 0 0 0 GICv3 349 Level fd880000.i2c [ 39.753065][ C7] 29: 0 0 0 0 0 0 0 0 GICv3 142 Level fdab9000.iommu, fdab0000.npu [ 39.753066][ C7] 30: 0 0 0 0 0 0 0 0 GICv3 143 Level fdab9000.iommu, fdab0000.npu [ 39.753067][ C7] 31: 0 0 0 0 0 0 0 0 GICv3 144 Level fdab9000.iommu, fdab0000.npu [ 39.753069][ C7] 32: 0 0 0 0 0 0 0 0 GICv3 152 Level fdb50000.vepu [ 39.753069][ C7] 33: 0 0 0 0 0 0 0 0 GICv3 151 Level fdb50400.vdpu [ 39.753071][ C7] 34: 0 0 0 0 0 0 0 0 GICv3 150 Level fd [ 39.753072][ C7] Lost 223 message(s)!
07-23
[ 57.579291][ C4] SError Interrupt on CPU4, code 0xbe000011 -- SError [ 57.579295][ C4] CPU: 4 PID: 1826 Comm: HwBinder:399_3 Not tainted 5.10.160 #424 [ 57.579298][ C4] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.579301][ C4] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 57.579304][ C4] pc : rkcif_write_register_and+0x114/0x214 [ 57.579306][ C4] lr : rkcif_write_register_and+0x1c4/0x214 [ 57.579308][ C4] sp : ffffffc0126d37c0 [ 57.579311][ C4] x29: ffffffc0126d37c0 x28: 0000000000000003 [ 57.579318][ C4] x27: 000000000000005b x26: ffffffc009843478 [ 57.579324][ C4] x25: ffffffc00c0bd000 x24: ffffffc00a49e000 [ 57.579329][ C4] x23: 0000000000000000 x22: 0000000000000000 [ 57.579334][ C4] x21: ffffff8103670080 x20: 000000000000005b [ 57.579339][ C4] x19: 00000000ff7f3f3f x18: ffffffc012615090 [ 57.579345][ C4] x17: 0000000000000000 x16: 00000000000000c0 [ 57.579350][ C4] x15: 0000000000000004 x14: 0000000000003fff [ 57.579354][ C4] x13: ffffffc00a04c6d8 x12: 0000000000000003 [ 57.579359][ C4] x11: 00000000ffffbfff x10: 00000000ffffffff [ 57.579364][ C4] x9 : 721356757b404800 x8 : ffffffc00c0bd178 [ 57.579369][ C4] x7 : 303a74657366666f x6 : ffffffc00a253dd8 [ 57.579374][ C4] x5 : ffffffffffffffff x4 : 0000000000000000 [ 57.579379][ C4] x3 : ffffffc009ce5279 x2 : 0000000000000000 [ 57.579384][ C4] x1 : 0000000000000001 x0 : 0000000000000065 [ 57.579391][ C4] Kernel panic - not syncing: Asynchronous SError Interrupt [ 57.579394][ C4] CPU: 4 PID: 1826 Comm: HwBinder:399_3 Not tainted 5.10.160 #424 [ 57.579397][ C4] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.579399][ C4] Call trace: [ 57.579401][ C4] dump_backtrace+0x0/0x1c8 [ 57.579403][ C4] show_stack+0x18/0x24 [ 57.579406][ C4] dump_stack_lvl+0xcc/0x114 [ 57.579408][ C4] dump_stack+0x18/0x5c [ 57.579410][ C4] panic+0x154/0x39c [ 57.579412][ C4] test_taint+0x0/0x28 [ 57.579414][ C4] arm64_serror_panic+0x74/0x80 [ 57.579416][ C4] do_serror+0xd0/0xf0 [ 57.579418][ C4] el1_error+0x90/0x114 [ 57.579421][ C4] rkcif_write_register_and+0x114/0x214 [ 57.579423][ C4] rkcif_csi_channel_set_v1+0x84/0xc80 [ 57.579426][ C4] rkcif_csi_stream_start+0x9ac/0xd98 [ 57.579428][ C4] rkcif_do_start_stream+0xa98/0x1120 [ 57.579431][ C4] rkcif_start_streaming+0x18/0x24 [ 57.579433][ C4] vb2_start_streaming+0x60/0x134 [ 57.579436][ C4] vb2_core_streamon+0x10c/0x150 [ 57.579438][ C4] vb2_ioctl_streamon+0x5c/0x8c [ 57.579440][ C4] v4l_streamon+0x24/0x30 [ 57.579442][ C4] __video_do_ioctl+0x2d0/0x3e8 [ 57.579445][ C4] video_usercopy+0x3d4/0x80c [ 57.579447][ C4] video_ioctl2+0x18/0x24 [ 57.579449][ C4] v4l2_ioctl+0x4c/0x5c [ 57.579451][ C4] __arm64_sys_ioctl+0x90/0xc8 [ 57.579454][ C4] el0_svc_common+0xac/0x1ac [ 57.579456][ C4] do_el0_svc+0x1c/0x28 [ 57.579458][ C4] el0_svc+0x10/0x1c [ 57.579460][ C4] el0_sync_handler+0x68/0xac [ 57.579462][ C4] el0_sync+0x160/0x180 [ 57.579479][ C0] CPU0: stopping [ 57.579485][ C2] CPU2: stopping [ 57.579491][ C3] CPU3: stopping [ 57.579498][ C1] CPU1: stopping [ 57.579503][ C5] CPU5: stopping [ 57.579522][ C2] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 5.10.160 #424 [ 57.579526][ C6] CPU6: stopping [ 57.579530][ C7] CPU7: stopping [ 57.688015][ C2] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.688536][ C2] Call trace: [ 57.688829][ C2] dump_backtrace+0x0/0x1c8 [ 57.689231][ C2] show_stack+0x18/0x24 [ 57.689598][ C2] dump_stack_lvl+0xcc/0x114 [ 57.689997][ C2] dump_stack+0x18/0x5c [ 57.690366][ C2] local_cpu_stop+0x68/0x84 [ 57.690766][ C2] smp_send_reschedule+0x0/0x3c [ 57.691193][ C2] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.691728][ C2] __handle_domain_irq+0x7c/0xc8 [ 57.692165][ C2] gic_handle_irq+0x70/0x130 [ 57.692565][ C2] el1_irq+0xe0/0x1c0 [ 57.692922][ C2] cpuidle_enter_state+0x17c/0x3a0 [ 57.693367][ C2] cpuidle_enter+0x38/0x50 [ 57.693758][ C2] cpuidle_idle_call+0x14c/0x220 [ 57.694192][ C2] do_idle+0xa8/0xf0 [ 57.694536][ C2] cpu_startup_entry+0x24/0x28 [ 57.694959][ C2] secondary_start_kernel+0x1a8/0x24c [ 57.695431][ C3] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 5.10.160 #424 [ 57.696063][ C3] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.696584][ C3] Call trace: [ 57.696876][ C3] dump_backtrace+0x0/0x1c8 [ 57.697277][ C3] show_stack+0x18/0x24 [ 57.697643][ C3] dump_stack_lvl+0xcc/0x114 [ 57.698043][ C3] dump_stack+0x18/0x5c [ 57.698411][ C3] local_cpu_stop+0x68/0x84 [ 57.698811][ C3] smp_send_reschedule+0x0/0x3c [ 57.699238][ C3] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.699775][ C3] __handle_domain_irq+0x7c/0xc8 [ 57.700211][ C3] gic_handle_irq+0x70/0x130 [ 57.700610][ C3] el1_irq+0xe0/0x1c0 [ 57.700967][ C3] cpuidle_enter_state+0x17c/0x3a0 [ 57.701412][ C3] cpuidle_enter+0x38/0x50 [ 57.701804][ C3] cpuidle_idle_call+0x14c/0x220 [ 57.702238][ C3] do_idle+0xa8/0xf0 [ 57.702583][ C3] cpu_startup_entry+0x24/0x28 [ 57.703006][ C3] secondary_start_kernel+0x1a8/0x24c [ 57.703472][ C7] CPU: 7 PID: 0 Comm: swapper/7 Not tainted 5.10.160 #424 [ 57.704085][ C7] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.704595][ C7] Call trace: [ 57.704881][ C7] dump_backtrace+0x0/0x1c8 [ 57.705268][ C7] show_stack+0x18/0x24 [ 57.705621][ C7] dump_stack_lvl+0xcc/0x114 [ 57.706017][ C7] dump_stack+0x18/0x5c [ 57.706370][ C7] local_cpu_stop+0x68/0x84 [ 57.706756][ C7] smp_send_reschedule+0x0/0x3c [ 57.707176][ C7] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.707698][ C7] __handle_domain_irq+0x7c/0xc8 [ 57.708118][ C7] gic_handle_irq+0x70/0x130 [ 57.708514][ C7] el1_irq+0xe0/0x1c0 [ 57.708856][ C7] cpuidle_enter_state+0x17c/0x3a0 [ 57.709298][ C7] cpuidle_enter+0x38/0x50 [ 57.709674][ C7] cpuidle_idle_call+0x14c/0x220 [ 57.710094][ C7] do_idle+0xa8/0xf0 [ 57.710424][ C7] cpu_startup_entry+0x24/0x28 [ 57.710833][ C7] secondary_start_kernel+0x1a8/0x24c [ 57.711300][ C6] CPU: 6 PID: 0 Comm: swapper/6 Not tainted 5.10.160 #424 [ 57.711912][ C6] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.712421][ C6] Call trace: [ 57.712707][ C6] dump_backtrace+0x0/0x1c8 [ 57.713094][ C6] show_stack+0x18/0x24 [ 57.713447][ C6] dump_stack_lvl+0xcc/0x114 [ 57.713844][ C6] dump_stack+0x18/0x5c [ 57.714196][ C6] local_cpu_stop+0x68/0x84 [ 57.714583][ C6] smp_send_reschedule+0x0/0x3c [ 57.715003][ C6] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.715524][ C6] __handle_domain_irq+0x7c/0xc8 [ 57.715945][ C6] gic_handle_irq+0x70/0x130 [ 57.716341][ C6] el1_irq+0xe0/0x1c0 [ 57.716683][ C6] cpuidle_enter_state+0x17c/0x3a0 [ 57.717125][ C6] cpuidle_enter+0x38/0x50 [ 57.717500][ C6] cpuidle_idle_call+0x14c/0x220 [ 57.717921][ C6] do_idle+0xa8/0xf0 [ 57.718251][ C6] cpu_startup_entry+0x24/0x28 [ 57.718660][ C6] secondary_start_kernel+0x1a8/0x24c [ 57.719133][ C0] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.160 #424 [ 57.719759][ C0] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.720281][ C0] Call trace: [ 57.720572][ C0] dump_backtrace+0x0/0x1c8 [ 57.720974][ C0] show_stack+0x18/0x24 [ 57.721340][ C0] dump_stack_lvl+0xcc/0x114 [ 57.721740][ C0] dump_stack+0x18/0x5c [ 57.722108][ C0] local_cpu_stop+0x68/0x84 [ 57.722509][ C0] smp_send_reschedule+0x0/0x3c [ 57.722935][ C0] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.723471][ C0] __handle_domain_irq+0x7c/0xc8 [ 57.723905][ C0] gic_handle_irq+0x70/0x130 [ 57.724305][ C0] el1_irq+0xe0/0x1c0 [ 57.724661][ C0] cpuidle_enter_state+0x17c/0x3a0 [ 57.725106][ C0] cpuidle_enter+0x38/0x50 [ 57.725496][ C0] cpuidle_idle_call+0x14c/0x220 [ 57.725931][ C0] do_idle+0xa8/0xf0 [ 57.726275][ C0] cpu_startup_entry+0x24/0x28 [ 57.726698][ C0] rest_init+0xd4/0xe4 [ 57.727056][ C0] arch_call_rest_init+0x10/0x1c [ 57.727490][ C0] start_kernel+0x3a8/0x43c [ 57.727894][ C5] CPU: 5 PID: 1819 Comm: RenderThread Not tainted 5.10.160 #424 [ 57.728561][ C5] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.729079][ C5] Call trace: [ 57.729374][ C5] dump_backtrace+0x0/0x1c8 [ 57.729771][ C5] show_stack+0x18/0x24 [ 57.730130][ C5] dump_stack_lvl+0xcc/0x114 [ 57.730533][ C5] dump_stack+0x18/0x5c [ 57.730893][ C5] local_cpu_stop+0x68/0x84 [ 57.731288][ C5] smp_send_reschedule+0x0/0x3c [ 57.731718][ C5] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.732250][ C5] __handle_domain_irq+0x7c/0xc8 [ 57.732679][ C5] gic_handle_irq+0x70/0x130 [ 57.733082][ C5] el1_irq+0xe0/0x1c0 [ 57.733430][ C5] str2hashbuf_signed+0x98/0xcc [ 57.733856][ C5] ext4fs_dirhash+0xe4/0x120 [ 57.734261][ C5] htree_dirblock_to_tree+0x20c/0x358 [ 57.734723][ C5] ext4_htree_fill_tree+0x150/0x460 [ 57.735177][ C5] ext4_dx_readdir+0x354/0x590 [ 57.735594][ C5] ext4_readdir+0x57c/0x678 [ 57.735989][ C5] iterate_dir+0xc8/0x1a0 [ 57.736371][ C5] ovl_iterate+0x288/0x4e4 [ 57.736753][ C5] iterate_dir+0xc8/0x1a0 [ 57.737135][ C5] __do_sys_getdents64+0x60/0x224 [ 57.737575][ C5] __arm64_sys_getdents64+0x20/0x2c [ 57.738028][ C5] el0_svc_common+0xac/0x1ac [ 57.738433][ C5] do_el0_svc+0x1c/0x28 [ 57.738791][ C5] el0_svc+0x10/0x1c [ 57.739126][ C5] el0_sync_handler+0x68/0xac [ 57.739529][ C5] el0_sync+0x160/0x180 [ 57.739893][ C1] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 5.10.160 #424 [ 57.740523][ C1] Hardware name: Embedfire LubanCat-5IO (DT) [ 57.741046][ C1] Call trace: [ 57.741337][ C1] dump_backtrace+0x0/0x1c8 [ 57.741739][ C1] show_stack+0x18/0x24 [ 57.742105][ C1] dump_stack_lvl+0xcc/0x114 [ 57.742506][ C1] dump_stack+0x18/0x5c [ 57.742872][ C1] local_cpu_stop+0x68/0x84 [ 57.743273][ C1] smp_send_reschedule+0x0/0x3c [ 57.743699][ C1] handle_percpu_devid_fasteoi_ipi+0x78/0x194 [ 57.744235][ C1] __handle_domain_irq+0x7c/0xc8 [ 57.744669][ C1] gic_handle_irq+0x70/0x130 [ 57.745068][ C1] el1_irq+0xe0/0x1c0 [ 57.745423][ C1] cpuidle_enter_state+0x17c/0x3a0 [ 57.745869][ C1] cpuidle_enter+0x38/0x50 [ 57.746259][ C1] cpuidle_idle_call+0x14c/0x220 [ 57.746694][ C1] do_idle+0xa8/0xf0 [ 57.747037][ C1] cpu_startup_entry+0x24/0x28 [ 57.747461][ C1] secondary_start_kernel+0x1a8/0x24c [ 58.751614][ C4] rockchip-thermal fec00000.tsadc: channal 0: temperature(40 C) [ 58.752320][ C4] cpu cpu6: cur_freq: 1608000000 Hz, volt_vdd: 700000 uV, volt_mem: 700000 uV [ 58.753086][ C4] cpu cpu4: cur_freq: 408000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV [ 58.753850][ C4] cpu cpu0: cur_freq: 600000000 Hz, volt_vdd: 675000 uV, volt_mem: 675000 uV [ 58.754617][ C4] rockchip-dmc dmc: cur_freq: 1560000000 Hz, volt_vdd: 725000 uV, volt_mem: 700000 uV [ 58.755438][ C4] SMP: stopping secondary CPUs [ 58.755440][ C4] CRU REGS: [ 58.755443][ C4] LPLL 0x58040: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 58.755448][ C4] B0PLL 0x50000: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 58.755454][ C4] B1PLL 0x52020: 00000110 00002082 00000000 00000000 00000002 000007e0 00004000 00000000 [ 58.755459][ C4] GPLL 0x001c0: 000000c6 00000042 00000000 00000000 00000000 00000000 00009400 00000000 [ 58.755465][ C4] CPLL 0x001a0: 000000fa 00000042 00000000 00000000 00000000 00000000 00009c00 00000000 [ 58.755470][ C4] V0PLL 0x00160: 000000c6 00002042 00000000 00000000 00000000 00000000 00004000 00000000 [ 58.755475][ C4] AUPLL 0x00180: 00000106 00000082 ffff24dd 00000000 00000000 00000000 0000a000 00000000 [ 58.755480][ C4] PPLL 0x08200: 00000226 00002083 00000000 00000000 00000000 00000000 00004000 00000000 [ 58.755485][ C4] DSUCRU_SEL 0x58300: 0000b0c0 00001082 00000843 00000063 00000665 0000403f 00000081 0000c081 [ 58.755490][ C4] DSUCRU_GATE 0x58800: 00000000 00000000 00000063 00000000 00000000 00000000 00000000 00000000 [ 58.755495][ C4] BIG0CRU_SEL 0x50300: 00000240 00005f82 00000005 00000000 00000000 00000000 00000000 00000000 [ 58.755500][ C4] BIG0CRU_GATE 0x50800: 00003400 00000001 00000000 00000000 00000000 00000000 00000000 00000000 [ 58.755505][ C4] BIG1CRU_SEL 0x52300: 00004240 00005fc2 00000005 00000000 00000000 00000000 00000000 00000000 [ 58.755509][ C4] BIG1CRU_GATE 0x52800: 00003400 00000001 00000000 00000000 00000000 00000000 00000000 00000000 [ 58.755514][ C4] CRU_SEL 0x00300: 00000bbd 00000169 00000925 000000a1 00000881 00000881 00000820 00000020 [ 58.755519][ C4] CRU_SEL 0x00320: 00000881 00000881 00000820 00000020 00000421 00000000 000030ff 00000000 [ 58.755524][ C4] CRU_SEL 0x00340: 00000421 00000000 000030ff 00000000 00000000 00000000 00000000 0000bb9d [ 58.755529][ C4] CRU_SEL 0x00360: 00000000 00000000 00000000 0000bb9d 000000bb 00000200 00000000 00000000 [ 58.755534][ C4] CRU_SEL 0x00380: 000000bb 00000200 00000000 00000000 00000000 00000000 00000000 00000000 [ 58.755539][ C4] CRU_SEL 0x003a0: 00000000 00000000 00000000 00000000 00000010 03355460 00000007 03355460 [ 58.755544][ C4] CRU_SEL 0x003c0: 00000010 03355460 00000007 03355460 0000001b 03355460 0000000f 03355460 [ 58.755549][ C4] CRU_SEL 0x003e0: 0000001b 03355460 0000000f 03355460 0000000f 03355460 00000006 03355460 [ 58.755553][ C4] CRU_SEL 0x00400: 0000000f 03355460 00000006 03355460 00000092 00000000 00000023 000002cb [ 58.755558][ C4] CRU_SEL 0x00420: 00000092 00000000 00000023 000002cb 000045cb 0000030b 001403de 00000006 [ 58.755563][ C4] CRU_SEL 0x00440: 000045cb 0000030b 001403de 00000006 001403de 00000006 001403de 00000006 [ 58.755568][ C4] CRU_SEL 0x00460: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00000006 [ 58.755572][ C4] CRU_SEL 0x00480: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00000006 [ 58.755577][ C4] CRU_SEL 0x004a0: 001403de 00000006 001403de 00000006 001403de 00000006 001403de 00008002 [ 58.755583][ C4] CRU_SEL 0x004c0: 001403de 00000006 001403de 00008002 0000020a 00000041 000003ff 0000003f [ 58.755587][ C4] CRU_SEL 0x004e0: 0000020a 00000041 000003ff 0000003f 00000000 0000003f 00000000 0000c021 [ 58.755592][ C4] CRU_SEL 0x00500: 00000000 0000003f 00000000 0000c021 00000000 00000000 00000000 00000000 [ 58.755597][ C4] CRU_SEL 0x00520: 00000000 00000000 00000000 00000000 00000000 00007c14 00001010 00000000 [ 58.755602][ C4] CRU_SEL 0x00540: 00000000 00007c14 00001010 00000000 00000000 00000590 00000385 00000000 [ 58.755607][ C4] CRU_SEL 0x00560: 00000000 00000590 00000385 00000000 00000288 0000070e 00009d9d 00008b9d [ 58.755613][ C4] CRU_SEL 0x00580: 00000288 0000070e 00009d9d 00008b9d 0000049d 00000000 00000000 00000000 [ 58.755618][ C4] CRU_SEL 0x005a0: 0000049d 00000000 00000000 00000000 00000000 00000300 00001801 00000001 [ 58.755623][ C4] CRU_SEL 0x005c0: 00000000 00000300 00001801 00000001 00000000 00000300 000000e0 00000000 [ 58.755628][ C4] CRU_GATE 0x00800: 00000900 00000140 00000050 00004000 00000008 00003e78 00000000 0000fff3 [ 58.755634][ C4] CRU_GATE 0x00820: 00000008 00003e78 00000000 0000fff3 0000c01f 000000ff 0000ffe0 00003fff [ 58.755639][ C4] CRU_GATE 0x00840: 0000c01f 000000ff 0000ffe0 00003fff 0000fff4 0000fffe 0000ffff 00002ff8 [ 58.755644][ C4] CRU_GATE 0x00860: 0000fff4 0000fffe 0000ffff 00002ff8 00003fff 000001c0 00003e00 00000000 [ 58.755649][ C4] CRU_GATE 0x00880: 00003fff 000001c0 00003e00 00000000 0000aa05 000000a0 00000263 0000aa05 [ 58.755654][ C4] CRU_GATE 0x008a0: 0000aa05 000000a0 00000263 0000aa05 000000a0 00000263 000001ff 00000005 [ 58.755659][ C4] CRU_GATE 0x008c0: 000000a0 00000263 000001ff 00000005 00000005 0000ffd7 0000016a 00000e00 [ 58.755664][ C4] CRU_GATE 0x008e0: 00000005 0000ffd7 0000016a 00000e00 0000ed19 0000ffff 00000dbf 000007e0 [ 58.755669][ C4] CRU_GATE 0x00900: 0000ed19 0000ffff 00000dbf 000007e0 00000000 00001ff7 0000e3f8 00000003 [ 58.755674][ C4] CRU_GATE 0x00920: 00000000 00001ff7 0000e3f8 00000003 000003ff 000001ff 00003000 00000000 [ 58.755679][ C4] PMUCRU_SEL 0x30300: 000000b7 00000400 00000020 00000080 001403de 00000006 03355460 00000007 [ 58.755684][ C4] PMUCRU_SEL 0x30320: 001403de 00000006 03355460 00000007 03355460 0000000b 00000000 00000000 [ 58.755688][ C4] PMUCRU_SEL 0x30340: 03355460 0000000b 00000000 00000000 00000000 00000000 00000000 00000000 [ 58.755693][ C4] PMUCRU_GATE 0x30800: 00000009 00005fc0 0000fffe 00000001 00000800 00000000 00000000 00000000 [ 58.755698][ C4] CPU0 online:0 [ 58.755701][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755703][ C4] [ 58.755705][ C4] CPU1 online:0 [ 58.755708][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755710][ C4] [ 58.755712][ C4] CPU2 online:0 [ 58.755714][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755717][ C4] EL2(NS) PC: <0xffffffc00801b8dc> local_cpu_stop+0x48/0x84 [ 58.755721][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755722][ C4] [ 58.755724][ C4] CPU3 online:0 [ 58.755727][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755728][ C4] [ 58.755730][ C4] CPU4 online:1 [ 58.755733][ C4] EL2(NS) PC: <0xffffffc0086de410> rockchip_panic_notify+0x274/0x394 [ 58.755735][ C4] [ 58.755737][ C4] CPU5 online:0 [ 58.755740][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755741][ C4] [ 58.755743][ C4] CPU6 online:0 [ 58.755746][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755748][ C4] [ 58.755749][ C4] CPU7 online:0 [ 58.755752][ C4] EL2(NS) PC: <0xffffffc00801b8d8> local_cpu_stop+0x44/0x84 [ 58.755754][ C4] [ 58.755758][ C4] CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 [ 58.755763][ C4] 13: 10041 7039 12710 66645 7863 10082 4413 4606 GICv3 26 Level arch_timer [ 58.755767][ C4] 14: 2030 2656 3063 1427 433 971 286 331 GICv3 321 Level rk_timer [ 58.755771][ C4] 15: 0 0 0 0 0 0 0 0 GICv3 23 Level arm-pmu [ 58.755776][ C4] 16: 4 0 0 0 0 0 0 0 GICv3 105 Level dmc [ 58.755780][ C4] 17: 5939 0 0 0 0 0 0 0 GICv3 126 Level fb000000.gpu [ 58.755785][ C4] 18: 1 0 0 0 0 0 0 0 GICv3 125 Level fb000000.gpu [ 58.755789][ C4] 19: 9058 0 0 0 0 0 0 0 GICv3 124 Level fb000000.gpu [ 58.755794][ C4] 20: 0 0 0 0 0 0 0 0 GICv3 247 Level ehci_hcd:usb1 [ 58.755798][ C4] 21: 0 0 0 0 0 0 0 0 GICv3 248 Level ohci_hcd:usb2 [ 58.755803][ C4] 24: 0 0 0 0 0 0 0 0 GICv3 425 Level rockchip_usb2phy [ 58.755808][ C4] 25: 0 0 0 0 0 0 0 0 GICv3 423 Level rockchip_usb2phy [ 58.755812][ C4] 26: 8209 0 0 0 0 0 0 0 GICv3 349 Level fd880000.i2c [ 58.755817][ C4] 29: 0 0 0 0 0 0 0 0 GICv3 142 Level fdab9000.iommu, fdab0000.npu [ 58.755822][ C4] 30: 0 0 0 0 0 0 0 0 GICv3 143 Level fdab9000.iommu, fdab0000.npu [ 58.755827][ C4] 31: 0 0 0 0 0 0 0 0 GICv3 144 Level fdab9000.iommu, fdab0000.npu [ 58.755831][ C4] 32: 0 0 0 0 0 0 0 0 GICv3 152 Level fdb50000.vepu [ 58.755836][ C4] 33: 0 0 0 0 0 0 0 0 GICv3 151 Level fdb50400.vd [ 58.755840][ C4] Lost 224 message(s)!
最新发布
07-23
using System.Net.Sockets; using System.Net; using System.Text; using System; using System.Diagnostics; namespace 上位机 { public partial class statetext1 : Form { public statetext1() { InitializeComponent(); // 正确地初始化 Timer runtimeTimer.Interval = 1000; runtimeTimer.Tick += (s, e) => yunx(); } void ipaddr(string data) { if (this.iptext.InvokeRequired) { this.iptext.Invoke(new Action<string>(ipaddr), data); } else { this.iptext.Text = data; } } void SL(string data) { if (this.SY_TEXT.InvokeRequired) { this.SY_TEXT.Invoke(new Action<string>(SL), data); } else { this.SY_TEXT.Text = data; } } void AX(string data) { if (this.AX_TEXT.InvokeRequired) { this.AX_TEXT.Invoke(new Action<string>(AX), data); } else { this.AX_TEXT.Text = data; } } void AY(string data) { if (this.AY_TEXT.InvokeRequired) { this.AY_TEXT.Invoke(new Action<string>(AY), data); } else { this.AY_TEXT.Text = data; } } void AZ(string data) { if (this.AZ_TEXT.InvokeRequired) { this.AZ_TEXT.Invoke(new Action<string>(AZ), data); } else { this.AZ_TEXT.Text = data; } } void GX(string data) { if (this.GX_TEXT.InvokeRequired) { this.GX_TEXT.Invoke(new Action<string>(GX), data); } else { this.GX_TEXT.Text = data; } } void GY(string data) { if (this.GY_TEXT.InvokeRequired) { this.GY_TEXT.Invoke(new Action<string>(GY), data); } else { this.GY_TEXT.Text = data; } } void GZ(string data) { if (this.GZ_TEXT.InvokeRequired) { this.GZ_TEXT.Invoke(new Action<string>(GZ), data); } else { this.GZ_TEXT.Text = data; } } void TEMP(string data) { if (this.TEMP_TEXT.InvokeRequired) { this.TEMP_TEXT.Invoke(new Action<string>(TEMP), data); } else { this.TEMP_TEXT.Text = data; } } void HUM(string data) { if (this.HUM_TEXT.InvokeRequired) { this.HUM_TEXT.Invoke(new Action<string>(HUM), data); } else { this.HUM_TEXT.Text = data; } } void LIGHT(string data) { if (this.LIGHT_TEXT.InvokeRequired) { this.LIGHT_TEXT.Invoke(new Action<string>(LIGHT), data); } else { this.LIGHT_TEXT.Text = data; } } void MQA(string data) { if (this.MQA_TEXT.InvokeRequired) { this.MQA_TEXT.Invoke(new Action<string>(MQA), data); } else { this.MQA_TEXT.Text = data; } } void MQB(string data) { if (this.MQB_TEXT.InvokeRequired) { this.MQB_TEXT.Invoke(new Action<string>(MQB), data); } else { this.MQB_TEXT.Text = data; } } void FLASH(string data) { if (this.FLASH_TEXT.InvokeRequired) { this.FLASH_TEXT.Invoke(new Action<string>(FLASH), data); } else { this.FLASH_TEXT.Text = data; } } void TIME(string data) { if (this.tim_text.InvokeRequired) { this.tim_text.Invoke(new Action<string>(TIME), data); } else { this.tim_text.Text = data; } } void Msg(string msg) { if (this.Msg_Text.InvokeRequired) { this.Msg_Text.Invoke(new Action<string>(Msg), msg); } else { this.Msg_Text.Text = this.Msg_Text.Text + DateTime.Now.ToString() + " --->" + msg + "\r\n"; this.Msg_Text.SelectionStart = this.Msg_Text.TextLength - 1; this.Msg_Text.ScrollToCaret(); } } int GetIntValue(string data, string startKey, string endKey) { int start = data.IndexOf(startKey); int end = data.IndexOf(endKey); if (start == -1 || end == -1 || end <= start) return 0; start += startKey.Length; string numStr = data.Substring(start, end - start); if (int.TryParse(numStr, out int result)) { return result; } return 0; } private System.Windows.Forms.Timer runtimeTimer = new System.Windows.Forms.Timer(); Stopwatch sw = Stopwatch.StartNew(); void date_dispose(string recvDate) { if (recvDate.StartsWith("ZETA")) { try { // 用正则表达式提取字段 int ax = GetIntValue(recvDate, "X", "AY"); int ay = GetIntValue(recvDate, "AY", "AZ"); int az = GetIntValue(recvDate, "AZ", "GX"); int gx = GetIntValue(recvDate, "GX", "GY"); int gy = GetIntValue(recvDate, "GY", "GZ"); int gz = GetIntValue(recvDate, "GZ", "MQA"); int mqa = GetIntValue(recvDate, "MQA", "MQB"); int mqb = GetIntValue(recvDate, "MQB", "TEMP"); int temp = GetIntValue(recvDate, "TEMP", "HUM"); int hum = GetIntValue(recvDate, "HUM", "LIGHT"); int light = GetIntValue(recvDate, "LIGHT", "FLASH"); string flashStr = recvDate.Substring(recvDate.IndexOf("FLASH") + 5); List<byte> flashData = new List<byte>(); if (flashStr.Length > 25) { flashStr = flashStr.Substring(0, 25); } for (int i = 0; i + 2 <= flashStr.Length && flashData.Count < 8; i += 2) { string byteStr = flashStr.Substring(i, 2); byte val = Convert.ToByte(byteStr, 16); flashData.Add(val); } this.AX(ax.ToString()); this.AX(ax.ToString()); this.AY(ay.ToString()); this.AZ(az.ToString()); this.GX(gx.ToString()); this.GY(gy.ToString()); this.GZ(gz.ToString()); this.TEMP(temp.ToString()); this.HUM(hum.ToString()); this.LIGHT(light.ToString()); this.MQA(mqa.ToString()); this.MQB(mqb.ToString()); this.FLASH(flashStr); } catch (Exception ex) { // 捕获解析异常 Console.WriteLine("数据解析异常:" + ex.Message); } } } // 获取本地IP地址的方法 private string GetLocalIPAddress() { var host = Dns.GetHostEntry(Dns.GetHostName()); foreach (var ip in host.AddressList) { // 过滤出IPv4地址 if (ip.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork) { return ip.ToString(); } } return string.Empty; // 没有找到IPv4地址时返回空字符串 } //创建SOCKET private TcpListener server; private CancellationTokenSource serverTokenSource; // 修改 StartServer 方法以支持多客户端连接 string dqip; string dqdk; string sendCMD; UdpClient udpServer; CancellationTokenSource udpTokenSource; private bool isConnected = false; private void StartUdpServer() { int portNumber = int.Parse(port.Text); udpServer = new UdpClient(portNumber); udpTokenSource = new CancellationTokenSource(); Msg("UDP 服务已启动,等待数据中..."); string localIP = GetLocalIPAddress(); if (!string.IsNullOrEmpty(localIP)) { this.ipaddr(localIP); } long totalBytesReceived = 0; object bytesLock = new object(); // 统计速率的定时任务 Task.Run(async () => { while (!udpTokenSource.Token.IsCancellationRequested) { long bytesPerSecond = 0; lock (bytesLock) { bytesPerSecond = totalBytesReceived; totalBytesReceived = 0; } string speedText; if (bytesPerSecond < 1024) speedText = $"{bytesPerSecond} B/s"; else speedText = $"{(bytesPerSecond / 1024.0):F2} KB/s"; this.SL(speedText); await Task.Delay(1000); } }, udpTokenSource.Token); // 接收数据任务 Task.Run(async () => { try { while (!udpTokenSource.Token.IsCancellationRequested) { UdpReceiveResult result = await udpServer.ReceiveAsync(); string requestData = Encoding.ASCII.GetString(result.Buffer); // 累计接收字节数 lock (bytesLock) { totalBytesReceived += result.Buffer.Length; } if (!string.IsNullOrEmpty(requestData.Trim())) { Msg($"收到来自 {result.RemoteEndPoint} 的数据: {requestData}"); date_dispose(requestData); if (!string.IsNullOrEmpty(sendCMD)) { byte[] responseBuffer = Encoding.ASCII.GetBytes(sendCMD); await udpServer.SendAsync(responseBuffer, responseBuffer.Length, result.RemoteEndPoint); sendCMD = string.Empty; } } } } catch (ObjectDisposedException) { Msg("UDP 服务已关闭。"); } catch (Exception ex) { Msg("UDP 接收时异常:" + ex.Message); } }, udpTokenSource.Token); } void yunx() { TimeSpan ts = sw.Elapsed; string timeStr = ts.ToString(@"hh\:mm\:ss"); // 格式:00:01:23 this.TIME(timeStr); } private void Disconnect() { isConnected = false; udpTokenSource?.Cancel(); udpTokenSource?.Dispose(); udpServer?.Close(); // 注意 UDP 使用 Close() udpServer?.Dispose(); } private void button1_Click(object sender, EventArgs e) { if (isConnected) { connect.Text = "开启"; Disconnect(); sw.Stop(); // 停止计时 runtimeTimer.Stop(); // 停止定时器 isConnected = false; } else { connect.Text = "关闭"; sendCMD = string.Empty; sw.Reset(); // 清零(可选) sw.Start(); // 开始计时 runtimeTimer.Start(); // 开始定时器 StartUdpServer(); isConnected = true; } } private void label13_Click(object sender, EventArgs e) { } private void label21_Click(object sender, EventArgs e) { } private void label22_Click(object sender, EventArgs e) { } private void MQB_TEXT_Click(object sender, EventArgs e) { } private void tim_text_Click(object sender, EventArgs e) { } } }
05-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值