User avatar
stefanv
Posts: 36
Joined: Wed Oct 19, 2016 12:08 pm
Location: Ontario, Canada
Contact: Website

Bad interaction between i2c-rtc overlay and Chromium

Fri Jun 09, 2017 1:58 am

I'm posting this in case it saves anyone else some grief.

I recently put together a RPi 3 system running Jessie, and added one of those $2 DS1307-based RTC modules from eBay. I found various instructions on-line on how to configure it, generally involving enabling I2C, loading some modules in /etc/modules, and then activating the hardware clock and setting the software clock from the hardware clock in /etc/rc.local. This worked fine.

After some more research, I discovered that this was no longer the "right" way to do it in Jessie, and that instead I should just add,

Code: Select all

dtoverlay=i2c-rtc,ds1307
to /boot/config.txt, comment out some lines in /lib/udev/hwclock-set, and of course undo the pre-Jessie setup I had been using. This also worked. But ...

I started having problems that running Chromium would freeze the system in a very strange way. All open application windows could still be manipulated, and I could still type in any open terminal windows, but attempting to launch a new application or actually run a (non-bash-builtin) command in the terminal window resulted in no response. It wasn't even possible to do a proper shutdown.

After some sleuthing around in /var/log/syslog, I came across instances of this exactly at each of the three times that this happened:

Code: Select all

