Bug 200145 - kernel: FS-Cache: Duplicate cookie detected
Summary: kernel: FS-Cache: Duplicate cookie detected
Status: NEW
Alias: None
Product: File System
Classification: Unclassified
Component: NFS (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: David Howells
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-20 04:18 UTC by D.T.
Modified: 2019-02-07 15:34 UTC (History)
18 users (show)

See Also:
Kernel Version: 4.17.2
Tree: Mainline
Regression: No


Attachments

Description D.T. 2018-06-20 04:18:42 UTC
Description:  
  
FS-Cache: Duplicate cookie detected after updating Arch Linux yesterday. (This was the first update in a couple weeks.)  
  
Additional info:  
* package version(s)  
  
4.17.2-1-ARCH #1 SMP PREEMPT Sat Jun 16 11:08:59 UTC 2018 x86_64 GNU/Linux  
  
* config and/or log files etc.  
  
kernel: FS-Cache: Duplicate cookie detected  
kernel: FS-Cache: O-cookie c=000000001e72b895 [p=0000000089da8da7 fl=222 nc=0 na=1]  
kernel: FS-Cache: O-cookie d=00000000c3a2cbed n=00000000f757123a  
kernel: FS-Cache: O-key=[10] '040002000801c0a805c3'  
kernel: FS-Cache: N-cookie c=00000000ea48db1d [p=0000000089da8da7 fl=2 nc=0 na=1]  
kernel: FS-Cache: N-cookie d=00000000c3a2cbed n=000000000f72327e  
kernel: FS-Cache: N-key=[10] '040002000801c0a805c3'  
  
The machine is an Intel Core i7 and Asus Z170WS motherboard.  
  
Steps to reproduce:  
  
Boot system and check `journalctl -b -p err`  

(I'm sorry about the formatting. I'm not able to find formatting help.)
Comment 1 D.T. 2018-06-21 23:12:18 UTC
We are seeing this on each system (i.e., NFS client) as we update the kernels.

Linux 4.17.2-1-ARCH #1 SMP PREEMPT Sat Jun 16 11:08:59 UTC 2018 x86_64 GNU/Linux

All clients are Arch Linux and the NFS server is Arch Linux
Comment 2 Mustafa Mehmed 2018-06-25 04:08:15 UTC
Same problem here:-

Fedora 28 x86_64

# uname -r
# 4.17.2-200.fc28.x86_64

Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000db12e0e0 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000c9409ef1 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=00000000e8f1ac26
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000db12e0e0 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000964082ff [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000001f536e83
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000db12e0e0 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000bc41f6a5 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000003128b81a
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000db12e0e0 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=0000000053708379 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=0000000039f900f6
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000db12e0e0 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000002a007dbf [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000007c108fe3
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=000000002ab03e84 [p=000000009b121f93 fl=222 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=00000000d7b9b75b n=00000000b853a8ee
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000e7e093b9 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=00000000945ea721
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000c9409ef1 [p=000000009b121f93 fl=222 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=00000000d7b9b75b n=000000001457c555
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000002a007dbf [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=0000000058e97a5a
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000c9409ef1 [p=000000009b121f93 fl=222 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=000000004268bcbb [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '04
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000000b84e785 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000008bb85de9
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000843e3416 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '04000200
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000964082ff [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=0000000082425ed3
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=00000000dbf8ebfe [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=00000000a1e88c70
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000c9409ef1 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000000b84e785 [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000002de42a5c
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000c9409ef1 [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000002a007dbf [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=0000000071ab2f2d
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: Duplicate cookie detected
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie c=00000000964082ff [p=000000009b121f93 fl=212 nc=0 na=0]
Jun 25 13:13:37 musi kernel: FS-Cache: O-cookie d=          (null) n=          (null)
Jun 25 13:13:37 musi kernel: FS-Cache: O-key=[10] '040002000801c0a8000a'
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie c=000000002a007dbf [p=000000009b121f93 fl=2 nc=0 na=1]
Jun 25 13:13:37 musi kernel: FS-Cache: N-cookie d=00000000d7b9b75b n=000000003f381e0c
Jun 25 13:13:37 musi kernel: FS-Cache: N-key=[10] '040002000801c0a8000a'
Comment 3 Mustafa Mehmed 2018-07-02 21:52:08 UTC
Still persists for 4.17.3-200.fc28.x86_64
Comment 4 Edmund L 2018-07-08 10:33:46 UTC
Same problem since today on Archlinux client:

Linux 4.17.4-1-ARCH #1 SMP PREEMPT Tue Jul 3 15:45:09 UTC 2018 x86_64 GNU/Linux

NFS does not mount anymore, it gives an access denied error.
Comment 5 D.T. 2018-07-18 06:38:31 UTC
Still persists in 4.17.6-1-ARCH #1 SMP PREEMPT Wed Jul 11 19:14:29 UTC 2018 x86_64 GNU/Linux

On at least one system we are seeing problems with NFS shares not mounting at boot, but they can be mounted manually. Not sure if it is related, but the mounting issue is new and configuration has not changed.
Comment 6 Jason H. 2018-09-15 13:52:29 UTC
Still occurs regularly in 4.18.6.


On one system (PRODUCTION);

[    5.597516] FS-Cache: Duplicate cookie detected
[    5.597545] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=0 na=1]
[    5.597568] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    5.597589] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    5.597610] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    5.597633] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    5.597652] FS-Cache: N-key=[10] '040002000801c0a8802f'
----------------CUT----------------
[243468.028611] FS-Cache: Duplicate cookie detected
[243468.028649] FS-Cache: O-cookie c=000000005298fa9f [p=00000000fadc4f4f fl=222 nc=0 na=1]
[243468.028673] FS-Cache: O-cookie d=00000000ed593886 n=000000001d7d5f26
[243468.028693] FS-Cache: O-key=[10] '040002000801c0a8802f'
[243468.028713] FS-Cache: N-cookie c=00000000d54ce6b9 [p=00000000fadc4f4f fl=2 nc=0 na=1]
[243468.028737] FS-Cache: N-cookie d=00000000ed593886 n=00000000eff1b7bc
[243468.028756] FS-Cache: N-key=[10] '040002000801c0a8802f'


On another (OFFICE):

[    3.572751] FS-Cache: Duplicate cookie detected
[    3.572779] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=0 na=1]
[    3.572803] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    3.572823] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    3.572844] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    3.572867] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    3.572886] FS-Cache: N-key=[10] '040002000801c0a8802f'
[    3.713774] FS-Cache: Duplicate cookie detected
[    3.713801] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=0 na=1]
[    3.713830] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    3.713849] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    3.713871] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    3.713893] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    3.713913] FS-Cache: N-key=[10] '040002000801c0a8802f'
[    3.714992] FS-Cache: Duplicate cookie detected
[    3.715019] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=0 na=1]
[    3.715043] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    3.715073] FS-Cache: O-key=[10] '040002000801c0a88031'
[    3.715094] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    3.715117] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    3.715136] FS-Cache: N-key=[10] '040002000801c0a88031'
[    3.750580] FS-Cache: Duplicate cookie detected
[    3.750607] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=4 na=1]
[    3.750631] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    3.750651] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    3.750672] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    3.750695] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    3.750714] FS-Cache: N-key=[10] '040002000801c0a8802f'
[    3.905088] CacheFiles: Loaded
[    3.914303] FS-Cache: Cache "mycache" added (type cachefiles)
[    3.914305] CacheFiles: File cache on sdb1 registered
[    3.981049] FS-Cache: Duplicate cookie detected
[    3.981075] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=0 na=1]
[    3.981101] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    3.981131] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    3.981152] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    3.981211] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    3.981227] FS-Cache: N-key=[10] '040002000801c0a8802f'
[    4.020095] FS-Cache: Duplicate cookie detected
[    4.020122] FS-Cache: O-cookie c=(____ptrval____) [p=(____ptrval____) fl=222 nc=5 na=1]
[    4.020147] FS-Cache: O-cookie d=(____ptrval____) n=(____ptrval____)
[    4.020166] FS-Cache: O-key=[10] '040002000801c0a8802f'
[    4.020187] FS-Cache: N-cookie c=(____ptrval____) [p=(____ptrval____) fl=2 nc=0 na=1]
[    4.020210] FS-Cache: N-cookie d=(____ptrval____) n=(____ptrval____)
[    4.020230] FS-Cache: N-key=[10] '040002000801c0a8802f'


[17638.919246] FS-Cache: Duplicate cookie detected
[17638.919274] FS-Cache: O-cookie c=00000000147e71bd [p=00000000ac34690f fl=222 nc=0 na=1]
[17638.919296] FS-Cache: O-cookie d=00000000ba3acacd n=00000000f633f60c
[17638.919315] FS-Cache: O-key=[10] '040002000801c0a8802f'
[17638.919336] FS-Cache: N-cookie c=000000002c444bb0 [p=00000000ac34690f fl=2 nc=0 na=1]
[17638.919358] FS-Cache: N-cookie d=00000000ba3acacd n=000000007162a1bd
[17638.919378] FS-Cache: N-key=[10] '040002000801c0a8802f'
[17638.921062] FS-Cache: Duplicate cookie detected
[17638.921086] FS-Cache: O-cookie c=00000000147e71bd [p=00000000ac34690f fl=222 nc=0 na=1]
[17638.921106] FS-Cache: O-cookie d=00000000ba3acacd n=00000000f633f60c
[17638.921122] FS-Cache: O-key=[10] '040002000801c0a8802f'
[17638.921141] FS-Cache: N-cookie c=000000003e824b22 [p=00000000ac34690f fl=2 nc=0 na=1]
[17638.922101] FS-Cache: N-cookie d=00000000ba3acacd n=00000000991d0273
[17638.922569] FS-Cache: N-key=[10] '040002000801c0a8802f'
[17638.973773] FS-Cache: Duplicate cookie detected
[17638.974432] FS-Cache: O-cookie c=00000000b0f6ec39 [p=00000000ac34690f fl=220 nc=1 na=1]
[17638.974971] FS-Cache: O-cookie d=00000000ba3acacd n=00000000fc3612f3
[17638.975490] FS-Cache: O-cookie o=0000000077bdc71b
[17638.976000] FS-Cache: O-key=[10] '040002000801c0a8802f'
[17638.976545] FS-Cache: N-cookie c=00000000147e71bd [p=00000000ac34690f fl=2 nc=0 na=1]
[17638.977010] FS-Cache: N-cookie d=00000000ba3acacd n=000000007162a1bd
[17638.977566] FS-Cache: N-key=[10] '040002000801c0a8802f'
[19593.186254] FS-Cache: Duplicate cookie detected
[19593.187265] FS-Cache: O-cookie c=00000000b0f6ec39 [p=00000000ac34690f fl=220 nc=1 na=1]
[19593.187840] FS-Cache: O-cookie d=00000000ba3acacd n=00000000fc3612f3
[19593.188302] FS-Cache: O-cookie o=0000000077bdc71b
[19593.188762] FS-Cache: O-key=[10] '040002000801c0a8802f'
[19593.189253] FS-Cache: N-cookie c=000000000001de54 [p=00000000ac34690f fl=2 nc=0 na=1]
[19593.189853] FS-Cache: N-cookie d=00000000ba3acacd n=000000001f2473c6
[19593.190398] FS-Cache: N-key=[10] '040002000801c0a8802f'


Two relevant mounts on both with the same settings. One is NFS the other NFS4. I have seen the same issue doing something similar with a SMB mount however.

192.168.128.49:<path> on /srv/shared/<path> type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=10,sec=sys,mountaddr=192.168.128.49,mountvers=3,mountport=46999,mountproto=udp,fsc,local_lock=none,addr=192.168.128.49)

192.168.128.47:<path> on <path> type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=10,sec=sys,clientaddr=192.168.128.45,fsc,local_lock=none,addr=192.168.128.47)

This will occur even with a fresh cache after a period of time/heavy access.
Comment 7 Stefan Assmann 2018-09-25 08:55:34 UTC
Also seeing this on 4.18.6.

[1480847.164687] FS-Cache: Duplicate cookie detected
[1480847.164692] FS-Cache: O-cookie c=0000000087de3563 [p=00000000b77cf9f7 fl=222 nc=0 na=1]
[1480847.164694] FS-Cache: O-cookie d=00000000e895c803 n=00000000544279fb
[1480847.164695] FS-Cache: O-key=[10] '0400020008010a1029a4'
[1480847.164701] FS-Cache: N-cookie c=00000000f1035c51 [p=00000000b77cf9f7 fl=2 nc=0 na=1]
[1480847.164702] FS-Cache: N-cookie d=00000000e895c803 n=000000002e4ef63d
[1480847.164703] FS-Cache: N-key=[10] '0400020008010a1029a4'
Comment 8 Christian Kujau 2018-11-12 02:19:03 UTC
This is still happening, seeing it here with an Ubuntu 4.19 ([201810221809](http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.19/)) kernel.
Comment 9 João Magalhães 2018-11-15 22:40:05 UTC
Still seeing this on 4.19.1

