Issue 1494095 in chromium: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...

1 view
Skip to first unread message

hnakashima via monorail

unread,
Nov 22, 2023, 2:59:23 PM11/22/23
to flag...@chromium.org
Updates:
Components: -UI>Browser>Mobile Internals>Flags
Labels: OS-Android
Owner: hnaka...@chromium.org
Status: Assigned

Comment #4 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c4

Looking like a race condition because we jjust checked that sTestFeatures isn't null, but then when we get mFeatureFlags it has become null?

--
You received this message because:
1. You are auto-CC'd on all issues in component Internals>Flags

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment or make updates.

hnakashima via monorail

unread,
Nov 22, 2023, 3:12:10 PM11/22/23
to flag...@chromium.org

Comment #5 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c5

Yeah, I see this with multiple flags as a rare flake.

Related to crbug.com/1434471 but I can probably quick fix it to avoid these types of crashes, still will have flag state inconsistency but that's less bad.

hnakashima via monorail

unread,
Nov 22, 2023, 3:19:36 PM11/22/23
to flag...@chromium.org
Updates:
Status: Started

Comment #6 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c6

(No comment was entered for this change.)

hnakashima via monorail

unread,
Nov 22, 2023, 3:40:25 PM11/22/23
to flag...@chromium.org

Comment #7 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c7

Hopefully this fixes it: https://chromium-review.googlesource.com/c/chromium/src/+/5054624

hnakashima via monorail

unread,
Nov 22, 2023, 3:42:42 PM11/22/23
to flag...@chromium.org
Updates:
Cc: mei...@google.com kuan...@chromium.org

Comment #8 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c8

+meiring@, kuanhuang@ this is a great find by LUCI clustering

Git Watcher via monorail

unread,
Nov 23, 2023, 1:18:22 PM11/23/23
to flag...@chromium.org

Comment #9 on issue 1494095 by Git Watcher: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c9

The following revision refers to this bug:
https://chromium.googlesource.com/chromium/src/+/1a207b4441b0332afe5b0d329fe549a8d43973ee

commit 1a207b4441b0332afe5b0d329fe549a8d43973ee
Author: Henrique Nakashima <hnaka...@chromium.org>
Date: Thu Nov 23 18:17:19 2023

[Android] Fix race condition when flag test overrides are unset

When the flag test values are unset while checking a test value, we
may get:


java.lang.NullPointerException: Attempt to read from field
'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags'
on a null object reference

This works around the issue by storing the Map in a local variable
instead of getting it again from the static field. The better fix is
to lock down flag state and stop resetting it (crbug.com/1434471), but
it requires much more work to change existing tests that rely on it.

Bug: 1494095
Change-Id: I76a18c73fa2ef7013f8b8d59c472293b3e2d90c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5054624
Code-Coverage: findit...@appspot.gserviceaccount.com <findit...@appspot.gserviceaccount.com>
Reviewed-by: Andrew Grieve <agr...@chromium.org>
Commit-Queue: Henrique Nakashima <hnaka...@chromium.org>
Reviewed-by: Calder Kitagawa <ckit...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1228520}

[modify] https://crrev.com/1a207b4441b0332afe5b0d329fe549a8d43973ee/base/android/java/src/org/chromium/base/FeatureList.java

hnakashima via monorail

unread,
Nov 29, 2023, 4:13:08 PM11/29/23
to flag...@chromium.org
Updates:
Status: Fixed

Comment #10 on issue 1494095 by hnaka...@chromium.org: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c10

Looked at the cluster and it seems fixed.

luci-analysis-service via monorail

unread,
Nov 30, 2023, 1:30:32 PM11/30/23
to flag...@chromium.org
Updates:
Status: Verified

Comment #11 on issue 1494095 by luci-analy...@luci-analysis.iam.gserviceaccount.com: Tests are failing: java.lang.NullPointerException: Attempt to read from field 'java.util.Map org.chromium.base.FeatureList$TestValues.mFeatureFlags' on a null object ...
https://bugs.chromium.org/p/chromium/issues/detail?id=1494095#c11

Because the following problem(s) have stopped:
- test variant(s) are being exonerated (ignored) in presubmit (P2)
The bug has been verified.

Why issues are verified: https://luci-analysis.appspot.com/help#bug-verified
See failure impact and configure the failure association rule for this bug at: https://luci-analysis.appspot.com/p/chromium/rules/a3340108087ebf3b26ecce1a8abe09b4
Reply all
Reply to author
Forward
0 new messages