Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

motor command results in "segmentation fault" #154

Open
dmalawey opened this issue Mar 20, 2019 · 4 comments · May be fixed by #157
Open

motor command results in "segmentation fault" #154

dmalawey opened this issue Mar 20, 2019 · 4 comments · May be fixed by #157

Comments

@dmalawey
Copy link

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

[email protected]'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

@jadonk
Copy link
Member

jadonk commented Mar 26, 2019

Trying to develop a test case for the issue, but I've run into a different one. This is after seeing a segmentation fault.

debian@beaglebone:/var/lib/cloud9$ bash <<EOF
set -x
set -e
while true; do
rc_test_motors -d 0.2 -m 1 &
RC=$!
sleep 1
kill -15 \$RC
sleep 1
done
EOF
+ set -e
+ true
+ RC=
+ sleep 1
+ rc_test_motors -d 0.2 -m 1
ERROR in rc_pwm_init, export failed for subsystem 1 channel 0
tried accessing /sys/class/pwm/pwm-4:0/enable
ERROR in rc_motor_init, failed to initialize pwm subsystem 1
+ kill -15
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]

@jadonk
Copy link
Member

jadonk commented Mar 26, 2019

I'm getting segmentation faults as I try to unload the PWM drivers. See https://gist.github.com/jadonk/8ece4ad83ac67e5215af6a3d686d0ae2 and output of "dmesg | pastebinit" at http://paste.debian.net/1074779/.

debian@beaglebone:/var/lib/cloud9$ sudo ./pwmcleaner.sh
+ set -e
++ ls -d /sys/class/pwm/pwm-4:1
+ FILES=/sys/class/pwm/pwm-4:1
+ for file in $FILES
+ echo Found /sys/class/pwm/pwm-4:1
Found /sys/class/pwm/pwm-4:1
++ echo /sys/class/pwm/pwm-4:1
++ cut -d- -f 2
+ PWM=4:1
++ echo 4:1
++ cut -d: -f 1
+ PWMCHIP=pwmchip4
++ cut -d: -f 2
++ echo 4:1
+ CHANNEL=1
+ echo Disabling pwmchip4 channel 1...
Disabling pwmchip4 channel 1...
+ echo 0
./pwmcleaner.sh: line 11: /sys/class/pwm//sys/class/pwm/pwm-4:1/enable: No such file or directory
debian@beaglebone:/var/lib/cloud9$ sudo ./pwmcleaner.sh
+ set -e
++ ls -d pwm-4:1
+ FILES=pwm-4:1
+ for file in $FILES
+ echo Found pwm-4:1
Found pwm-4:1
++ echo pwm-4:1
++ cut -d- -f 2
+ PWM=4:1
++ echo 4:1
++ cut -d: -f 1
+ PWMCHIP=pwmchip4
++ cut -d: -f 2
++ echo 4:1
+ CHANNEL=1
+ echo Disabling pwmchip4 channel 1...
Disabling pwmchip4 channel 1...
+ echo 0

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.327770] Internal error: : 1028 [#2] PREEMPT SMP ARM

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.446786] Process pwmcleaner.sh (pid: 1696, stack limit = 0xdafbe218)

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.453429] Stack: (0xdafbfe28 to 0xdafc0000)

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.457810] fe20:                   dafbfe7c db422eb0 00009c40 db422ed0 00000000 00000000

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.466028] fe40: dafbfe74 dafbfe50 c081b770 c081e234 c1504dc8 00000000 daadaf94 db422eb0

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.474246] fe60: 00000002 daffa800 dafbfeb4 dafbfe78 c081c008 c081b618 00000000 00009c40

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.482463] fe80: 00000000 00000000 00000000 322c3fc2 00000002 c081bf60 db6e6980 00000000

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.490680] fea0: 00000000 dafbff68 dafbfecc dafbfeb8 c092f108 c081bf6c c092f0e0 db6e6980

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.498898] fec0: dafbfee4 dafbfed0 c03855c4 c092f0ec 00000002 db6e6980 dafbff1c dafbfee8

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.507115] fee0: c0384c10 c0385580 00000000 00000000 db683588 c0384b18 dc4d9600 00926a08

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.515333] ff00: dafbff68 00000000 00926a08 00000002 dafbff34 dafbff20 c02f9258 c0384b24

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.523550] ff20: 00000002 dc4d9600 dafbff64 dafbff38 c02f943c c02f923c dc4d9600 c031bba0

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.531767] ff40: c1504dc8 dc4d9600 00000000 00000000 dc4d9600 00926a08 dafbffa4 dafbff68

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.539984] ff60: c02f96a4 c02f9394 00000000 00000000 c031ba60 322c3fc2 00000000 00000002

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.548202] ff80: 00926a08 b6f69d60 00000004 c01090e4 dafbe000 00000000 00000000 dafbffa8

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.556419] ffa0: c0108f00 c02f9654 00000002 00926a08 00000001 00926a08 00000002 00000000






















