* [Bug bpf/24659] New: kernel 5.2 bpf -- user and kernel-space map reads not synchronized?
@ 2019-06-10 17:09 me at serhei dot io
2019-06-10 17:10 ` [Bug bpf/24659] " me at serhei dot io
0 siblings, 1 reply; 2+ messages in thread
From: me at serhei dot io @ 2019-06-10 17:09 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=24659
Bug ID: 24659
Summary: kernel 5.2 bpf -- user and kernel-space map reads not
synchronized?
Product: systemtap
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: bpf
Assignee: systemtap at sourceware dot org
Reporter: me at serhei dot io
Target Milestone: ---
It appears that the recent kernels (seen on 5.2 rawhide) introduce some timing
issue between kernel- and user-space map operations.
global value//=2
global status//=2
probe begin {
println("BEGIN")
value = 2
status = 2
}
probe kernel.function("vfs_read") {
status = 0
if (value == 2) next
status = 1
}
probe kernel.function("vfs_read") {
printf("vfs_read\n")
printf("value %d\n", value)
printf("status %d\n", status)
if (status != 2) exit()
}
probe end {
printf("end\n")
printf("value %d\n", value)
printf("status %d\n", status)
if (status)
println("END FAIL")
else
println("END PASS")
}
In this example, probe end runs too soon after the map update in vfs_read and
receives an updated value. Changing the second probe vfs_read to probe
timer.s(2) would make the testcase pass.
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug bpf/24659] kernel 5.2 bpf -- user and kernel-space map reads not synchronized?
2019-06-10 17:09 [Bug bpf/24659] New: kernel 5.2 bpf -- user and kernel-space map reads not synchronized? me at serhei dot io
@ 2019-06-10 17:10 ` me at serhei dot io
0 siblings, 0 replies; 2+ messages in thread
From: me at serhei dot io @ 2019-06-10 17:10 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=24659
--- Comment #1 from Serhei Makarov <me at serhei dot io> ---
* should prior email should be 'receives an outdated value'. Output as follows:
BEGIN
vfs_read
value 0
status 0
end
value 2
status 2
END FAIL
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-10 17:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-10 17:09 [Bug bpf/24659] New: kernel 5.2 bpf -- user and kernel-space map reads not synchronized? me at serhei dot io
2019-06-10 17:10 ` [Bug bpf/24659] " me at serhei dot io
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).