python wao-trig.py[ 44.685167] BUG: unable to handle page fault for address: 0000000000008d18
[ 44.685172] #PF: supervisor read access in kernel mode
[ 44.685174] #PF: error_code(0x0000) - not-present page
[ 44.685176] PGD 0 P4D 0
[ 44.685180] Oops: 0000 [#1] SMP PTI
[ 44.685184] CPU: 1 PID: 2102 Comm: python2.7 Tainted: G C 5.4.2-050402-generic #201912042231
[ 44.685186] Hardware name: Supermicro X11SSQ/X11SSQ, BIOS 2.3 09/17/2018
[ 44.685196] RIP: 0010:ni_find_route_source+0x38/0x50 [ni_routing]
[ 44.685199] Code: e5 81 fe d1 00 00 00 77 2e 69 f6 d2 00 00 00 48 8b 4a 08 83 cf 80 31 c0 eb 0a 83 c0 01 3d d2 00 00 00 74 13 8d 14 06 48 63 d2 <40> 38 3c 11 75 ea 05 00 80 00 00 5d c3 b8 ea ff ff ff 5d c3 0f 1f
[ 44.685201] RSP: 0018:ffffac508146bd40 EFLAGS: 00010246
[ 44.685204] RAX: 0000000000000000 RBX: ffffac508146bda8 RCX: 0000000000000000
[ 44.685205] RDX: 0000000000008d18 RSI: 0000000000008d18 RDI: 00000000ffffff93
[ 44.685207] RBP: ffffac508146bd40 R08: 0000000000000000 R09: 0000000000000003
[ 44.685209] R10: 0000000000010000 R11: ffffffffc0760b80 R12: ffff9af1268e1100
[ 44.685210] R13: 0000000000000000 R14: ffff9af12b970000 R15: ffffffffc07604c0
[ 44.685213] FS: 00007f7e99fdb700(0000) GS:ffff9af132480000(0000) knlGS:0000000000000000
[ 44.685215] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 44.685217] CR2: 0000000000008d18 CR3: 00000003e516c004 CR4: 00000000003606e0
[ 44.685218] Call Trace:
[ 44.685226] ni_ao_cmdtest+0x1df/0x320 [ni_pcimio]
[ 44.685232] comedi_unlocked_ioctl+0x5bc/0xe10 [comedi]
[ 44.685239] do_vfs_ioctl+0x407/0x670
[ 44.685243] ? do_user_addr_fault+0x216/0x450
[ 44.685246] ksys_ioctl+0x67/0x90
[ 44.685250] __x64_sys_ioctl+0x1a/0x20
[ 44.685254] do_syscall_64+0x57/0x190
[ 44.685259] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 44.685261] RIP: 0033:0x7f7f523675d7
[ 44.685264] Code: b3 66 90 48 8b 05 b1 48 2d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 81 48 2d 00 f7 d8 64 89 01 48
[ 44.685266] RSP: 002b:00007f7e99fd9798 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 44.685268] RAX: ffffffffffffffda RBX: 00007f7f4002da60 RCX: 00007f7f523675d7
[ 44.685270] RDX: 00007f7ef0185170 RSI: ffffffff8050640a RDI: 000000000000003a
[ 44.685271] RBP: 00007f7ef0185170 R08: 00007f7f347f6d20 R09: 0000000000000000
[ 44.685273] R10: 000000000000003a R11: 0000000000000246 R12: 00000000ffffffff
[ 44.685275] R13: 00007f7f50742de0 R14: 00007f7f44090170 R15: 00007f7f440e6368
[ 44.685277] Modules linked in: intel_rapl_msr intel_rapl_common snd_hda_codec_hdmi x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio mei_hdcp kvm_intel kvm irqbypass snd_hda_intel snd_intel_nhlt snd_hda_codec crct10dif_pclmul snd_hda_core crc32_pclmul ghash_clmulni_intel snd_hwdep snd_pcm snd_seq_midi aesni_intel snd_seq_midi_event crypto_simd snd_rawmidi cryptd glue_helper snd_seq snd_seq_device intel_cstate i915 intel_rapl_perf snd_timer snd soundcore ni_pcimio(C) drm_kms_helper ni_tiocmd(C) mite(C) drm input_leds fb_sys_fops comedi_pci(C) cdc_acm mei_me syscopyarea ni_routing(C) mei sysfillrect ni_tio(C) intel_pch_thermal sysimgblt comedi_8255(C) comedi(C) acpi_pad mac_hid sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid hid igb e1000e i2c_algo_bit dca ahci libahci pinctrl_sunrisepoint video pinctrl_intel
[ 44.685316] CR2: 0000000000008d18
[ 44.685319] ---[ end trace 0f7df4360d57c0dc ]---
[ 44.728051] RIP: 0010:ni_find_route_source+0x38/0x50 [ni_routing]
[ 44.728053] Code: e5 81 fe d1 00 00 00 77 2e 69 f6 d2 00 00 00 48 8b 4a 08 83 cf 80 31 c0 eb 0a 83 c0 01 3d d2 00 00 00 74 13 8d 14 06 48 63 d2 <40> 38 3c 11 75 ea 05 00 80 00 00 5d c3 b8 ea ff ff ff 5d c3 0f 1f
[ 44.728054] RSP: 0018:ffffac508146bd40 EFLAGS: 00010246
[ 44.728056] RAX: 0000000000000000 RBX: ffffac508146bda8 RCX: 0000000000000000
[ 44.728057] RDX: 0000000000008d18 RSI: 0000000000008d18 RDI: 00000000ffffff93
[ 44.728057] RBP: ffffac508146bd40 R08: 0000000000000000 R09: 0000000000000003
[ 44.728058] R10: 0000000000010000 R11: ffffffffc0760b80 R12: ffff9af1268e1100
[ 44.728059] R13: 0000000000000000 R14: ffff9af12b970000 R15: ffffffffc07604c0
[ 44.728060] FS: 00007f7e99fdb700(0000) GS:ffff9af132480000(0000) knlGS:0000000000000000
[ 44.728061] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 44.728062] CR2: 0000000000008d18 CR3: 00000003e516c004 CR4: 00000000003606e0That's not good. From your "comedi_board_info.txt", I see the board name is "pcie-6251". The "ni_routing" module doesn't contain any routing information for that board, but it does for "pci-6251", "pxi-6251" and "pxie-6251". I guess this is related to the problem.
Do you see something in the kernel log similar to this?:
... ni_E_init: pcie-6251 device has no signal routing table. ... ni_E_init: High level NI signal names will not be available for this pcie-6251 board.
That would confirm the routing information is missing.
I think the crash in ni_find_route_source() is because tables->route_values is NULL, i.e. a null pointer dereference.
I guess ni_find_route_source() (and maybe some other
functions) ought to return -EINVAL if the route_values
pointer is NULL. That will still leave the TRIG_EXT
sources non-working, but it should at least avoid the kernel
crash!
I'd like some advice from Spencer on how to fix this (if he's still around). Obviously, ni_find_route_source() needs to check the route_values pointer. Currently, both the route_values pointer and the valid_routes pointer get set to NULL by ni_assign_device_routes() and ni_find_device_routes() if no board-specific routes are found. However, the route_values pointer only depends on the device family ("ni_mseries"), not on the board name. Perhaps ni_find_device_routes() should allow the route_values pointer to be filled in even if the valid_routes pointer cannot be filled in.
Best regards,
Ian
-- -=( Ian Abbott <abb...@mev.co.uk> || Web: www.mev.co.uk )=- -=( MEV Ltd. is a company registered in England & Wales. )=- -=( Registered number: 02862268. Registered address: )=- -=( 15 West Park Road, Bramhall, STOCKPORT, SK7 3JZ, UK. )=-