Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Iakov Pustilnik

  • Posts: 6
  • Joined: Sun Jun 07, 2015 1:37 pm

Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

PostSun Jun 14, 2015 3:08 pm

Hello.

I'm trying to run Blackmagic Desktop Video drivers with custom-build 3.18.13-rt10 kernel on Ubuntu 14.04 (https://rt.wiki.kernel.org/). The driver installs, but does not load automatically after system reboot. So i have to manually load modules with
Code: Select all
modprobe blackmagic && modprobe blackmagic_io


I'm also unable to any SDK examples that do any input/output. Running:
Code: Select all
./TestPattern
example blocks blackmagic_io module and it is impossible to reboot the system - i had to cut the power to reboot it.

/var/log/syslog contents:
Code: Select all
Jun 14 17:44:33 ubz230 kernel: [  289.360199] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
Jun 14 17:44:33 ubz230 kernel: [  289.360204] IP: [<ffffffff81794d00>] rt_spin_lock+0x10/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.360205] PGD 0
Jun 14 17:44:33 ubz230 kernel: [  289.360206] Oops: 0002 [#1] PREEMPT SMP
Jun 14 17:44:33 ubz230 kernel: [  289.360225] Modules linked in: blackmagic_io(POE) blackmagic(POE) nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
 nf_conntrack ipt_REJECT nf_reject_ipv4 xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables e
btable_nat ebtables x_tables rfcomm bnep bluetooth snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel snd_hda_controlle
r snd_hda_codec i915 snd_hwdep intel_rapl snd_pcm intel_powerclamp coretemp nls_iso8859_1 snd_seq_midi snd_seq_midi_event kvm snd_rawmidi snd_seq
 snd_seq_device snd_timer snd video drm_kms_helper hp_wmi sparse_keymap crct10dif_pclmul crc32_pclmul drm ghash_clmulni_intel soundcore mei_me ae
sni_intel aes_x86_64 mxupcie(OE) lrw mei gf128mul lpc_ich wmi shpchp glue_helper tpm_infineon serio_raw mac_hid ablk_helper cryptd parport_pc ppd
ev lp parport hid_generic usbhid hid uas usb_storage igb e1000e psmouse i2c_algo_bit ahci dca libahci ptp pps_core
Jun 14 17:44:33 ubz230 kernel: [  289.360233] CPU: 4 PID: 2136 Comm: blackmagic Tainted: P           OE  3.18.13-rt10 #1
Jun 14 17:44:33 ubz230 kernel: [  289.360234] Hardware name: Hewlett-Packard HP Z230 Tower Workstation/1905, BIOS L51 v01.51 04/13/2015
Jun 14 17:44:33 ubz230 kernel: [  289.360234] task: ffff88011d9b3460 ti: ffff880024c78000 task.ti: ffff880024c78000
Jun 14 17:44:33 ubz230 kernel: [  289.360236] RIP: 0010:[<ffffffff81794d00>]  [<ffffffff81794d00>] rt_spin_lock+0x10/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.360236] RSP: 0018:ffff880024c7bce0  EFLAGS: 00010246
Jun 14 17:44:33 ubz230 kernel: [  289.360237] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Jun 14 17:44:33 ubz230 kernel: [  289.360237] RDX: ffff88011d9b3460 RSI: ffffffff81a9f523 RDI: 0000000000000000
Jun 14 17:44:33 ubz230 kernel: [  289.360238] RBP: ffff880024c7bcf8 R08: 0000000000016ba0 R09: ffff88012a003b00
Jun 14 17:44:33 ubz230 kernel: [  289.360238] R10: ffffffffc09f3fe9 R11: ffff880024c7bfd8 R12: 0000000000000004
Jun 14 17:44:33 ubz230 kernel: [  289.360238] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000043
Jun 14 17:44:33 ubz230 kernel: [  289.360239] FS:  0000000000000000(0000) GS:ffff88012eb00000(0000) knlGS:0000000000000000
Jun 14 17:44:33 ubz230 kernel: [  289.360240] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jun 14 17:44:33 ubz230 kernel: [  289.360240] CR2: 0000000000000018 CR3: 0000000002c1a000 CR4: 00000000001407e0
Jun 14 17:44:33 ubz230 kernel: [  289.360241] Stack:
Jun 14 17:44:33 ubz230 kernel: [  289.360242]  ffffffffc09f2945 ffff880024c7bcf8 ffff88002ceca600 ffff88002d390190
Jun 14 17:44:33 ubz230 kernel: [  289.360243]  ffffffffc09c7135 56107cb92eb16cc0 000000018040003f 0000000000000000
Jun 14 17:44:33 ubz230 kernel: [  289.360243]  ffff88002d390180 ffff880024c7bd68 0000000000000043 0000000000000000
Jun 14 17:44:33 ubz230 kernel: [  289.360244] Call Trace:
Jun 14 17:44:33 ubz230 kernel: [  289.360260]  [<ffffffffc09f2945>] ? bm_spin_lock_irqsave+0x25/0x30 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360264]  [<ffffffffc09c7135>] bmio_notify_add+0x75/0xd0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360274]  [<ffffffffc09f18ea>] ? bmio_client_notify+0x1a/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360283]  [<ffffffffc09ceba4>] ? _ZN20UserClientClassLinux19notifyClientOfEventEjjjjj+0x64/0xa0 [blackmagic_
io]
Jun 14 17:44:33 ubz230 kernel: [  289.360292]  [<ffffffffc09ceb40>] ? _ZN20UserClientClassLinux14processMessageEP27_BlackmagicIOMessageRequest+0x
50/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360304]  [<ffffffffc09d7871>] ? _ZN15UserClientClass24addCompletedFrameToQueueEP16VideoOutputFrame+0xb1/0xf
0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360310]  [<ffffffffc09cb480>] ? _ZNK10IOWorkLoop12getMetaClassEv+0x10/0x10 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360321]  [<ffffffffc09ec399>] ? _ZN16VideoOutputFrame23informOwnerOfCompletionEv+0x69/0x70 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360331]  [<ffffffffc09edb80>] ? _ZN20VideoOutputInterface25flushCompletedFramesQueueEv+0x60/0x80 [blackmagi
c_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360340]  [<ffffffffc09ed552>] ? _ZN20VideoOutputInterface24handleSecondaryInterruptEj+0xf2/0x150 [blackmagi
c_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360351]  [<ffffffffc09d52e3>] ? _ZN18BlackmagicIODriver24handleSecondaryInterruptEP8OSObjectP22IOInterruptE
ventSourcei+0x103/0x250 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360356]  [<ffffffffc09c89ad>] ? _ZN22IOInterruptEventSource12checkForWorkEv+0x2d/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360363]  [<ffffffffc09cb51c>] ? _ZN10IOWorkLoop15runEventSourcesEv+0x5c/0xa0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360369]  [<ffffffffc09cb73c>] ? _ZN10IOWorkLoop10threadMainEv+0x1c/0x60 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360375]  [<ffffffffc09cb48d>] ? _ZN10IOWorkLoop22threadMainContinuationEPS_+0xd/0x20 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.360378]  [<ffffffff81094fa4>] ? kthread+0xc4/0xe0
Jun 14 17:44:33 ubz230 kernel: [  289.360379]  [<ffffffff81094ee0>] ? kthread_worker_fn+0x1a0/0x1a0
Jun 14 17:44:33 ubz230 kernel: [  289.360381]  [<ffffffff81795418>] ? ret_from_fork+0x58/0x90
Jun 14 17:44:33 ubz230 kernel: [  289.360382]  [<ffffffff81094ee0>] ? kthread_worker_fn+0x1a0/0x1a0
Jun 14 17:44:33 ubz230 kernel: [  289.360390] Code: 18 48 85 c0 75 01 c3 55 48 89 e5 e8 db e8 ff ff 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00
00 65 48 8b 14 25 c0 b8 00 00 31 c0 <f0> 48 0f b1 57 18 48 85 c0 75 01 c3 55 48 89 e5 e8 ab e8 ff ff
Jun 14 17:44:33 ubz230 kernel: [  289.360391] RIP  [<ffffffff81794d00>] rt_spin_lock+0x10/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.360392]  RSP <ffff880024c7bce0>
Jun 14 17:44:33 ubz230 kernel: [  289.360392] CR2: 0000000000000018
Jun 14 17:44:33 ubz230 kernel: [  289.370627] ---[ end trace 0000000000000002 ]---
Jun 14 17:44:33 ubz230 kernel: [  289.370636] ------------[ cut here ]------------
Jun 14 17:44:33 ubz230 kernel: [  289.370640] WARNING: CPU: 4 PID: 2136 at kernel/smp.c:293 smp_call_function_single+0xc4/0xe0()
Jun 14 17:44:33 ubz230 kernel: [  289.370650] Modules linked in: blackmagic_io(POE) blackmagic(POE) nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack
 nf_conntrack ipt_REJECT nf_reject_ipv4 xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables e