Jun  8 18:18:53 blueberry kernel: [38211.457000] Internal error: Oops: 5 [#1] SMP ARM
Jun  8 18:18:53 blueberry kernel: [38211.457009] Modules linked in: sg hidp bnep hci_uart btbcm bluetooth binfmt_misc snd_usb_audio snd_hwdep rtc_ds1307 hwmon snd_usbmidi_lib snd_rawmidi snd_seq_device evdev joy
Jun  8 18:18:53 blueberry kernel: [38211.457093] CPU: 2 PID: 6939 Comm: Chrome_FileThre Not tainted 4.9.24-v7+ #993
Jun  8 18:18:53 blueberry kernel: [38211.457098] Hardware name: BCM2835
Jun  8 18:18:53 blueberry kernel: [38211.457104] task: b8e0bb00 task.stack: a8d28000
Jun  8 18:18:53 blueberry kernel: [38211.457120] PC is at kernfs_find_ns+0x88/0x108
Jun  8 18:18:53 blueberry kernel: [38211.457127] LR is at kernfs_name_hash+0x20/0x78
Jun  8 18:18:53 blueberry kernel: [38211.457135] pc : [<802e9b20>]    lr : [<802e9070>]    psr: 20000013
Jun  8 18:18:53 blueberry kernel: [38211.457135] sp : a8d29d98  ip : a8d29d80  fp : a8d29dbc
Jun  8 18:18:53 blueberry kernel: [38211.457142] r10: 00000000  r9 : a8d29e78  r8 : 00004000
Jun  8 18:18:53 blueberry kernel: [38211.457148] r7 : 00000000  r6 : a036479c  r5 : 20b46d4a  r4 : 38e58d10
Jun  8 18:18:53 blueberry kernel: [38211.457154] r3 : 00e58d00  r2 : 00000073  r1 : 20b46d4a  r0 : 20b46d4a
Jun  8 18:18:53 blueberry kernel: [38211.457161] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Jun  8 18:18:53 blueberry kernel: [38211.457167] Control: 10c5383d  Table: 2d9a406a  DAC: 00000055
Jun  8 18:18:53 blueberry kernel: [38211.457172] Process Chrome_FileThre (pid: 6939, stack limit = 0xa8d28210)
Jun  8 18:18:53 blueberry kernel: [38211.457179] Stack: (0xa8d29d98 to 0xa8d2a000)
Jun  8 18:18:53 blueberry kernel: [38211.457185] 9d80:                                                       a8d29dbc a8d29da8
Jun  8 18:18:53 blueberry kernel: [38211.457194] 9da0: b9a4ffa0 a0364770 b97a85a0 b96fb110 a8d29ddc a8d29dc0 802e9c50 802e9aa4
Jun  8 18:18:53 blueberry kernel: [38211.457202] 9dc0: 802e9bf8 a0364770 b97a85a0 b97a8610 a8d29e1c a8d29de0 8027ac88 802e9c04
Jun  8 18:18:53 blueberry kernel: [38211.457210] 9de0: a8d29dfc 00000000 a8d29de8 a8d29de8 a8d29e4c 00000000 00000000 a8d29e70
Jun  8 18:18:53 blueberry kernel: [38211.457218] 9e00: 00004000 a8d29f60 a8d28000 00000400 a8d29e4c a8d29e20 8027e234 8027abfc
Jun  8 18:18:53 blueberry kernel: [38211.457226] 9e20: 8027cdfc a8d29e70 a8c32000 a8d29f60 a8d29e70 00000000 a8d29f60 00004000
Jun  8 18:18:53 blueberry kernel: [38211.457235] 9e40: a8d29e6c a8d29e50 8027e8a4 8027e03c 00000000 00004000 a8c32000 a8d29e70
Jun  8 18:18:53 blueberry kernel: [38211.457243] 9e60: a8d29f1c a8d29e70 80280040 8027e840 b920d6d0 b96fb110 9125a3bf 00000009
Jun  8 18:18:53 blueberry kernel: [38211.457252] 9e80: a8c32045 0db5857f b9177310 b9647660 b97a85a0 00004000 802e87f0 000004f8
Jun  8 18:18:53 blueberry kernel: [38211.457260] 9ea0: 00000000 00000000 00000000 a8d29eb0 00000000 00000c8a 000081a4 a8c35000
Jun  8 18:18:53 blueberry kernel: [38211.457268] 9ec0: 00000000 00004000 ffffff9c a8c32000 ffffff9c 6d435818 a8d29f5c 00004000
Jun  8 18:18:53 blueberry kernel: [38211.457276] 9ee0: a8c32000 00000000 8027fd74 00000002 ffffff9c 00004000 ffffff9c 00004000
Jun  8 18:18:53 blueberry kernel: [38211.457284] 9f00: ffffff9c a8d29f60 6d435818 a8d29f5c a8d29f44 a8d29f20 80280184 8027ffb0
Jun  8 18:18:53 blueberry kernel: [38211.457293] 9f20: 00000000 80108244 a8d28000 6d435818 00004000 ffffff9c a8d29f94 a8d29f48
Jun  8 18:18:53 blueberry kernel: [38211.457301] 9f40: 802759e0 80280140 a8d29f5c a8d281a4 00000001 6d435c18 00000000 00000000
Jun  8 18:18:53 blueberry kernel: [38211.457310] 9f60: 00001000 00000000 00000002 6d435818 6d435c18 6d436030 00000055 80108244
Jun  8 18:18:53 blueberry kernel: [38211.457318] 9f80: a8d28000 00000000 a8d29fa4 a8d29f98 80275aa4 80275998 00000000 a8d29fa8
Jun  8 18:18:53 blueberry kernel: [38211.457326] 9fa0: 801080c0 80275a84 6d435818 6d435c18 6d435818 6d435c18 00000400 6d43580c
Jun  8 18:18:53 blueberry kernel: [38211.457335] 9fc0: 6d435818 6d435c18 6d436030 00000055 6d436440 5c818170 00000000 6d4362b0
Jun  8 18:18:53 blueberry kernel: [38211.457343] 9fe0: 686c9ec4 6d43580c 686b0ef0 7589b26c 60000010 6d435818 55555555 55555555
Jun  8 18:18:53 blueberry kernel: [38211.457375] [<802e9b20>] (kernfs_find_ns) from [<802e9c50>] (kernfs_iop_lookup+0x58/0xb4)
Jun  8 18:18:53 blueberry kernel: [38211.457393] [<802e9c50>] (kernfs_iop_lookup) from [<8027ac88>] (lookup_slow+0x98/0x158)
Jun  8 18:18:53 blueberry kernel: [38211.457408] [<8027ac88>] (lookup_slow) from [<8027e234>] (walk_component+0x204/0x2d4)
Jun  8 18:18:53 blueberry kernel: [38211.457420] [<8027e234>] (walk_component) from [<8027e8a4>] (path_lookupat+0x70/0x114)
Jun  8 18:18:53 blueberry kernel: [38211.457430] [<8027e8a4>] (path_lookupat) from [<80280040>] (filename_lookup+0x9c/0xf8)
Jun  8 18:18:53 blueberry kernel: [38211.457441] [<80280040>] (filename_lookup) from [<80280184>] (user_path_at_empty+0x50/0x58)
Jun  8 18:18:53 blueberry kernel: [38211.457456] [<80280184>] (user_path_at_empty) from [<802759e0>] (SyS_readlinkat+0x54/0xec)
Jun  8 18:18:53 blueberry kernel: [38211.457469] [<802759e0>] (SyS_readlinkat) from [<80275aa4>] (SyS_readlink+0x2c/0x30)
Jun  8 18:18:53 blueberry kernel: [38211.457485] [<80275aa4>] (SyS_readlink) from [<801080c0>] (ret_fast_syscall+0x0/0x1c)
Jun  8 18:18:53 blueberry kernel: [38211.457498] Code: aa00000c e5944008 e3540000 0a000006 (e5943010)
Jun  8 18:18:53 blueberry kernel: [38211.457541] ---[ end trace 0cdefd2a6156a927 ]---
Notice the Chrome_FileThre mentioned on the 4th line.

Anyway, I searched the forum for similar issues, and most of those involved bad power supplies or cables, which I was sure wasn't the problem here. I carefully reviewed what I'd done in the last few days, and concluded that the RTC changes were the only changes I'd made to the system. I undid the changes and reverted things to the pre-Jessie way of doing things, and the problem has gone away.

I don't know if the bug is in Chromium or in the device tree overlay. I'll leave that to the RPi kernel developers to track down.
Stefan Vorkoetter: Programmer, hobbyist, amateur watchmaker, pilot, and collector of fountain pens, slide rules, calculators, and watches.

Return to “Troubleshooting”