beagleboard / beagleboard/librobotcontrol

motor command results in "segmentation fault"

Open
#154 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
C
Stars
212
Forks
167
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Driving motors on beaglebone blue generates a "segmentation fault" after one or more iterations. After the fault, the beaglebone does not accept new commands. A sample size of 10 beaglebones have been used and about 3 or 4 of them repeatedly exhibit this problem. Rebooting the board always fixes the problem for at least one run of the command, then the problem returns.

**To Reproduce**
Steps to reproduce the behavior:
1. run rc_test_motors -d 1 -m 1 or make any command for operating motors.
2. ctrl-c to stop running. (at this time, the fault may be generated)
3. attempt to run another motor command

**Expected behavior**
rc_test_motors command should result in the same output every time it is run, and shut down cleanly. ctrl-c and running the command again should run the motors again.

**Screenshots**

```
debian@192.168.8.1's password:
Last login: Fri Mar 1 22:52:19 2019 from 192.168.8.50
➜ ~ rc_test_motors

-d {duty} define a duty cycle from -1.0 to 1.0
-b enable motor brake function
-F {freq} set a custom pwm frequency in HZ, otherwise default 25000 is used
-f enable free spin function
-s {duty} sweep motors back and forward at duty cycle
-m {motor} specify a single motor from 1-4, otherwise all will be driven
motors will be driven equally.
-h print this help message

➜ ~ rc_test_motors -d 1 -m 1
sending duty cycle 1.0000
^C
calling rc_motor_cleanup()

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.337703] Internal error: : 1028 [#1] PREEMPT SMP ARM

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.455580] Process rc_test_motors (pid: 1228, stack limit = 0xdafa82 18)

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.462311] Stack: (0xdafa9e28 to 0xdafaa000)

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.466691] 9e20: dafa9e7c db49be80 00009c40 db49be a0 00000000 00000000

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.474909] 9e40: dafa9e74 dafa9e50 c081b770 c081e234 c1504dc8 000000 00 daaa1794 db49be80

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.483126] 9e60: 00000002 daf48700 dafa9eb4 dafa9e78 c081c008 c081b6 18 00000000 00009c40

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.491343] 9e80: 00000000 00000000 00000000 322c3fc2 00000002 c081bf 60 dc4df780 00000000

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.499560] 9ea0: 00000000 dafa9f68 dafa9ecc dafa9eb8 c092f108 c081bf 6c c092f0e0 dc4df780

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.507777] 9ec0: dafa9ee4 dafa9ed0 c03855c4 c092f0ec 00000002 dc4df7 80 dafa9f1c dafa9ee8

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.515995] 9ee0: c0384c10 c0385580 00000000 00000000 db701d88 c0384b 18 db7c0a80 b6e5caec

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.524211] 9f00: dafa9f68 00000000 b6e5caec 00000002 dafa9f34 dafa9f 20 c02f9258 c0384b24

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.532428] 9f20: 00000002 db7c0a80 dafa9f64 dafa9f38 c02f943c c02f92 3c 00000000 c031bba0

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.540645] 9f40: c1504dc8 db7c0a80 00000000 00000000 db7c0a80 b6e5ca ec dafa9fa4 dafa9f68

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.548862] 9f60: c02f96a4 c02f9394 00000000 00000000 00000002 322c3f c2 00000005 00000003

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.557079] 9f80: 00000002 00000004 00000004 c01090e4 dafa8000 000000 00 00000000 dafa9fa8

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.565296] 9fa0: c0108f00 c02f9654 00000003 00000002 00000003 b6e5ca ec 00000002 b6e7d624

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.573512] 9fc0: 00000003 00000002 00000004 00000004 00000000 000000 00 004b1000 00000000

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.581730] 9fe0: 00000000 bea7a4cc b6e3f14d b6e1e3b6 00010030 000000 03 00000000 00000000

Message from syslogd@scuttle at Mar 1 22:42:44 ...
kernel:[ 408.660303] Code: 03e06003 13e0600c 03a07001 13a07004 (e1d340b0)
[1] 1228 segmentation fault rc_test_motors -d 1 -m 1
```

**Platform information**
Linux version 4.14.71-ti-r80 (root@b2-am57xx-beagle-x15-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Fri Oct 5 23:50 :11 UTC 2018

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.