[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] 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
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Blue
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] On node 0 totalpages: 130560
[    0.000000] free_area_init_node: node 0, pgdat c15ed180, node_mem_map df961000
[    0.000000]   Normal zone: 1148 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x458 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @df8ff000 s41548 r8192 d23988 u73728
[    0.000000] pcpu-alloc: s41548 r8192 d23988 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
...skipping...
[  817.023735] ehrpwm 48302200.pwm: Removing PWM device without disabling
[  830.743783] ehrpwm 48304200.pwm: Removing PWM device without disabling
[  836.057279] ehrpwm 48304200.pwm: Removing PWM device without disabling
[ 1731.313286] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa30221c
[ 1731.321007] pgd = daf24000
[ 1731.323726] [fa30221c] *pgd=48211452(bad)
[ 1731.327770] Internal error: : 1028 [#2] PREEMPT SMP ARM
[ 1731.333021] Modules linked in: aes_arm_bs crypto_simd cryptd xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 wl18xx wlcore mac80211 bnep cfg80211 hci_uart btqca bluetooth ecdh_generic pruss_soc_bus wlcore_sdio evdev uio_pdrv_genirq uio usb_f_mass_stora
ge iptable_nat nf_conntrack_ipv4 usb_f_acm nf_defrag_ipv4 u_serial nf_nat_ipv4 nf_nat usb_f_ecm nf_conntrack usb_f_rndis u_ether libcomposite iptable_mangle iptable_filter spidev pru_rproc pruss pruss_intc ip_tables x_tables
[ 1731.375419] CPU: 0 PID: 1696 Comm: pwmcleaner.sh Tainted: G      D         4.14.71-ti-r80 #1
[ 1731.383892] Hardware name: Generic AM33XX (Flattened Device Tree)
[ 1731.390012] task: dc13ed00 task.stack: dafbe000
[ 1731.394575] PC is at ehrpwm_pwm_disable+0x38/0xcc
[ 1731.399312] LR is at pwm_apply_state+0x164/0x1c4
[ 1731.403948] pc : [<c081e260>]    lr : [<c081b770>]    psr: 20000013
[ 1731.410241] sp : dafbfe28  ip : dafbfe50  fp : dafbfe4c
[ 1731.415488] r10: db6e6990  r9 : 00000000  r8 : fa302200
[ 1731.420735] r7 : 00000004  r6 : fffffff3  r5 : db422290  r4 : dafbfe7c
[ 1731.427290] r3 : fa30221c  r2 : 00000001  r1 : db422eb0  r0 : db422290
[ 1731.433849] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[ 1731.441015] Control: 10c5387d  Table: 9af24019  DAC: 00000051
[ 1731.446786] Process pwmcleaner.sh (pid: 1696, stack limit = 0xdafbe218)
[ 1731.453429] Stack: (0xdafbfe28 to 0xdafc0000)
[ 1731.457810] fe20:                   dafbfe7c db422eb0 00009c40 db422ed0 00000000 00000000
[ 1731.466028] fe40: dafbfe74 dafbfe50 c081b770 c081e234 c1504dc8 00000000 daadaf94 db422eb0
[ 1731.474246] fe60: 00000002 daffa800 dafbfeb4 dafbfe78 c081c008 c081b618 00000000 00009c40
[ 1731.482463] fe80: 00000000 00000000 00000000 322c3fc2 00000002 c081bf60 db6e6980 00000000
[ 1731.490680] fea0: 00000000 dafbff68 dafbfecc dafbfeb8 c092f108 c081bf6c c092f0e0 db6e6980
Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.564635] ffc0: 00000002 00926a08 b6f69d60 00000004 00926a08 00000002 00000000 00000000

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.572853] ffe0: 00000000 bedd5fec b6ecc1bb b6f08af6 00000030 00000001 00000000 00000000

Message from syslogd@beaglebone at Mar 26 15:42:29 ...
 kernel:[ 1731.651426] Code: 03e06003 13e0600c 03a07001 13a07004 (e1d340b0)
Segmentation fault
debian@beaglebone:/var/lib/cloud9$ dmesg | tail
[ 1731.589657] [<c081b770>] (pwm_apply_state) from [<c081c008>] (enable_store+0xa8/0xd4)
[ 1731.597530] [<c081c008>] (enable_store) from [<c092f108>] (dev_attr_store+0x28/0x34)
[ 1731.605320] [<c092f108>] (dev_attr_store) from [<c03855c4>] (sysfs_kf_write+0x50/0x54)
[ 1731.613279] [<c03855c4>] (sysfs_kf_write) from [<c0384c10>] (kernfs_fop_write+0xf8/0x1d4)
[ 1731.621504] [<c0384c10>] (kernfs_fop_write) from [<c02f9258>] (__vfs_write+0x28/0x48)
[ 1731.629375] [<c02f9258>] (__vfs_write) from [<c02f943c>] (vfs_write+0xb4/0x1c0)
[ 1731.636722] [<c02f943c>] (vfs_write) from [<c02f96a4>] (SyS_write+0x5c/0xbc)
[ 1731.643815] [<c02f96a4>] (SyS_write) from [<c0108f00>] (ret_fast_syscall+0x0/0x54)
[ 1731.651426] Code: 03e06003 13e0600c 03a07001 13a07004 (e1d340b0)
[ 1731.657554] ---[ end trace 9791c21ea393bf4b ]---
debian@beaglebone:/var/lib/cloud9$ dmesg | less

@jadonk
Copy link
Member

jadonk commented Mar 26, 2019

Testing updated kernel:

