Issue with Kinect under linux


#1

Hi,

I’m trying to use the Kinect on the DB410c and it works some of the time. However there seems to be some instability at the kernel level.

The kernel I’m using is: Linux linaro-alip 4.2.4-linaro-lt-qcom #1 SMP PREEMPT Tue Nov 24 15:33:01 UTC 2015 aarch64 aarch64 aarch64 GNU/Linux

The top part of the error is:

Dec 14 19:48:12 linaro-alip kernel: [ 1679.729886] Unable to handle kernel NULL pointer dereference at virtual address 00000018
Dec 14 19:48:12 linaro-alip kernel: [ 1679.729920] pgd = ffffffc016a32000
Dec 14 19:48:12 linaro-alip kernel: [ 1679.737032] [00000018] *pgd=0000000096a33003, *pud=0000000096a33003, *pmd=000000008dc76003, *pte=0000000000000000
Dec 14 19:48:12 linaro-alip kernel: [ 1679.750310] Internal error: Oops: 96000007 [#1] PREEMPT SMP
Dec 14 19:48:12 linaro-alip kernel: [ 1679.750576] Modules linked in: wcn36xx gspca_kinect gspca_main wcn36xx_platform spi_qup ftdi_sio
Dec 14 19:48:12 linaro-alip kernel: [ 1679.764808] CPU: 1 PID: 11347 Comm: nodelet Not tainted 4.2.4-linaro-lt-qcom #1
Dec 14 19:48:12 linaro-alip kernel: [ 1679.764901] Hardware name: Qualcomm Technologies, Inc. APQ 8016 SBC (DT)
Dec 14 19:48:12 linaro-alip kernel: [ 1679.772018] task: ffffffc02d158000 ti: ffffffc016974000 task.ti: ffffffc016974000
Dec 14 19:48:12 linaro-alip kernel: [ 1679.778971] PC is at __lock_acquire+0x1b4/0x176c
Dec 14 19:48:12 linaro-alip kernel: [ 1679.786341] LR is at lock_acquire+0x54/0x78
Dec 14 19:48:12 linaro-alip kernel: [ 1679.791025] pc : [<ffffffc000101948>] lr : [<ffffffc0001036e4>] pstate: 400001c5
Dec 14 19:48:12 linaro-alip kernel: [ 1679.794935] sp : ffffffc016977bd0
Dec 14 19:48:12 linaro-alip kernel: [ 1679.802569] x29: ffffffc016977bd0 
Dec 14 19:48:12 linaro-alip kernel: [ 1679.805587] Unable to handle kernel NULL pointer dereference at virtual address 00000004
Dec 14 19:48:12 linaro-alip kernel: [ 1679.805591] pgd = ffffffc016a32000
Dec 14 19:48:12 linaro-alip kernel: [ 1679.805594] [00000004] *pgd=0000000096a33003, *pud=0000000096a33003, *pmd=000000008dc76003, *pte=0000000000000000

I’ve collected a lot of logs from syslog in a gist covering several repeated instances of the error with full backtrace and stack dump: https://gist.github.com/tfoote/7908e7bfb324125d6cf1

I seem to be able to cause this repeatedly so is there anything else which would be helpful for understanding this?


#2

hi,

what’s the user doing that causes this crash? Are you running any application, or is it just when plugging the kinnect that you are getting the crash?


#3

This is running the full stack of our TurtleBot Follower demo.

A representative process tree is added to the gist at the bottom(state after the crash so the cpu usage is low): https://gist.github.com/tfoote/7908e7bfb324125d6cf1

Note that the kinect process typically takes 275% CPU for streaming and processing the Kinect data.

The error happens at/near the startup and beginning to stream data from the Kinect. The Kinect is plugged in at boot and doesn’t have any trouble.

The memory footprint of the demo is also large. It’s not uncommon to have 600+MB allocated. I’ve mounted a 2G swap partition on the sd card in case we overrun, but watching top the used swap number stays 0 so I don’t think we’re getting into that.

Sometime the turtlebot’s usb driver (connected to the base) will complain about a malformed packet at about the same time.

My command line process is:

sudo swapon /dev/mmcblk1p2
sudo chroot /sdcard/trusty_armhf
. /opt/ros/indigo/setup.bash
export TURTLEBOT_3D_SENSOR=kinect
roslaunch turtlebot_bringup minimal.launch

In a second terminal:

sudo chroot /sdcard/trusty_armhf
export TURTLEBOT_3D_SENSOR=kinect
. /opt/ros/indigo/setup.bash 
roslaunch turtlebot_follower follower.launch

I have mounted the following into the chroot:

/dev /sdcard/trusty_armhf/dev none defaults,bind 0 0
/proc /sdcard/trusty_armhf/proc none defaults,bind 0 0
/sys /sdcard/trusty_armhf/sys none defaults,bind 0 0

Inside the chroot is installed the default turtlebot ubuntu packages for trusty armhf http://wiki.ros.org/indigo/Installation/UbuntuARM