[35616.806254] FS-Cache: Duplicate cookie detected
[35616.806256] FS-Cache: O-cookie c=0000000054686264 [p=000000001571c359 fl=222 nc=1 na=1]
[35616.806257] FS-Cache: O-cookie d=00000000f208744e n=000000009669a7f3
[35616.806258] FS-Cache: O-key=[8] '020001bdac10001f'
[35616.806261] FS-Cache: N-cookie c=000000004b9df41f [p=000000001571c359 fl=2 nc=0 na=1]
[35616.806261] FS-Cache: N-cookie d=00000000f208744e n=00000000f7992f3b
[35616.806262] FS-Cache: N-key=[8] '020001bdac10001f'
Comment 10 Mauro A. Meloni 2018-12-07 12:50:10 UTC
Started seeing this problem on Debian since months ago. Happens on 4.17.2 onwards, 4.18.x, 4.19.x:

```
# dmesg | egrep -i "(fs-cache|Linux version)"

[    0.000000] Linux version 4.18.0-0.bpo.1-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP Debian 4.18.6-1~bpo9+1 (2018-09-13)
[   29.192280] FS-Cache: Loaded
[   29.409773] FS-Cache: Netfs 'cifs' registered for caching
[   29.496826] FS-Cache: Duplicate cookie detected
[   29.496867] FS-Cache: O-cookie c=0000000041e46806 [p=0000000031cb431b fl=222 nc=0 na=1]
[   29.496914] FS-Cache: O-cookie d=00000000b223d91c n=00000000b2b12755
[   29.496951] FS-Cache: O-key=[8] '020001bdaad26009'
[   29.497004] FS-Cache: N-cookie c=00000000b46cd7af [p=0000000031cb431b fl=2 nc=0 na=1]
[   29.497052] FS-Cache: N-cookie d=00000000b223d91c n=000000008c79361f
[   29.497092] FS-Cache: N-key=[8] '020001bdaad26009'
[   29.497131] FS-Cache: Duplicate cookie detected
[   29.497173] FS-Cache: O-cookie c=0000000041e46806 [p=0000000031cb431b fl=222 nc=0 na=1]
[   29.497223] FS-Cache: O-cookie d=00000000b223d91c n=00000000b2b12755
[   29.497263] FS-Cache: O-key=[8] '020001bdaad26009'
[   29.497303] FS-Cache: N-cookie c=00000000e0cd3dc2 [p=0000000031cb431b fl=2 nc=0 na=1]
[   29.497351] FS-Cache: N-cookie d=00000000b223d91c n=00000000979642dd
[   29.497391] FS-Cache: N-key=[8] '020001bdaad26009'
```

```
# dmesg | egrep -i "(fs-cache|Linux version)"

[    0.000000] Linux version 4.19.7 (maurom.com) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP Thu Dec 6 08:57:06 -03 2018
[   28.172523] FS-Cache: Loaded
[   28.367743] FS-Cache: Netfs 'cifs' registered for caching
[   28.405810] FS-Cache: Duplicate cookie detected
[   28.405829] FS-Cache: O-cookie c=00000000622c2cfb [p=0000000020f157cf fl=222 nc=0 na=1]
[   28.405847] FS-Cache: O-cookie d=00000000a64ed22d n=00000000c762d573
[   28.405863] FS-Cache: O-key=[8] '020001bdaad26009'
[   28.405879] FS-Cache: N-cookie c=00000000b9d71f03 [p=0000000020f157cf fl=2 nc=0 na=1]
[   28.405897] FS-Cache: N-cookie d=00000000a64ed22d n=0000000020b8ad4c
[   28.405912] FS-Cache: N-key=[8] '020001bdaad26009'
[   28.406274] FS-Cache: Duplicate cookie detected
[   28.406290] FS-Cache: O-cookie c=00000000622c2cfb [p=0000000020f157cf fl=222 nc=0 na=1]
[   28.406309] FS-Cache: O-cookie d=00000000a64ed22d n=00000000c762d573
[   28.406324] FS-Cache: O-key=[8] '020001bdaad26009'
[   28.406339] FS-Cache: N-cookie c=00000000abc65d43 [p=0000000020f157cf fl=2 nc=0 na=1]
[   28.406357] FS-Cache: N-cookie d=00000000a64ed22d n=00000000c5a79a4d
[   28.406372] FS-Cache: N-key=[8] '020001bdaad26009'
```

