1 |
On Tue, 15 Aug 2017 14:07:42 +0200 Håkon Alstadheim wrote: |
2 |
> I'm getting some noise in my logs when shutting down bcache. |
3 |
> My system: |
4 |
> Linux gentoo 4.12.7-gentoo #1 SMP Sun Aug 13 22:56:20 CEST 2017 x86_64 |
5 |
> Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz GenuineIntel GNU/Linux |
6 |
> Running as dom0 under Xen-4.9.0 |
7 |
> |
8 |
> My shutdown script loops over the bcache devices like so: |
9 |
> --- |
10 |
> for f in /sys/fs/bcache/854fc80e-5499-413f-b90b-87a803eaca7e/bdev*; do |
11 |
> bdev=$(basename $f ) |
12 |
> if [ -e $f/stop ]; then |
13 |
> logger -t "init.d/probe-home-partition" -p daemon.warning\ |
14 |
> "Stopping $bdev" |
15 |
> einfo "Stopping $bdev" |
16 |
> if ! echo 1 > $f/stop ; then |
17 |
> ewarn "Could not stop $bdev" |
18 |
> logger -t "init.d/probe-home-partition" -p daemon.warning\ |
19 |
> "Could not stop $bdev" |
20 |
> fi |
21 |
> usleep 300 |
22 |
> sleep 1 |
23 |
> else |
24 |
> einfo "$bdev not cached?" |
25 |
> logger -t "init.d/probe-home-partition" -p daemon.warning \ |
26 |
> "$bdev not cached ?" |
27 |
> fi |
28 |
> done |
29 |
> |
30 |
> ----- |
31 |
> This gives me in daemon.log: |
32 |
> ----- |
33 |
> Aug 14 09:31:21 gentoo init.d/probe-home-partition: Stopping bdev15 |
34 |
> Aug 14 09:31:22 gentoo init.d/probe-home-partition: Stopping bdev16 |
35 |
> Aug 14 09:31:23 gentoo init.d/probe-home-partition: Stopping bdev17 |
36 |
> Aug 14 09:31:24 gentoo init.d/probe-home-partition: Stopping bdev18 |
37 |
> Aug 14 09:31:25 gentoo init.d/probe-home-partition: Stopping bdev19 |
38 |
> Aug 14 09:31:26 gentoo init.d/probe-home-partition: Stopping cache set |
39 |
> ----- |
40 |
> But it seems bcache is doing something weird, stopping a device called |
41 |
> bcache0, which I do not have, before stopping the first of my bcache |
42 |
> devices. ALL runs of "echo 1 > $device/stop" provoke a warning in |
43 |
> lib/idr.c on that same line. It may be that my stopping of the bcache |
44 |
> devices is wrong, un-necessary and misguided, but it should still work |
45 |
> the way I am doing it, should it not? |
46 |
> |
47 |
> |
48 |
> ---kern.log:--- |
49 |
> ... |
50 |
> [140395.421994] nfsd: last server has exited, flushing export cache |
51 |
> [140397.011932] XFS (bcache16): Unmounting Filesystem |
52 |
> [140397.248911] bcache: bcache_device_free() bcache0 stopped |
53 |
> [140398.300187] bcache: bcache_device_free() bcache16 stopped |
54 |
> [140398.381951] ida_remove called for id=16 which is not allocated. |
55 |
> [140398.381975] ------------[ cut here ]------------ |
56 |
> [140398.381985] WARNING: CPU: 1 PID: 4378 at lib/idr.c:383 |
57 |
> ida_remove+0xde/0xef |
58 |
> [140398.381987] Modules linked in: xt_physdev iptable_filter ip_tables |
59 |
> x_tables nfsd auth_rpcgss oid_registry nfsv4 dns_resolver nfsv3 nfs_acl |
60 |
> iTCO_wdt iTCO_vendor_support binfmt_misc tun usbip_host usbip_core |
61 |
> pktcdvd xen_wdt xen_blkback intel_rapl amdgpu intel_powerclamp |
62 |
> crc32c_intel serio_raw drm_kms_helper pcspkr syscopyarea sysfillrect |
63 |
> sysimgblt fb_sys_fops ttm lpc_ich i2c_i801 snd_hda_codec_realtek drm |
64 |
> snd_hda_codec_generic bcache snd_usb_audio snd_usbmidi_lib snd_hda_intel |
65 |
> snd_rawmidi snd_hda_codec snd_seq_device snd_hwdep snd_hda_core snd_pcm |
66 |
> snd_timer snd cp210x usbserial nct6775 input_leds hwmon_vid shpchp |
67 |
> ipmi_ssif wmi acpi_power_meter dm_zero dm_thin_pool dm_persistent_data |
68 |
> dm_bio_prison dm_service_time dm_round_robin dm_queue_length |
69 |
> dm_multipath dm_log_userspace cn virtio_pci virtio_scsi |
70 |
> [140398.382056] virtio_blk virtio_console virtio_balloon xts aes_x86_64 |
71 |
> cbc sha512_generic sha1_generic libiscsi scsi_transport_iscsi macvlan |
72 |
> virtio_net virtio_ring virtio e1000 fuse overlay nfs lockd grace sunrpc |
73 |
> fscache jfs multipath linear raid10 raid1 raid0 dm_raid raid456 |
74 |
> async_raid6_recov async_memcpy async_pq async_xor xor async_tx raid6_pq |
75 |
> dm_snapshot dm_bufio dm_crypt dm_mirror dm_region_hash dm_log dm_mod dax |
76 |
> hid_sunplus hid_sony hid_samsung hid_pl hid_petalynx hid_monterey |
77 |
> hid_microsoft hid_logitech ff_memless hid_gyration hid_ezkey hid_cypress |
78 |
> hid_chicony hid_cherry hid_a4tech sl811_hcd xhci_plat_hcd ohci_pci |
79 |
> ohci_hcd uhci_hcd aic94xx lpfc qla2xxx aacraid sx8 DAC960 hpsa cciss |
80 |
> 3w_9xxx 3w_xxxx mptsas mptfc scsi_transport_fc mptspi mptscsih mptbase |
81 |
> atp870u dc395x qla1280 imm parport dmx3191d |
82 |
> [140398.382139] sym53c8xx gdth initio BusLogic arcmsr aic7xxx aic79xx |
83 |
> sg pdc_adma sata_inic162x sata_mv sata_qstor sata_vsc sata_uli sata_sis |
84 |
> sata_sx4 sata_nv sata_via sata_svw sata_sil24 sata_sil sata_promise |
85 |
> pata_sis usbhid led_class igb ptp dca i2c_algo_bit ehci_pci ehci_hcd |
86 |
> xhci_pci megaraid_sas xhci_hcd |
87 |
> [140398.382175] CPU: 1 PID: 4378 Comm: kworker/1:2 Not tainted |
88 |
> 4.12.6-gentoo #1 |
89 |
> [140398.382177] Hardware name: ASUSTeK COMPUTER INC. Z10PE-D8 |
90 |
> WS/Z10PE-D8 WS, BIOS 3407 03/10/2017 |
91 |
> [140398.382190] Workqueue: events cached_dev_free [bcache] |
92 |
> [140398.382193] task: ffff880216b24240 task.stack: ffffc900431e4000 |
93 |
> [140398.382197] RIP: e030:ida_remove+0xde/0xef |
94 |
> [140398.382199] RSP: e02b:ffffc900431e7db0 EFLAGS: 00010082 |
95 |
> [140398.382202] RAX: 0000000000000033 RBX: 0000000000000012 RCX: |
96 |
> 0000000000000000 |
97 |
> [140398.382204] RDX: ffff880249654450 RSI: ffff88024964dc08 RDI: |
98 |
> ffff88024964dc08 |
99 |
> [140398.382205] RBP: ffffc900431e7e10 R08: 0000000000000000 R09: |
100 |
> 00000000000448da |
101 |
> [140398.382207] R10: 0000000000001668 R11: ffffffff81f1dad0 R12: |
102 |
> ffffffffc08114c8 |
103 |
> [140398.382209] R13: ffffffffc08114c0 R14: 00000000000000fa R15: |
104 |
> 0000000000000010 |
105 |
> [140398.382223] FS: 0000000000000000(0000) GS:ffff880249640000(0000) |
106 |
> knlGS:ffff880249640000 |
107 |
> [140398.382225] CS: e033 DS: 0000 ES: 0000 CR0: 0000000080050033 |
108 |
> [140398.382227] CR2: 00007fb681059eb0 CR3: 000000020a7b9000 CR4: |
109 |
> 0000000000042660 |
110 |
> [140398.382230] Call Trace: |
111 |
> [140398.382238] ida_simple_remove+0x2f/0x45 |
112 |
> [140398.382247] bcache_device_free+0x8c/0xc4 [bcache] |
113 |
> [140398.382255] cached_dev_free+0x6b/0xe1 [bcache] |
114 |
> [140398.382261] process_one_work+0x16f/0x281 |
115 |
> [140398.382265] ? rescuer_thread+0x24e/0x24e |
116 |
> [140398.382268] worker_thread+0x1a4/0x257 |
117 |
> [140398.382272] ? rescuer_thread+0x24e/0x24e |
118 |
> [140398.382275] kthread+0xfc/0x101 |
119 |
> [140398.382278] ? init_completion+0x24/0x24 |
120 |
> [140398.382284] ret_from_fork+0x25/0x30 |
121 |
> [140398.382287] Code: 00 75 2a 4c 89 f7 e8 79 52 d5 ff 48 8d 75 b0 4c 89 |
122 |
> e2 4c 89 ef e8 03 3a 00 00 eb 11 44 89 fe 48 c7 c7 0a a1 a0 81 e8 c9 79 |
123 |
> d0 ff <0f> ff 48 83 c4 38 5b 41 5c 41 5d 41 5e 41 5f 5d c3 85 f6 79 02 |
124 |
> [140398.382341] ---[ end trace 279bbc0d0aae56cc ]--- |
125 |
|
126 |
Looks like a kernel bug, try the latest vanilla kernel. |
127 |
|
128 |
Best regards, |
129 |
Andrew Savchenko |