Reproducible crash in kAFS with just "cp -a"

Gaja Sophie Peters gaja.peters at
Tue Mar 2 13:41:06 GMT 2021

Dear David Howell,

I am trying from time to time how stable kAFS is in Ubuntu, and if it
might one day be possible to actually replace OpenAFS with kAFS in some
circumstances (using it in a live-linux from an USB-Stick is still one
of my dreams)

Already in earlier kernel-versions I got occasional crashes, but today I
could reproduce the crash pretty well in both Kernel versions
"" (the current "hardware-enablement"-Kernel of
Ubuntu) and also in Kernel 5.11.0-051100.202102142330 (the newest
"mainline"-Kernel of Ubuntu).

The only four commands I entered are

	keyctl new_session
	kinit <account>
	cp -a /afs/some.openafs.cell/some.file /tmp

and got the stack-traces from the attachments in "dmesg". What is
interesting is that a simple "cp" does not cause the problem.

Considering the reference to "getxattr" and "afs_xattr_get_yfs" in the
stacktrace, I think that possibly it is some code that will work with an
YFS-fileserver, but maybe not with an OpenAFS-fileserver?

further analysing:
works: cp
fails: cp -a
	"cp -a" is short for "cp -dR --preserve=all"
works: cp -dR --preserve=mode,ownership,timestamps
works: cp -a --no-preserve=xattr
fails: cp --preserve=xattr

I hope you can use this analysis and the supplied "dmesg"-logs and have
an idea what might be the cause. I am willing to test, but I am no
kernel-developer, so I am not sure how I could further help to pinpoint
the problematic code-path.

Gaja Peters

P.S. I just realised, it doesn't even need authenticated access to AFS,
a simple unauthenticated
> cp --preserve=xattr /afs/ /tmp
is enough to trigger the kernel-BUG. If it is triggered enough times,
further requests don't lead to new crashes but instead take "forever"
(didn't wait more than a few minutes though). At least in Kernel 5.11.0
the system itself remains useable all the way. In earlier kernels a few
minutes after the stack-trace in the log, the entire system froze.

P.P.S. Adding "afs.* skip" to /etc/xattr.conf made no difference, cp -a 
was still crashing even after that.

| IT-Gruppe, Systemadministration
| Universität Hamburg, Fachbereich Mathematik
| Bundesstr. 55 (Geomatikum)
| Raum 212; Tel. 42838-5175

-------------- next part --------------
A non-text attachment was scrubbed...
Name: kAFS-crash-
Type: text/x-log
Size: 5267 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kAFS-crash-5.11.0-051100.log
Type: text/x-log
Size: 5559 bytes
Desc: not available
URL: <>

More information about the linux-afs mailing list