btable_nat ebtables x_tables rfcomm bnep bluetooth snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_codec_generic snd_hda_intel snd_hda_controlle
r snd_hda_codec i915 snd_hwdep intel_rapl snd_pcm intel_powerclamp coretemp nls_iso8859_1 snd_seq_midi snd_seq_midi_event kvm snd_rawmidi snd_seq
 snd_seq_device snd_timer snd video drm_kms_helper hp_wmi sparse_keymap crct10dif_pclmul crc32_pclmul drm ghash_clmulni_intel soundcore mei_me ae
sni_intel aes_x86_64 mxupcie(OE) lrw mei gf128mul lpc_ich wmi shpchp glue_helper tpm_infineon serio_raw mac_hid ablk_helper cryptd parport_pc ppd
ev lp parport hid_generic usbhid hid uas usb_storage igb e1000e psmouse i2c_algo_bit ahci dca libahci ptp pps_core
Jun 14 17:44:33 ubz230 kernel: [  289.370654] CPU: 4 PID: 2136 Comm: blackmagic Tainted: P      D    OE  3.18.13-rt10 #1
Jun 14 17:44:33 ubz230 kernel: [  289.370654] Hardware name: Hewlett-Packard HP Z230 Tower Workstation/1905, BIOS L51 v01.51 04/13/2015
Jun 14 17:44:33 ubz230 kernel: [  289.370655]  0000000000000009 ffff880024c7b858 ffffffff8178e303 0000000000000002
Jun 14 17:44:33 ubz230 kernel: [  289.370656]  0000000000000000 ffff880024c7b898 ffffffff81075021 ffff880024c7b888
Jun 14 17:44:33 ubz230 kernel: [  289.370657]  0000000000000004 ffffffff81167fa0 ffff880024c7b8f8 0000000000000001
Jun 14 17:44:33 ubz230 kernel: [  289.370657] Call Trace:
Jun 14 17:44:33 ubz230 kernel: [  289.370659]  [<ffffffff8178e303>] dump_stack+0x4f/0x9e
Jun 14 17:44:33 ubz230 kernel: [  289.370662]  [<ffffffff81075021>] warn_slowpath_common+0x81/0xc0
Jun 14 17:44:33 ubz230 kernel: [  289.370664]  [<ffffffff81167fa0>] ? ring_buffer_get.isra.52+0x70/0x70
Jun 14 17:44:33 ubz230 kernel: [  289.370665]  [<ffffffff8107511a>] warn_slowpath_null+0x1a/0x20
Jun 14 17:44:33 ubz230 kernel: [  289.370666]  [<ffffffff810f8814>] smp_call_function_single+0xc4/0xe0
Jun 14 17:44:33 ubz230 kernel: [  289.370668]  [<ffffffff817947be>] ? _raw_spin_unlock_irqrestore+0x2e/0x90
Jun 14 17:44:33 ubz230 kernel: [  289.370670]  [<ffffffff81166744>] task_function_call+0x44/0x50
Jun 14 17:44:33 ubz230 kernel: [  289.370671]  [<ffffffff8116ca90>] ? perf_cgroup_switch+0x1c0/0x1c0
Jun 14 17:44:33 ubz230 kernel: [  289.370672]  [<ffffffff811680f0>] perf_cgroup_exit+0x20/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.370675]  [<ffffffff8110d543>] cgroup_exit+0xd3/0xe0
Jun 14 17:44:33 ubz230 kernel: [  289.370676]  [<ffffffff81077fa3>] do_exit+0x2f3/0xaf0
Jun 14 17:44:33 ubz230 kernel: [  289.370677]  [<ffffffff8178a71e>] ? printk+0x61/0x63
Jun 14 17:44:33 ubz230 kernel: [  289.370679]  [<ffffffff810ce851>] ? kmsg_dump+0xc1/0xd0
Jun 14 17:44:33 ubz230 kernel: [  289.370681]  [<ffffffff8101a01d>] oops_end+0xad/0x150
Jun 14 17:44:33 ubz230 kernel: [  289.370683]  [<ffffffff81789970>] no_context+0x2e0/0x344
Jun 14 17:44:33 ubz230 kernel: [  289.370685]  [<ffffffff81789a47>] __bad_area_nosemaphore+0x73/0x1cc
Jun 14 17:44:33 ubz230 kernel: [  289.370686]  [<ffffffff81789bb3>] bad_area_nosemaphore+0x13/0x15
Jun 14 17:44:33 ubz230 kernel: [  289.370687]  [<ffffffff81061be6>] __do_page_fault+0xa6/0x620
Jun 14 17:44:33 ubz230 kernel: [  289.370689]  [<ffffffff810b131c>] ? load_balance+0x1bc/0x960
Jun 14 17:44:33 ubz230 kernel: [  289.370691]  [<ffffffff810be8a8>] ? cpuacct_charge+0x58/0x70
Jun 14 17:44:33 ubz230 kernel: [  289.370691]  [<ffffffff81062191>] do_page_fault+0x31/0x70
Jun 14 17:44:33 ubz230 kernel: [  289.370692]  [<ffffffff81797518>] page_fault+0x28/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.370702]  [<ffffffffc09f3fe9>] ? bm_kmalloc+0x29/0x30 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370703]  [<ffffffff81794d00>] ? rt_spin_lock+0x10/0x30
Jun 14 17:44:33 ubz230 kernel: [  289.370712]  [<ffffffffc09f2945>] ? bm_spin_lock_irqsave+0x25/0x30 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370715]  [<ffffffffc09c7135>] bmio_notify_add+0x75/0xd0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370724]  [<ffffffffc09f18ea>] ? bmio_client_notify+0x1a/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370732]  [<ffffffffc09ceba4>] ? _ZN20UserClientClassLinux19notifyClientOfEventEjjjjj+0x64/0xa0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370740]  [<ffffffffc09ceb40>] ? _ZN20UserClientClassLinux14processMessageEP27_BlackmagicIOMessageRequest+0x50/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370751]  [<ffffffffc09d7871>] ? _ZN15UserClientClass24addCompletedFrameToQueueEP16VideoOutputFrame+0xb1/0xf0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370757]  [<ffffffffc09cb480>] ? _ZNK10IOWorkLoop12getMetaClassEv+0x10/0x10 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370766]  [<ffffffffc09ec399>] ? _ZN16VideoOutputFrame23informOwnerOfCompletionEv+0x69/0x70 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370775]  [<ffffffffc09edb80>] ? _ZN20VideoOutputInterface25flushCompletedFramesQueueEv+0x60/0x80 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370782]  [<ffffffffc09ed552>] ? _ZN20VideoOutputInterface24handleSecondaryInterruptEj+0xf2/0x150 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370792]  [<ffffffffc09d52e3>] ? _ZN18BlackmagicIODriver24handleSecondaryInterruptEP8OSObjectP22IOInterruptEventSourcei+0x103/0x250 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370797]  [<ffffffffc09c89ad>] ? _ZN22IOInterruptEventSource12checkForWorkEv+0x2d/0x50 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370803]  [<ffffffffc09cb51c>] ? _ZN10IOWorkLoop15runEventSourcesEv+0x5c/0xa0 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370809]  [<ffffffffc09cb73c>] ? _ZN10IOWorkLoop10threadMainEv+0x1c/0x60 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370815]  [<ffffffffc09cb48d>] ? _ZN10IOWorkLoop22threadMainContinuationEPS_+0xd/0x20 [blackmagic_io]
Jun 14 17:44:33 ubz230 kernel: [  289.370816]  [<ffffffff81094fa4>] ? kthread+0xc4/0xe0
Jun 14 17:44:33 ubz230 kernel: [  289.370817]  [<ffffffff81094ee0>] ? kthread_worker_fn+0x1a0/0x1a0
Jun 14 17:44:33 ubz230 kernel: [  289.370818]  [<ffffffff81795418>] ? ret_from_fork+0x58/0x90
Jun 14 17:44:33 ubz230 kernel: [  289.370819]  [<ffffffff81094ee0>] ? kthread_worker_fn+0x1a0/0x1a0
Jun 14 17:44:33 ubz230 kernel: [  289.370820] ---[ end trace 0000000000000003 ]---
Offline