debian@beaglebone:/var/lib/cloud9$ cd 8ece4ad83ac67e5215af6a3d686d0ae2/
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ ls
pwmcleaner.sh  README.md  thrash_motors.sh
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ sudo ./thrash_motors.sh
[sudo] password for debian:
+ set -e
+ true
+ RC=1143
+ sleep 1
+ rc_test_motors -d 0.2 -m 1
sending duty cycle 0.2000
+ kill -15 1143
+ sleep 1
./thrash_motors.sh: line 10:  1143 Terminated              rc_test_motors -d 0.2 -m 1
+ true
+ RC=1185
+ sleep 1
+ rc_test_motors -d 0.2 -m 1
sending duty cycle 0.2000
+ kill -15 1185
+ sleep 1
./thrash_motors.sh: line 10:  1185 Terminated              rc_test_motors -d 0.2 -m 1
+ true
+ RC=1227
+ sleep 1
+ rc_test_motors -d 0.2 -m 1

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.514745] Internal error: : 1028 [#1] PREEMPT SMP ARM

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.636042] Process rc_test_motors (pid: 1227, stack limit = 0xdaf9e218)

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.642771] Stack: (0xdaf9fe18 to 0xdafa0000)

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.647149] fe00:                                                       00000001 00000000

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.655367] fe20: 00000000 daf9fe7c db492400 c075dbd8 db492420 00000000 00000000 daa14310

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.663585] fe40: daf9fe74 daf9fe50 c075b3b8 c075dbe4 c1504dc8 00000000 db7dc594 db492400

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.671802] fe60: 00000002 dab6d600 daf9feb4 daf9fe78 c075bb08 c075b2a4 00000000 00009c40

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.680020] fe80: 00000000 00000000 00000001 322c3fe2 db63f210 c075ba8c daa14300 00000000

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.688237] fea0: 00000000 daf9ff68 daf9fecc daf9feb8 c086f318 c075ba98 c086f2f0 daa14300

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.696454] fec0: daf9fee4 daf9fed0 c03842a0 c086f2fc 00000002 daa14300 daf9ff1c daf9fee8

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.704671] fee0: c03838ec c038425c 00000000 00000000 db630d88 c03837f4 dc589480 b6ef1aec

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.712888] ff00: daf9ff68 00000000 b6ef1aec 00000002 daf9ff34 daf9ff20 c02f9db4 c0383800

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.721105] ff20: 00000002 dc589480 daf9ff64 daf9ff38 c02f9fb8 c02f9d98 00000000 c031c82c

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.729323] ff40: c1504dc8 dc589480 00000000 00000000 dc589480 b6ef1aec daf9ffa4 daf9ff68

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.737540] ff60: c02fa230 c02f9f10 00000000 00000000 00000002 322c3fe2 00000005 00000001

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.745757] ff80: 0000000a 00000000 00000004 c0108f44 daf9e000 00000004 00000000 daf9ffa8

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.753973] ffa0: c0108d40 c02fa1e0 00000001 0000000a 00000003 b6ef1aec 00000002 b6f12620

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.762190] ffc0: 00000001 0000000a 00000000 00000004 bed7b518 00000005 00000006 00000007

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.770406] ffe0: 00000000 bed7b45c b6ed3c8d b6eb33b6 00070030 00000003 00000000 00000000

Message from syslogd@beaglebone at Mar 26 16:20:45 ...
 kernel:[  182.849601] Code: e5980000 e6ffa07e eb0494a7 e5985028 (e1d570b0)
./thrash_motors.sh: line 10:  1227 Segmentation fault      rc_test_motors -d 0.2 -m 1
+ kill -15 1227
./thrash_motors.sh: line 8: kill: (1227) - No such process
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ dmesg | pastebin
bash: pastebin: command not found
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ dmesg | pastebinit
http://paste.debian.net/1074786/
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$

@jadonk
Copy link
Member

jadonk commented Mar 26, 2019

Verified version 1.0.4 also fails. I'll try some patches to the export/unexport code to see if it can be worked-around.

debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ sudo ./thrash_motors.sh
[sudo] password for debian:
+ set -e
+ true
+ RC=1132
+ sleep 1
+ rc_test_motors -d 0.2 -m 1
sending duty cycle 0.2000
+ kill -15 1132
+ sleep 1
./thrash_motors.sh: line 10:  1132 Terminated              rc_test_motors -d 0.2 -m 1
+ true
+ RC=1174
+ sleep 1
+ rc_test_motors -d 0.2 -m 1
sending duty cycle 0.2000
+ kill -15 1174
+ sleep 1
./thrash_motors.sh: line 10:  1174 Terminated              rc_test_motors -d 0.2 -m 1
+ true
+ RC=1216
+ sleep 1
+ rc_test_motors -d 0.2 -m 1

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.347134] Internal error: : 1028 [#1] PREEMPT SMP ARM

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.468431] Process rc_test_motors (pid: 1216, stack limit = 0xdafa0218)

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.475161] Stack: (0xdafa1e18 to 0xdafa2000)

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.479539] 1e00:                                                       00000001 00000000

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.487757] 1e20: 00000000 dafa1e7c db491900 c075dbd8 db491920 00000000 00000000 db17fb90

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.495974] 1e40: dafa1e74 dafa1e50 c075b3b8 c075dbe4 c1504dc8 00000000 dab10594 db491900

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.504190] 1e60: 00000002 daf71740 dafa1eb4 dafa1e78 c075bb08 c075b2a4 00000000 00009c40

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.512408] 1e80: 00000000 00000000 00000001 322c3fe2 db63e010 c075ba8c db17fb80 00000000

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.520625] 1ea0: 00000000 dafa1f68 dafa1ecc dafa1eb8 c086f318 c075ba98 c086f2f0 db17fb80

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.528842] 1ec0: dafa1ee4 dafa1ed0 c03842a0 c086f2fc 00000002 db17fb80 dafa1f1c dafa1ee8

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.537058] 1ee0: c03838ec c038425c 00000000 00000000 db631d88 c03837f4 dc3b8180 b6f10aec

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.545276] 1f00: dafa1f68 00000000 b6f10aec 00000002 dafa1f34 dafa1f20 c02f9db4 c0383800

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.553494] 1f20: 00000002 dc3b8180 dafa1f64 dafa1f38 c02f9fb8 c02f9d98 00000000 c031c82c

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.561712] 1f40: c1504dc8 dc3b8180 00000000 00000000 dc3b8180 b6f10aec dafa1fa4 dafa1f68

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.569929] 1f60: c02fa230 c02f9f10 00000000 00000000 00000002 322c3fe2 00000005 00000001

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.578146] 1f80: 0000000a 00000000 00000004 c0108f44 dafa0000 00000004 00000000 dafa1fa8

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.586362] 1fa0: c0108d40 c02fa1e0 00000001 0000000a 00000003 b6f10aec 00000002 b6f31620

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.594578] 1fc0: 00000001 0000000a 00000000 00000004 beb97518 00000005 00000006 00000007

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.602795] 1fe0: 00000000 beb9745c b6ef2c8d b6ed23b6 00070030 00000003 00000000 00000000