However, there are no such messages when running kernel version 4.9.0

```
# dmesg | egrep -i "(fs-cache|Linux version)"

[    0.000000] Linux version 4.9.0-8-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.130-2 (2018-10-27)
[   32.030230] FS-Cache: Loaded
[   32.507149] FS-Cache: Netfs 'cifs' registered for caching
```

At least in my case, seems related to mounting remote SMB filesystems on boot. My fstab has (partially):

```
//fs1/afolder	/media/afolder	cifs	credentials=/opt/cifs.credentials,vers=3.0,uid=username,iocharset=utf8,cache=none	0	0
//fs1/bfolder	/media/bfolder	cifs	credentials=/opt/cifs.credentials,vers=3.0,uid=username,iocharset=utf8,cache=none	0	0
//fs1/cfolder	/media/cfolder	cifs	credentials=/opt/cifs.credentials,vers=3.0,uid=username,iocharset=utf8,cache=none	0	0
```

If I disable mounting those filesystems on boot (by commenting their entries), no "Duplicate cookie" message appears, not even after mounting them the manual way via the command line.

```
# dmesg | egrep -i "(fs-cache|Linux version)"

[    0.000000] Linux version 4.19.7 (maurom.com) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 SMP Thu Dec 6 08:57:06 -03 2018
[  120.605690] FS-Cache: Loaded
[  120.687546] FS-Cache: Netfs 'cifs' registered for caching
```

Ideas are welcome
Comment 11 Paul Szymanski 2018-12-20 23:02:22 UTC
I'm seeing this on 4.18.19 with SMBv3 mounts that are managed by autofs. This seems to happen randomly after some time. After rebooting the system the mounts ususally work again.
If someone knows an alternative to rebooting of the system I'm glad to hear.

# cat /etc/auto.home
*         -fstype=cifs,sec=krb5i,cache=strict,rw,user=&,cruid=&,cifsacl,nounix,multiuser ://example.com/home\$/&

Dec 20 12:16:43 myserver.com kernel: No dialect specified on mount. Default has changed to a more secure dialect, SMB2.1 or later (e.g. SMB3), from CIFS (SMB1). To use the less secure SMB1 dialect to access old server
Dec 20 12:16:43 myserver.com kernel: FS-Cache: Duplicate cookie detected
Dec 20 12:16:43 myserver.com kernel: FS-Cache: O-cookie c=00000000e1b5032a [p=00000000adab294a fl=222 nc=0 na=1]
Dec 20 12:16:43 myserver.com kernel: FS-Cache: O-cookie d=00000000fc0edf47 n=00000000b64ec22f
Dec 20 12:16:43 myserver.com kernel: FS-Cache: O-key=[5] '686f6d6524'
Dec 20 12:16:43 myserver.com kernel: FS-Cache: N-cookie c=000000001497883d [p=00000000adab294a fl=2 nc=0 na=1]
Dec 20 12:16:43 myserver.com kernel: FS-Cache: N-cookie d=00000000fc0edf47 n=00000000e91fcf0f
Dec 20 12:16:43 myserver.com kernel: FS-Cache: N-key=[5] '686f6d6524'
Comment 12 Paul Szymanski 2018-12-21 00:25:56 UTC
This patch [1] introduced a catalouge of maintained cookies to handle cookie collisions. However the handling of cookie collisions seems not to be implemented yet.

[1] https://github.com/torvalds/linux/commit/ec0328e46d6e5d0f17372eb90ab8e333c2ac7ca9
Comment 13 Adam Williamson 2019-01-16 19:40:17 UTC
FWIW I just started seeing this on my Fedora Rawhide desktop - I did an update, reboot, and found an SMB mount won't mount, and the logs show these "Duplicate cookie detected" errors...
Comment 14 Adam Williamson 2019-02-07 15:33:57 UTC
Still seeing this with 5.0.0-0.rc4.git3.1.fc30.x86_64 and it still appears to 100% reliably break a SMB mount, I just cannot mount it at all. This isn't as bad for others? Seems like a critical bug to me...

Note You need to log in before you can comment on or make changes to this bug.