Iakov Pustilnik

  • Posts: 6
  • Joined: Sun Jun 07, 2015 1:37 pm

Re: Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

PostMon Jun 15, 2015 5:07 pm

I did some research and tried older rt-kernel and older driver version. It's still not working, though the other way.

On both kernel 3.12.40-rt55 and kernel 3.18.13-rt10 I tried the driver v9.7.3a5, and now SDK samples work perfectly, but if I try to call CDeckLinkOutput::GetHardwareReferenceClock(long, long*, long*, long*) - the program crashes with SIGSEGV.

Here is gdb output:
Code: Select all
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff5e47700 (LWP 3691)]
[Thread 0x7ffff5e47700 (LWP 3691) exited]
Capturing with the following configuration:
 - Playback device: DeckLink 4K Extreme
 - Video mode: HD 1080i 50
 - Pixel format: 8 bit YUV (4:2:2)
 - Audio channels: 2
 - Audio sample depth: 16 bit
[New Thread 0x7ffff5646700 (LWP 3693)]
[New Thread 0x7fffab079700 (LWP 3694)]
[New Thread 0x7fffaa878700 (LWP 3695)]
Starting playback

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff5646700 (LWP 3693)]
0x00007ffff6738df0 in GetCurrentVideoOutputInterruptTimestamp () from /usr/lib/libDeckLinkAPI.so
(gdb) bt
#0  0x00007ffff6738df0 in GetCurrentVideoOutputInterruptTimestamp () from /usr/lib/libDeckLinkAPI.so
#1  0x00007ffff66d1348 in CDeckLinkOutput::GetHardwareReferenceClock(long, long*, long*, long*) () from /usr/lib/libDeckLinkAPI.so
#2  0x00000000004031f8 in TestPattern::PrintStatusSerial (this=0x7fffffffe3f0) at TestPattern.cpp:479
#3  0x0000000000403611 in TestPattern::ScheduledFrameCompleted (this=0x7fffffffe3f0, completedFrame=0x60ab30, result=0) at TestPattern.cpp:603
#4  0x00007ffff66d071f in CDeckLinkOutput::outputFrameCompletionCallback(unsigned int, char) () from /usr/lib/libDeckLinkAPI.so
#5  0x00007ffff66b11a4 in CDeckLink::getCompletedFramesFromDriver() () from /usr/lib/libDeckLinkAPI.so
#6  0x00007ffff66b1224 in CDeckLink::DriverNotificationThreadFunction(void*) () from /usr/lib/libDeckLinkAPI.so
#7  0x00007ffff79c0182 in start_thread (arg=0x7ffff5646700) at pthread_create.c:312
#8  0x00007ffff6ecd47d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111


Any help is greatly appreciated.

Iakov
Offline

Nicholas Gill

Blackmagic Design

  • Posts: 169
  • Joined: Mon May 04, 2015 10:28 pm

Re: Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

PostWed Jun 17, 2015 1:45 am

Hi Iakov,

Please note that the linux-rt patchset is not an officially supported or tested configuration.

Looking at the backtrace, the crash is unrelated to the rt-patchset and was a bug in that version of the driver.

If you avoid IDeckLinkOutput::GetHardwareReferenceClock it may be possible to use the drivers with the rt kernel (acknowledging that this is not a supported configuration).

As the issue with 9.7.3 was actually a bug corrected since that version (and not related to the rt kernel), an alternative would be to test the different driver versions against various versions of the rt-patchset to find a combination which works in your required configuration.

Cheers,

-nick
Offline

Iakov Pustilnik

  • Posts: 6
  • Joined: Sun Jun 07, 2015 1:37 pm

Re: Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

PostWed Jun 17, 2015 9:13 am

Hello, Nick.

Thanks for your reply.

This is very important information. Would you be so kind to check for me you source tree and tell me which driver version was the bug with GetCurrentVideoOutputInterruptTimestamp() function fixed? So you could save me some time in my experiments with different rt-patch-version and different Blackmagic Desktop Video driver version?

I was evaluating an option with stock (non-rt) kernel, but I got periodic latency peaks. So the frame tick count returned by CDeckLinkOutput::GetHardwareReferenceClock(…) goes stable around 2-3 ms and than jumps to 17-23ms, which is not an option for my type of task. I'll do more research on this to check if this may be an SMI-issue

Iakov
Offline

Iakov Pustilnik

  • Posts: 6
  • Joined: Sun Jun 07, 2015 1:37 pm

Re: Desktop Video 10.4 hangs on linux kernel 3.18.13-rt10

PostWed Jun 17, 2015 9:55 am

Ok, I have actually tried 9.8 and 10.1.1 also.

The bug with GetHardwareReferenceClock() is still present in v9.8, and v10.1.1 is a new branch introducing new module (blackmagic_io), so v10.x hangs on rt_spin_lock(...) call on any rt-patched kernel.

Code: Select all
[  194.745376] BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
[  194.745382] IP: [<ffffffff81707990>] rt_spin_lock+0x10/0x30
[  194.745382] PGD 0
[  194.745384] Oops: 0002 [#1] PREEMPT SMP
[  194.745403] Modules linked in: iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp bridge stp llc ip6table_filter ip6_tables iptable_filter ip_tables ebtable_nat ebtables x_tables rfcomm bnep bluetooth snd_hda_codec_realtek snd_hda_codec_hdmi snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_page_alloc snd_seq_midi i915 snd_seq_midi_event nls_iso8859_1 snd_rawmidi snd_seq x86_pkg_temp_thermal video coretemp drm_kms_helper snd_seq_device hp_wmi kvm snd_timer sparse_keymap drm snd mei_me blackmagic_io(POF) crct10dif_pclmul mei crc32_pclmul blackmagic(POF) ghash_clmulni_intel aesni_intel soundcore wmi shpchp aes_x86_64 lrw gf128mul lpc_ich glue_helper tpm_infineon ablk_helper serio_raw mac_hid cryptd parport_pc ppdev lp parport usb_storage hid_generic usbhid hid igb e1000e psmouse ahci i2c_algo_bit dca libahci ptp pps_core
[  194.745409] CPU: 1 PID: 513 Comm: blackmagic Tainted: PF          O 3.12.13-rt21 #1
[  194.745410] Hardware name: Hewlett-Packard HP Z230 Tower Workstation/1905, BIOS L51 v01.51 04/13/2015
[  194.745410] task: ffff880029840000 ti: ffff880112fc0000 task.ti: ffff880112fc0000
[  194.745412] RIP: 0010:[<ffffffff81707990>]  [<ffffffff81707990>] rt_spin_lock+0x10/0x30
[  194.745412] RSP: 0018:ffff880112fc1d20  EFLAGS: 00010246
[  194.745413] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  194.745413] RDX: ffff880029840000 RSI: ffff880112fc1d50 RDI: 0000000000000000
[  194.745414] RBP: ffff880112fc1d30 R08: 0000000000017ce0 R09: ffff88012a003b00
[  194.745414] R10: ffffffffa02c0eb0 R11: ffff880112fc1fd8 R12: 0000000000000004
[  194.745414] R13: 0000000000000000 R14: 0000000000000000 R15: 000000000000002d
[  194.745415] FS:  0000000000000000(0000) GS:ffff88012ea40000(0000) knlGS:0000000000000000
[  194.745416] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  194.745416] CR2: 0000000000000018 CR3: 0000000002c12000 CR4: 00000000001407e0
[  194.745417] Stack:
[  194.745419]  ffffffffa02bfa11 ffff8800b8e05100 ffff88002d759190 ffffffffa0297135
[  194.745419]  5100d5c22ea57e00 000000018040003f 0000000000000000 ffff88002d759180
[  194.745420]  ffff880112fc1d98 000000000000002d 0000000000000000 0000000000000000
[  194.745421] Call Trace:
[  194.745439]  [<ffffffffa02bfa11>] ? bm_spin_lock_irqsave+0x21/0x30 [blackmagic_io]
[  194.745444]  [<ffffffffa0297135>] bmio_notify_add+0x75/0xd0 [blackmagic_io]
[  194.745455]  [<ffffffffa02bea46>] ? bmio_client_notify+0x16/0x40 [blackmagic_io]
[  194.745466]  [<ffffffffa029eaf4>] ? _ZN20UserClientClassLinux19notifyClientOfEventEjjjjj+0x64/0xa0 [blackmagic_io]
[  194.745475]  [<ffffffffa029ea90>] ? _ZN20UserClientClassLinux14processMessageEP26BlackmagicIOMessageRequest+0x50/0x50 [blackmagic_io]
[  194.745487]  [<ffffffffa02a7631>] ? _ZN15UserClientClass24addCompletedFrameToQueueEP16VideoOutputFrame+0xb1/0xf0 [blackmagic_io]
[  194.745495]  [<ffffffffa029b440>] ? _ZNK10IOWorkLoop12getMetaClassEv+0x10/0x10 [blackmagic_io]
[  194.745507]  [<ffffffffa02b9709>] ? _ZN16VideoOutputFrame23informOwnerOfCompletionEv+0x69/0x70 [blackmagic_io]
[  194.745518]  [<ffffffffa02bae40>] ? _ZN20VideoOutputInterface25flushCompletedFramesQueueEv+0x60/0x80 [blackmagic_io]
[  194.745528]  [<ffffffffa02ba892>] ? _ZN20VideoOutputInterface24handleSecondaryInterruptEj+0xf2/0x150 [blackmagic_io]
[  194.745539]  [<ffffffffa02a4d13>] ? _ZN18BlackmagicIODriver24handleSecondaryInterruptEP8OSObjectP22IOInterruptEventSourcei+0x103/0x250 [blackmagic_io]
[  194.745546]  [<ffffffffa029896d>] ? _ZN22IOInterruptEventSource12checkForWorkEv+0x2d/0x50 [blackmagic_io]
[  194.745553]  [<ffffffffa029b4dc>] ? _ZN10IOWorkLoop15runEventSourcesEv+0x5c/0xa0 [blackmagic_io]
[  194.745560]  [<ffffffffa029b6f2>] ? _ZN10IOWorkLoop10threadMainEv+0x12/0x40 [blackmagic_io]
[  194.745568]  [<ffffffffa029b44d>] ? _ZN10IOWorkLoop22threadMainContinuationEPS_+0xd/0x20 [blackmagic_io]
[  194.745570]  [<ffffffff8108ec92>] ? kthread+0xb2/0xc0
[  194.745571]  [<ffffffff8108ebe0>] ? kthread_worker_fn+0x1a0/0x1a0
[  194.745572]  [<ffffffff8170ff7c>] ? ret_from_fork+0x7c/0xb0
[  194.745574]  [<ffffffff8108ebe0>] ? kthread_worker_fn+0x1a0/0x1a0
[  194.745582] Code: 18 48 85 c0 75 01 c3 55 48 89 e5 e8 1b f4 ff ff 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 65 48 8b 14 25 40 c8 00 00 31 c0 <f0> 48 0f b1 57 18 48 85 c0 75 01 c3 55 48 89 e5 e8 eb f3 ff ff
[  194.745583] RIP  [<ffffffff81707990>] rt_spin_lock+0x10/0x30
[  194.745584]  RSP <ffff880112fc1d20>
[  194.745584] CR2: 0000000000000018
[  194.755852] ---[ end trace 0000000000000002 ]---


So i wander whether it is possible to solve my task using Blackmagic hardware at all... :cry:

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 4 guests