Message from syslogd@beaglebone at Mar 26 16:33:05 ...
 kernel:[  234.681993] Code: e5980000 e6ffa07e eb0494a7 e5985028 (e1d570b0)
./thrash_motors.sh: line 10:  1216 Segmentation fault      rc_test_motors -d 0.2 -m 1
+ kill -15 1216
./thrash_motors.sh: line 8: kill: (1216) - No such process
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ rc_version
1.0.4
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ uname -a
Linux beaglebone 4.14.103-ti-r100 #1 SMP PREEMPT Tue Mar 26 05:47:51 UTC 2019 armv7l GNU/Linux
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.14.103-ti-r100 (root@w5-imx6q-wandboard-2gb) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP PREEMPT Tue Mar 26 05:47:51 UTC 2019
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] OF: fdt: Machine model: TI AM335x BeagleBone Blue
[    0.000000] Memory policy: Data cache writeback
[    0.000000] efi: Getting EFI parameters from FDT:
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 48 MiB at 0x9c800000
[    0.000000] On node 0 totalpages: 130560
[    0.000000] free_area_init_node: node 0, pgdat c15dc8c0, node_mem_map df961000
[    0.000000]   Normal zone: 1148 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 130560 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon)
[    0.000000] random: get_random_bytes called from start_kernel+0xac/0x458 with crng_init=0
[    0.000000] percpu: Embedded 18 pages/cpu @df8ff000 s41548 r8192 d23988 u73728
[    0.000000] pcpu-alloc: s41548 r8192 d23988 u73728 alloc=18*4096
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129412
[    0.000000] Kernel command line: console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 440364K/522240K available (13312K kernel code, 1081K rwdata, 4232K rodata, 1024K init, 360K bss, 32724K reserved, 49152K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
                   vector  : 0xffff0000 - 0xffff1000   (   4 kB)
                   fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
                   vmalloc : 0xe0000000 - 0xff800000   ( 504 MB)
                   lowmem  : 0xc0000000 - 0xdfe00000   ( 510 MB)
                   pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
                   modules : 0xbf000000 - 0xbfe00000   (  14 MB)
                     .text : 0xc0008000 - 0xc0e00000   (14304 kB)
                     .init : 0xc1400000 - 0xc1500000   (1024 kB)
                     .data : 0xc1500000 - 0xc160e418   (1082 kB)
                      .bss : 0xc16189dc - 0xc1672d80   ( 361 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] ftrace: allocating 40814 entries in 120 pages
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=2 to nr_cpu_ids=1.
[    0.000000]  Tasks RCU enabled.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000023] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000045] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000056] OMAP clocksource: timer1 at 24000000 Hz
[    0.001608] timer_probe: no matching timers found
[    0.001955] Console: colour dummy device 80x30
[    0.001984] WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
[    0.001989] This ensures that you still see kernel messages. Please
[    0.001993] update your kernel commandline.
[    0.002022] Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
[    0.021489] pid_max: default: 32768 minimum: 301
[    0.021762] Security Framework initialized
[    0.021777] Yama: becoming mindful.
[    0.021818] AppArmor: AppArmor disabled by boot time parameter
[    0.021891] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.021902] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.022905] CPU: Testing write buffer coherency: ok
[    0.022979] CPU0: Spectre v2: using BPIALL workaround
[    0.023441] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.037576] Setting up static identity map for 0x80100000 - 0x80100060
[    0.045489] Hierarchical SRCU implementation.
[    0.056621] EFI services will not be available.
[    0.061500] smp: Bringing up secondary CPUs ...
[    0.061515] smp: Brought up 1 node, 1 CPU
[    0.061526] SMP: Total of 1 processors activated (995.32 BogoMIPS).
[    0.061532] CPU: All CPU(s) started in SVC mode.
[    0.063132] devtmpfs: initialized
[    0.093823] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.094296] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.094324] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.098283] xor: measuring software checksum speed
[    0.137476]    arm4regs  :  1210.000 MB/sec
[    0.177464]    8regs     :  1091.000 MB/sec
[    0.217464]    32regs    :  1088.000 MB/sec
[    0.257463]    neon      :  1651.000 MB/sec
[    0.257471] xor: using function: neon (1651.000 MB/sec)
[    0.257486] pinctrl core: initialized pinctrl subsystem
[    0.258729] NET: Registered protocol family 16
[    0.262613] DMA: preallocated 1024 KiB pool for atomic coherent allocations
[    0.335732] omap_hwmod: debugss: _wait_target_disable failed
[    0.376449] cpuidle: using governor menu
[    0.382570] OMAP GPIO hardware version 0.1
[    0.385331] GPIO line 106 (LS_BUF_EN) hogged as output/high
[    0.402377] No ATAGs?
[    0.402397] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.403362] omap4_sram_init:Unable to allocate sram needed to handle errata I688
[    0.403377] omap4_sram_init:Unable to get sram pool needed to handle errata I688
[    0.429619] raid6: using algorithm neonx8 gen() 0 MB/s
[    0.429632] raid6: .... xor() 0 MB/s, rmw enabled
[    0.429639] raid6: using neon recovery algorithm
[    0.437108] edma 49000000.edma: TI EDMA DMA engine driver
[    0.443136] SCSI subsystem initialized
[    0.445634] libata version 3.00 loaded.
[    0.445947] usbcore: registered new interface driver usbfs
[    0.446002] usbcore: registered new interface driver hub
[    0.446115] usbcore: registered new device driver usb
[    0.446896] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.446958] omap_i2c 4802a000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c1_pins, deferring probe
[    0.446997] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[    0.447171] media: Linux media interface: v0.10
[    0.447225] Linux video capture interface: v2.00
[    0.447365] pps_core: LinuxPPS API ver. 1 registered
[    0.447372] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[    0.447392] PTP clock support registered
[    0.447989] omap-mailbox 480c8000.mailbox: omap mailbox rev 0x400
[    0.449772] FPGA manager framework
[    0.449857] Advanced Linux Sound Architecture Driver Initialized.
[    0.450561] NetLabel: Initializing
[    0.450572] NetLabel:  domain hash size = 128
[    0.450576] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    0.450676] NetLabel:  unlabeled traffic allowed by default
[    0.453982] clocksource: Switched to clocksource timer1
[    0.588963] VFS: Disk quotas dquot_6.6.0
[    0.589087] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.601470] NET: Registered protocol family 2
[    0.602534] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.602582] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.602640] TCP: Hash tables configured (established 4096 bind 4096)
[    0.602756] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.602777] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.602993] NET: Registered protocol family 1
[    0.611920] RPC: Registered named UNIX socket transport module.
[    0.611931] RPC: Registered udp transport module.
[    0.611936] RPC: Registered tcp transport module.
[    0.611942] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.612646] Unpacking initramfs...
[    0.871980] Freeing initrd memory: 4584K
[    0.872608] hw perfevents: no interrupt-affinity property for /pmu, guessing.
[    0.872866] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.875049] audit: initializing netlink subsys (disabled)
[    0.876282] audit: type=2000 audit(0.876:1): state=initialized audit_enabled=0 res=1
[    0.876414] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    0.882531] zbud: loaded
[    0.890121] NFS: Registering the id_resolver key type
[    0.890179] Key type id_resolver registered
[    0.890185] Key type id_legacy registered
[    0.890203] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.890601] fuse init (API version 7.26)
[    0.900419] Key type asymmetric registered
[    0.900434] Asymmetric key parser 'x509' registered
[    0.900565] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[    0.904915] io scheduler noop registered
[    0.904926] io scheduler deadline registered
[    0.905209] io scheduler cfq registered (default)
[    0.905219] io scheduler mq-deadline registered
[    0.907568] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.917786] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[    0.919859] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    0.923603] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 30, base_baud = 3000000) is a 8250
[    0.935465] console [ttyS0] enabled
[    0.936579] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 31, base_baud = 3000000) is a 8250
[    0.937545] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 32, base_baud = 3000000) is a 8250
[    0.938756] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 33, base_baud = 3000000) is a 8250
[    0.939743] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 34, base_baud = 3000000) is a 8250
[    0.940742] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 35, base_baud = 3000000) is a 8250
[    0.943884] omap_rng 48310000.rng: Random Number Generator ver. 20
[    0.945003] [drm] Initialized vgem 1.0.0 20120112 for vgem on minor 0
[    0.945106] usbcore: registered new interface driver udl
[    0.951633] eqep 48300180.eqep: ver. 1.0
[    0.951818] eqep 48300180.eqep: count_mode:0
[    0.951828] eqep 48300180.eqep: invert_qa:1
[    0.951837] eqep 48300180.eqep: invert_qb:1
[    0.951845] eqep 48300180.eqep: invert_qi:0
[    0.951854] eqep 48300180.eqep: invert_qs:0
[    0.951862] eqep 48300180.eqep: swap_inputs:0
[    0.951870] eqep 48300180.eqep: QDECCTL:0x0180
[    0.951879] eqep 48300180.eqep: QPOSINIT:0x00000000
[    0.951886] eqep 48300180.eqep: QPOSMAX:0xffffffff
[    0.951893] eqep 48300180.eqep: QPOSCNT:0x00000000
[    0.951902] eqep 48300180.eqep: omit_interrupt:0
[    0.951909] eqep 48300180.eqep: QEINT:0x0800
[    0.951916] eqep 48300180.eqep: QUPRD:0x05f5e100
[    0.951924] eqep 48300180.eqep: QEPCTL:0x009e write
[    0.951931] eqep 48300180.eqep: QEPCTL:0x009e read
[    0.951958] eqep 48300180.eqep: irq:59, clk_rate:100000000
[    0.952270] eqep 48302180.eqep: ver. 1.0
[    0.952389] eqep 48302180.eqep: count_mode:0
[    0.952399] eqep 48302180.eqep: invert_qa:1
[    0.952407] eqep 48302180.eqep: invert_qb:1
[    0.952415] eqep 48302180.eqep: invert_qi:0
[    0.952423] eqep 48302180.eqep: invert_qs:0
[    0.952431] eqep 48302180.eqep: swap_inputs:0
[    0.952438] eqep 48302180.eqep: QDECCTL:0x0180
[    0.952446] eqep 48302180.eqep: QPOSINIT:0x00000000
[    0.952453] eqep 48302180.eqep: QPOSMAX:0xffffffff
[    0.952460] eqep 48302180.eqep: QPOSCNT:0x00000000
[    0.952468] eqep 48302180.eqep: omit_interrupt:0
[    0.952475] eqep 48302180.eqep: QEINT:0x0800
[    0.952482] eqep 48302180.eqep: QUPRD:0x05f5e100
[    0.952489] eqep 48302180.eqep: QEPCTL:0x009e write
[    0.952496] eqep 48302180.eqep: QEPCTL:0x009e read
[    0.952516] eqep 48302180.eqep: irq:61, clk_rate:100000000
[    0.952741] eqep 48304180.eqep: ver. 1.0
[    0.952855] eqep 48304180.eqep: count_mode:0
[    0.952865] eqep 48304180.eqep: invert_qa:1
[    0.952873] eqep 48304180.eqep: invert_qb:1
[    0.952881] eqep 48304180.eqep: invert_qi:0
[    0.952889] eqep 48304180.eqep: invert_qs:0
[    0.952897] eqep 48304180.eqep: swap_inputs:0
[    0.952903] eqep 48304180.eqep: QDECCTL:0x0180
[    0.952911] eqep 48304180.eqep: QPOSINIT:0x00000000
[    0.952918] eqep 48304180.eqep: QPOSMAX:0xffffffff
[    0.952925] eqep 48304180.eqep: QPOSCNT:0x00000000
[    0.952933] eqep 48304180.eqep: omit_interrupt:0
[    0.952940] eqep 48304180.eqep: QEINT:0x0800
[    0.952947] eqep 48304180.eqep: QUPRD:0x05f5e100
[    0.952954] eqep 48304180.eqep: QEPCTL:0x009e write
[    0.952960] eqep 48304180.eqep: QEPCTL:0x009e read
[    0.952978] eqep 48304180.eqep: irq:63, clk_rate:100000000
[    0.965275] libphy: Fixed MDIO Bus: probed
[    0.966296] CAN device driver interface
[    0.967715] c_can_platform 481d0000.can: c_can_platform device registered (regs=fa1d0000, irq=43)
[    0.970518] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.970612] ehci-platform: EHCI generic platform driver
[    0.970918] ehci-omap: OMAP-EHCI Host Controller driver
[    0.971663] usbcore: registered new interface driver usb-storage
[    0.974756] am335x-phy-driver 47401300.usb-phy: 47401300.usb-phy supply vcc not found, using dummy regulator
[    0.977928] am335x-phy-driver 47401b00.usb-phy: 47401b00.usb-phy supply vcc not found, using dummy regulator
[    0.982342] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[    0.982387] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 1
[    0.982760] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    0.982772] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    0.982781] usb usb1: Product: MUSB HDRC host driver
[    0.982789] usb usb1: Manufacturer: Linux 4.14.103-ti-r100 musb-hcd
[    0.982797] usb usb1: SerialNumber: musb-hdrc.1
[    0.983630] hub 1-0:1.0: USB hub found
[    0.983702] hub 1-0:1.0: 1 port detected
[    0.994931] omap_rtc 44e3e000.rtc: already running
[    0.995692] omap_rtc 44e3e000.rtc: registered as rtc0
[    0.996829] i2c /dev entries driver
[    0.997324] Driver for 1-wire Dallas network protocol.
[    1.000325] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
[    1.000856] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[    1.002288] cpuidle: enable-method property 'ti,am3352' found operations
[    1.003007] sdhci: Secure Digital Host Controller Interface driver
[    1.003014] sdhci: Copyright(c) Pierre Ossman
[    1.003655] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.042424] random: fast init done
[    1.077274] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.079114] mmc0: Problem switching card into high-speed mode!
[    1.079211] mmc0: new SDHC card at address 0001
[    1.080144] mmcblk0: mmc0:0001 SD 7.44 GiB
[    1.083925]  mmcblk0: p1
[    1.138493] mmc1: new high speed MMC card at address 0001
[    1.139480] mmcblk1: mmc1:0001 S10004 3.56 GiB
[    1.139931] mmcblk1boot0: mmc1:0001 S10004 partition 1 4.00 MiB
[    1.140341] mmcblk1boot1: mmc1:0001 S10004 partition 2 4.00 MiB
[    1.140715] mmcblk1rpmb: mmc1:0001 S10004 partition 3 4.00 MiB
[    1.141945]  mmcblk1: p1
[    1.202550] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.205723] ledtrig-cpu: registered to indicate activity on CPUs
[    1.207553] omap-aes 53500000.aes: OMAP AES hw accel rev: 3.2
[    1.209891] omap-aes 53500000.aes: will run requests pump with realtime priority
[    1.210616] omap_hsmmc 47810000.mmc: card claims to support voltages below defined range
[    1.212588] omap-sham 53100000.sham: hw accel on OMAP rev 4.3
[    1.216376] hidraw: raw HID events driver (C) Jiri Kosina
[    1.217266] usbcore: registered new interface driver usbhid
[    1.217274] usbhid: USB HID core driver
[    1.217741] remoteproc remoteproc0: wkup_m3 is available
[    1.227587] mmc2: new high speed SDIO card at address 0001
[    1.231069] wireguard: WireGuard 0.0.20190227 loaded. See www.wireguard.com for information.
[    1.231079] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
[    1.232039] NET: Registered protocol family 10
[    1.237494] Segment Routing with IPv6
[    1.237575] mip6: Mobile IPv6
[    1.237594] NET: Registered protocol family 17
[    1.237612] can: controller area network core (rev 20170425 abi 9)
[    1.237700] NET: Registered protocol family 29
[    1.237819] Key type dns_resolver registered
[    1.237826] mpls_gso: MPLS GSO support
[    1.238207] omap_voltage_late_init: Voltage driver support not added
[    1.245066] PM: Cannot get wkup_m3_ipc handle
[    1.249819] ThumbEE CPU extension supported.
[    1.249846] Registering SWP/SWPB emulation handler
[    1.250891] registered taskstats version 1
[    1.251027] zswap: loaded using pool lzo/zbud
[    1.253531] Btrfs loaded, crc32c=crc32c-generic
[    1.253627] ima: No TPM chip found, activating TPM-bypass! (rc=-19)
[    1.253651] ima: Allocated hash algorithm: sha256
[    1.300069] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[    1.300697] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.301203] at24 0-0050: 32768 byte 24c256 EEPROM, writable, 1 bytes/write
[    1.301319] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.303142] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz
[    1.304767] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz
[    1.306573] remoteproc remoteproc0: powering up wkup_m3
[    1.306691] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217168
[    1.310309] remoteproc remoteproc0: remote processor wkup_m3 is now up
[    1.310329] wkup_m3_ipc 44e11324.wkup_m3_ipc: CM3 Firmware Version = 0x193
[    1.313368] PM: bootloader does not support rtc-only!
[    1.314684] omap_rtc 44e3e000.rtc: setting system clock to 2019-03-26 16:29:11 UTC (1553617751)
[    1.314701] of_cfs_init
[    1.314872] of_cfs_init: OK
[    1.316013] wlan-en-regulator: disabling
[    1.316032] ALSA device list:
[    1.316038]   No soundcards found.
[    1.322899] Freeing unused kernel memory: 1024K
[    1.781233] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.781943] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    1.786407] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    5.668549] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
[    6.839701] ip_tables: (C) 2000-2006 Netfilter Core Team
[    6.903662] systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
[    6.904435] systemd[1]: Detected architecture arm.
[    6.906975] systemd[1]: Set hostname to <beaglebone>.
[    7.755699] systemd[1]: Created slice System Slice.
[    7.756710] systemd[1]: Listening on Journal Socket (/dev/log).
[    7.756945] systemd[1]: Reached target Remote File Systems.
[    7.762441] systemd[1]: Mounting POSIX Message Queue File System...
[    7.762740] systemd[1]: Reached target Swap.
[    7.763370] systemd[1]: Listening on fsck to fsckd communication Socket.
[    7.765021] systemd[1]: Created slice User and Session Slice.
[    8.131037] pruss 4a300000.pruss: creating PRU cores and other child platform devices
[    8.151951] remoteproc remoteproc1: 4a334000.pru is available
[    8.152072] pru-rproc 4a334000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@34000 probed successfully
[    8.174581] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[    8.181445] remoteproc remoteproc2: 4a338000.pru is available
[    8.181566] pru-rproc 4a338000.pru: PRU rproc node /ocp/pruss_soc_bus@4a326004/pruss@0/pru@38000 probed successfully
[    9.314776] systemd-journald[314]: Received request to flush runtime journal from PID 1
[   14.942488] nf_conntrack version 0.5.0 (8192 buckets, 32768 max)
[   16.944859] random: crng init done
[   16.944885] random: 7 urandom warning(s) missed due to ratelimiting
[   17.731380] using random self ethernet address
[   17.731400] using random host ethernet address
[   17.898516] using random self ethernet address
[   17.898535] using random host ethernet address
[   18.348178] Mass Storage Function, version: 2009/09/11
[   18.348202] LUN: removable file: (no medium)
[   18.816950] usb0: HOST MAC 50:65:83:e2:cd:77
[   18.822163] usb0: MAC 50:65:83:e2:cd:78
[   18.832465] usb1: HOST MAC 50:65:83:e2:cd:7a
[   18.834686] usb1: MAC 50:65:83:e2:cd:7b
[   19.580055] IPv6: ADDRCONF(NETDEV_UP): usb0: link is not ready
[   19.765104] IPv6: ADDRCONF(NETDEV_UP): usb1: link is not ready
[   30.538717] pvrsrvkm: loading out-of-tree module taints kernel.
[   31.044932] [drm] Initialized pvr 1.14.3699939 20110701 for 56000000.sgx on minor 1
[   35.441148] Bluetooth: Core ver 2.22
[   35.441384] NET: Registered protocol family 31
[   35.441394] Bluetooth: HCI device and connection manager initialized
[   35.441424] Bluetooth: HCI socket layer initialized
[   35.441442] Bluetooth: L2CAP socket layer initialized
[   35.441496] Bluetooth: SCO socket layer initialized
[   35.526341] Bluetooth: HCI UART driver ver 2.3
[   35.526362] Bluetooth: HCI UART protocol H4 registered
[   35.526608] Bluetooth: HCI UART protocol LL registered
[   35.526617] Bluetooth: HCI UART protocol ATH3K registered
[   35.526623] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   35.526629] Bluetooth: HCI UART protocol QCA registered
[   35.663462] wlcore: wl18xx HW: 183x or 180x, PG 2.2 (ROM 0x11)
[   35.693492] wlcore: loaded
[   36.026348] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   36.026364] Bluetooth: BNEP filters: protocol multicast
[   36.026399] Bluetooth: BNEP socket layer initialized
[   36.235863] wlcore: PHY firmware version: Rev 8.2.0.0.236
[   36.283068] wlcore: firmware booted (Rev 8.9.0.0.69)
[   36.303671] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   37.515192] wlan0: authenticate with 00:90:a9:cc:2b:e1
[   37.528236] wlan0: send auth to 00:90:a9:cc:2b:e1 (try 1/3)
[   37.556994] wlan0: authenticated
[   37.562711] wlan0: associate with 00:90:a9:cc:2b:e1 (try 1/3)
[   37.567866] wlan0: RX AssocResp from 00:90:a9:cc:2b:e1 (capab=0x431 status=0 aid=2)
[   37.590830] wlan0: associated
[   37.907869] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   37.930410] wlcore: Association completed.
[   38.592282] IPv6: ADDRCONF(NETDEV_UP): SoftAp0: link is not ready
[   40.799138] wlcore: down
[   41.073773] IPv6: ADDRCONF(NETDEV_CHANGE): SoftAp0: link becomes ready
[  232.252067] ehrpwm 48302200.pwm: Removing PWM device without disabling
[  232.252289] ehrpwm 48302200.pwm: Removing PWM device without disabling
[  232.261878] ehrpwm 48304200.pwm: Removing PWM device without disabling
[  232.267782] ehrpwm 48304200.pwm: Removing PWM device without disabling
[  234.320777] ehrpwm 48302200.pwm: Removing PWM device without disabling
[  234.321001] ehrpwm 48302200.pwm: Removing PWM device without disabling
[  234.332647] Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa302200
[  234.340370] pgd = dc564000
[  234.343089] [fa302200] *pgd=48211452(bad)
[  234.347134] Internal error: : 1028 [#1] PREEMPT SMP ARM
[  234.352384] Modules linked in: xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 aes_arm_bs crypto_simd cryptd bnep hci_uart btqca bluetooth wl18xx ecdh_generic wlcore mac80211 cfg80211 pvrsrvkm(O) wlcore_sdio evdev usb_f_mass_storage usb_f_acm u_serial usb_f_ecm usb_f_rndis u_ether libcomposite iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_filter uio_pdrv_genirq uio spidev pruss_soc_bus pru_rproc pruss pruss_intc ip_tables x_tables
[  234.395834] CPU: 0 PID: 1216 Comm: rc_test_motors Tainted: G           O    4.14.103-ti-r100 #1
[  234.404569] Hardware name: Generic AM33XX (Flattened Device Tree)
[  234.410689] task: d1848780 task.stack: dafa0000
[  234.415259] PC is at ehrpwm_pwm_config+0x1b0/0x2e0
[  234.420087] LR is at _raw_spin_unlock_irqrestore+0x38/0x64
[  234.425595] pc : [<c075dd88>]    lr : [<c0cfcf48>]    psr: 60070013
[  234.431888] sp : dafa1e18  ip : dafa1de8  fp : dafa1e4c
[  234.437135] r10: 00000000  r9 : db491900  r8 : db491690
[  234.442383] r7 : 00000001  r6 : 00000001  r5 : fa302200  r4 : 00000fa0
[  234.448938] r3 : 00000000  r2 : 00000000  r1 : 40070013  r0 : 00000000
[  234.455494] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  234.462661] Control: 10c5387d  Table: 9c564019  DAC: 00000051
[  234.468431] Process rc_test_motors (pid: 1216, stack limit = 0xdafa0218)
[  234.475161] Stack: (0xdafa1e18 to 0xdafa2000)
[  234.479539] 1e00:                                                       00000001 00000000
[  234.487757] 1e20: 00000000 dafa1e7c db491900 c075dbd8 db491920 00000000 00000000 db17fb90
[  234.495974] 1e40: dafa1e74 dafa1e50 c075b3b8 c075dbe4 c1504dc8 00000000 dab10594 db491900
[  234.504190] 1e60: 00000002 daf71740 dafa1eb4 dafa1e78 c075bb08 c075b2a4 00000000 00009c40
[  234.512408] 1e80: 00000000 00000000 00000001 322c3fe2 db63e010 c075ba8c db17fb80 00000000
[  234.520625] 1ea0: 00000000 dafa1f68 dafa1ecc dafa1eb8 c086f318 c075ba98 c086f2f0 db17fb80
[  234.528842] 1ec0: dafa1ee4 dafa1ed0 c03842a0 c086f2fc 00000002 db17fb80 dafa1f1c dafa1ee8
[  234.537058] 1ee0: c03838ec c038425c 00000000 00000000 db631d88 c03837f4 dc3b8180 b6f10aec
[  234.545276] 1f00: dafa1f68 00000000 b6f10aec 00000002 dafa1f34 dafa1f20 c02f9db4 c0383800
[  234.553494] 1f20: 00000002 dc3b8180 dafa1f64 dafa1f38 c02f9fb8 c02f9d98 00000000 c031c82c
[  234.561712] 1f40: c1504dc8 dc3b8180 00000000 00000000 dc3b8180 b6f10aec dafa1fa4 dafa1f68
[  234.569929] 1f60: c02fa230 c02f9f10 00000000 00000000 00000002 322c3fe2 00000005 00000001
[  234.578146] 1f80: 0000000a 00000000 00000004 c0108f44 dafa0000 00000004 00000000 dafa1fa8
[  234.586362] 1fa0: c0108d40 c02fa1e0 00000001 0000000a 00000003 b6f10aec 00000002 b6f31620
[  234.594578] 1fc0: 00000001 0000000a 00000000 00000004 beb97518 00000005 00000006 00000007
[  234.602795] 1fe0: 00000000 beb9745c b6ef2c8d b6ed23b6 00070030 00000003 00000000 00000000
[  234.611029] [<c075dd88>] (ehrpwm_pwm_config) from [<c075b3b8>] (pwm_apply_state+0x120/0x1c4)
[  234.619511] [<c075b3b8>] (pwm_apply_state) from [<c075bb08>] (duty_cycle_store+0x7c/0xb0)
[  234.627740] [<c075bb08>] (duty_cycle_store) from [<c086f318>] (dev_attr_store+0x28/0x34)
[  234.635881] [<c086f318>] (dev_attr_store) from [<c03842a0>] (sysfs_kf_write+0x50/0x54)
[  234.643840] [<c03842a0>] (sysfs_kf_write) from [<c03838ec>] (kernfs_fop_write+0xf8/0x1d4)
[  234.652068] [<c03838ec>] (kernfs_fop_write) from [<c02f9db4>] (__vfs_write+0x28/0x48)
[  234.659939] [<c02f9db4>] (__vfs_write) from [<c02f9fb8>] (vfs_write+0xb4/0x1c0)
[  234.667287] [<c02f9fb8>] (vfs_write) from [<c02fa230>] (SyS_write+0x5c/0xbc)
[  234.674381] [<c02fa230>] (SyS_write) from [<c0108d40>] (ret_fast_syscall+0x0/0x54)
[  234.681993] Code: e5980000 e6ffa07e eb0494a7 e5985028 (e1d570b0)
[  234.688119] ---[ end trace be0b29146c9dec19 ]---
debian@beaglebone:/var/lib/cloud9/8ece4ad83ac67e5215af6a3d686d0ae2$

jadonk pushed a commit to jadonk/librobotcontrol that referenced this issue Mar 27, 2019
The kernel complains that the PWM is not stopped ahead of being
unexported. This may or may not be the case, but in any case,
this helps avoid the kernel issue.

Fixes beagleboard#154
@jadonk jadonk linked a pull request Mar 27, 2019 that will close this issue
RobertCNelson pushed a commit to rcn-ee/librobotcontrol that referenced this issue Mar 27, 2019
The kernel complains that the PWM is not stopped ahead of being
unexported. This may or may not be the case, but in any case,
this helps avoid the kernel issue.

Fixes beagleboard#154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants