--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAbEjat92cNVjFyDTb_3jNddMXSTux1%2Bcy7w5dBdh_NSvA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGFX3sEgHj2T1ac9udOPqz5Ug2KFYubVzg9nDXSDa4%2BZGkT0vw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEoffTDRoLcJ7FjzL1weMZ5Ywtm1TkjRdb46EmTJ4dvu9ULmSA%40mail.gmail.com.
The main deterrent for me running with DCHECK more frequently is that I run into DCHECKs, file bugs, and the bugs get deprioritized [thereby meaning that every time I build/checkout I need to introduce temporary local workarounds].I think we need a process change whereby the default response to a DCHECK crbug is to disable it, with owners to investigate/follow up. Otherwise a small number of deprioritized, unfixed DCHECK crbugs will prevent most developers from adopting DCHECKs.
On Wed, May 12, 2021 at 12:50 PM 'Dirk Pranke' via Chromium-dev <chromi...@chromium.org> wrote:If we turn dchecks on outside of official builds, then we lose coverage of the non-dcheck case on the release builders, and this is important both (a) because it's what we ship and (b) because dcheck builds are significantly slower and the timing issues will be different.The "developer default" is already dcheck_always_on=true, because we default to debug builds. And, we build with dcheck_always_on in the CQ.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEYHnr2QuY7VYkrXLQTabd3ZXLv%2B7ETXM42Ea%2BMpO4NgDez0HA%40mail.gmail.com.
On Wed, May 12, 2021 at 3:54 PM Erik Chen <erik...@chromium.org> wrote:The main deterrent for me running with DCHECK more frequently is that I run into DCHECKs, file bugs, and the bugs get deprioritized [thereby meaning that every time I build/checkout I need to introduce temporary local workarounds].I think we need a process change whereby the default response to a DCHECK crbug is to disable it, with owners to investigate/follow up. Otherwise a small number of deprioritized, unfixed DCHECK crbugs will prevent most developers from adopting DCHECKs.+1On Wed, May 12, 2021 at 12:50 PM 'Dirk Pranke' via Chromium-dev <chromi...@chromium.org> wrote:If we turn dchecks on outside of official builds, then we lose coverage of the non-dcheck case on the release builders, and this is important both (a) because it's what we ship and (b) because dcheck builds are significantly slower and the timing issues will be different.The "developer default" is already dcheck_always_on=true, because we default to debug builds. And, we build with dcheck_always_on in the CQ.Most developers will immediate disable debug builds, at which point the default behaviour becomes without dchecks. Bots to could be configured to disable them explicitly to maintain coverage.
The main deterrent for me running with DCHECK more frequently is that I run into DCHECKs, file bugs, and the bugs get deprioritized [thereby meaning that every time I build/checkout I need to introduce temporary local workarounds].I think we need a process change whereby the default response to a DCHECK crbug is to disable it, with owners to investigate/follow up. Otherwise a small number of deprioritized, unfixed DCHECK crbugs will prevent most developers from adopting DCHECKs.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEYHnr2QuY7VYkrXLQTabd3ZXLv%2B7ETXM42Ea%2BMpO4NgDez0HA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaQn%3DicfRYEmxxQf%2Bz_TpKDTV5KUZsfF0N2JbGV6o6WkBA%40mail.gmail.com.
If that's true (I have no idea), maybe the right question is then: why don't we fix debug builds so that people don't need to disable them?
Avi
That's fine, and I'm in favor of trying to make *that* culture shift, rather than trying to shift to something to work around the problem.
I worry that this would be a counterproductive default policy. In many cases the DCHECK is correct, and the direct owner is not necessarily responsible for all code paths which might lead to its violation.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAa-0ej_W6mNacFC0L4wzj2MHRjJKnYHdKbdC27aoPxSEA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAEoffTCzdiSa4Gg7RzBs1sCQdstjao2OOXj49FrAsUmfhMj82w%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAGFX3sFaoT98mHKP1z_8JQ2WkDO5Dq%2BaFr1-wMH1tgbcgLuo5g%40mail.gmail.com.
I'm happy to hear people talking about shipping DCHECK-enabled builds, but I want to reinforce that this has to start right here at home with us.
I need to build and run ToT Chromium to do my job. The last time I did that, I hit four different DCHECKs. Several I filed as bugs and they were fixed in a day, but one broken DCHECK was months old, well known, had many stars, and it was only after I insistently commented on the bug that yes this is still happening did it finally get fixed. This was not the first time I had this kind of experience, and I'm not the only one for whom this keeps happening.
We have broken DCHECKs throughout Chromium code which are not found through testing and that are long-lived enough that they are not revertible without undoing chains of many CLs. This is very very bad.
> DCHECKs enabled by default in release builds is a good idea IMO. Release build with DCHECKs enabled is often the right choice for developer builds, but currently it requires setting two separate GN flags, which is not ideal.
There is a bit of tension between what DCHECKs are used for, and how
they behave in release builds.
Severe errors that'd cause a crash are CHECKs, not DCHECKs.
DCHECKs in code mean "something is not behaving as expected".
What is the priority that should be assigned to the bug "DCHECK fired
on this URL?"
It depends on many things:
- how hard is the fix?
- what are the consequences of unexpected behavior?
- how often does the DCHECK fire?
For example, I had a DCHECK in Tables code that checks that sum of
distributed widths is equal to total width. The check was there to
catch errors in my distribution algorithm. What it often caught
instead is slight rounding errors in floating point math, some cell
width would be off by 0.1px. I fixed all of these becaus clusterfuzz
loved triggering the floating point errror, and I really wanted to
keep the DCHECK as a safety for my algorithm. Without clusterfuzz, I'd
have probably never encountered or fixed the floating point errors,
and that would have been ok.
DCHECKs in release builds crash the renderer, which is the most severe outcome.
(At least that's what it does locally when I build Chromium with DCHECKs on).
On Wed, May 12, 2021 at 3:59 PM Ken Rockot <roc...@google.com> wrote:I worry that this would be a counterproductive default policy. In many cases the DCHECK is correct, and the direct owner is not necessarily responsible for all code paths which might lead to its violation.
An interesting question would be how did this evolve. Did the direct owner add the DCHECK to an existing system? If so, then they don't fully understand it, and are directly responsible. Did a second developer add new code that caused the existing DCHECK in a different part of the codebase to fire? How did they do that without noticing the DCHECK firing? Did they have DCHECKs turned off?
To be clear, I am not advocating for or against this policy of turning off DCHECKs. I just want to point out how the argument against this policy is indicative of the situation we're in, where a downward spiral of people turning off DCHECKs on local builds has yielded a situation where we have to consider tough policies.Avi
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAYB%3DQYEawhobSq0%3Dm8BMN2zwCspO2CXJDG1HWVxpoXAkA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACjFnbyYpgmDr-J%2B0GUjD49%2B_%3DqTyO7ZpSmwH3HmhLZus22rvw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2Bg1BH0HO6zoLFv1Jcep1GSE_kDZGVtVAROpFc9O%2BqE%3DyLoD1A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALekkJc9WnK84mX_jGNFp031_KXSdJeKpgmgj_xTbJttbz9j-w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaSzAKs9fQQd%3DVcGtfOKXCHkRBkDRVHjtvW-vaRv92gzVQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJauWCHP91osS0D8x8Oow%3DdG%3D25zd0qaeKLEmyRG6%3D7Ajeithg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAE3TgXFPi34Fh9p0DUp_BrN-aO%2B-zs_jW9L%3DgYHiTxF0dWcG_w%40mail.gmail.com.
My 2c on this.I like DCHECKs. I write DCHECKs. I never run with DCHECKs.It's just too unstable, and my number one priority day to day is to compile and run Chrome and develop the code I'm working on.
I still use them because they're a great way to explicitly state your assumptions/preconditions, which helps other developers contextualize your code.
But regarding turning on DCHECKs locally, if we want more reporting of DCHECK violations, why don't we make day to day life easier for local DCHECK-on builds? Do we really need to crash the browser when one of these conditions is violated? Can't we have a gn flag to log DCHECK failures as a Big Red Error with a stack trace, and suggest the developer file a bug? In my opinion, the less friction there is, the more adoption there'll be.Also, if there was a way to easily find out if a bug was already filed, that would reduce the bystander effect that I get when I run into a DCHECK failure.
What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.This would have several benefits:- We can quickly get to a steady-state where failing DCHECKs are rare, so more people can run with DCHECKs and catch issues sooner. Right now, these failing DCHECKs may be masking other issues from being introduced (resulting in more DCHECKs failing over time that are unnoticed).- We get a consistent policy between handling unit tests and DCHECKs.- The downside of those DCHECKs being disabled isn't such a big problem - after all, they're already disabled in production releases.
It's not like we're losing coverage much - it's more that we'd be gaining coverage for the remaining DCHECKs (by virtue of more users being able to run DCHECK builds).Of course, that's not to say the test disabling policy is perfect, there's certainly tests that stay disabled for a long time. But that side of the problem can be fixed separately (via discussions of what work teams should prioritize). And anyway, having a consistent policy simplifies things (can be reasoned about in the same way).
What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.
Most of the people building the iOS version of Chromium build and run with DCHECK enabled.
On Tue, May 18, 2021 at 11:05 AM Alexei Svitkine <asvi...@chromium.org> wrote:What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.This would have several benefits:- We can quickly get to a steady-state where failing DCHECKs are rare, so more people can run with DCHECKs and catch issues sooner. Right now, these failing DCHECKs may be masking other issues from being introduced (resulting in more DCHECKs failing over time that are unnoticed).- We get a consistent policy between handling unit tests and DCHECKs.- The downside of those DCHECKs being disabled isn't such a big problem - after all, they're already disabled in production releases.They are disabled in production, but that is under the assumption they are impossible to occur there. I don't think that leads to saying there's no downside to disabling them. A failing DCHECK means our code is doing something unexpected, and it could lead to any sort of surprising result. That we can't know if it's happening on users 'machines does not devalue the urgency of knowing that it's happening and fixing it IMO.
On Tue, May 18, 2021 at 11:31 AM <dan...@chromium.org> wrote:On Tue, May 18, 2021 at 11:05 AM Alexei Svitkine <asvi...@chromium.org> wrote:What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.This would have several benefits:- We can quickly get to a steady-state where failing DCHECKs are rare, so more people can run with DCHECKs and catch issues sooner. Right now, these failing DCHECKs may be masking other issues from being introduced (resulting in more DCHECKs failing over time that are unnoticed).- We get a consistent policy between handling unit tests and DCHECKs.- The downside of those DCHECKs being disabled isn't such a big problem - after all, they're already disabled in production releases.They are disabled in production, but that is under the assumption they are impossible to occur there. I don't think that leads to saying there's no downside to disabling them. A failing DCHECK means our code is doing something unexpected, and it could lead to any sort of surprising result. That we can't know if it's happening on users 'machines does not devalue the urgency of knowing that it's happening and fixing it IMO.If you agree that DCHECKs provide lots of value (of detecting bad assumptions/problems), do you disagree with my argument that if we do the above:1. We would get more value from getting coverage for DCHECKs in general (by more people being able to run DCHECK builds since they're expected to be stable).2. Compared to the value we lose from those specific DCHECKs being disabled.In my mind, a small minority of DCHECKs will be disabled, so we lose coverage for them. But then all the other DCHECKs will get more coverage (since it will be a configuration most people can use - e.g. in local builds).As to prioritization of investigation and fixes, that's up to the team that owns the code and their evaluation of the DCHECK. For example, I filed a bug about a DCHECK about Linux breakpad initialization (crbug.com/1197559). The discussion on that bug is that we're migrating from breakpad to crashpad, so this code path would be going away and therefore fixing that DCHECK is not a priority. Which makes sense, so that's a case where disabling the DCHECK is the correct thing.
On Tue, May 18, 2021 at 11:45 AM Alexei Svitkine <asvi...@chromium.org> wrote:On Tue, May 18, 2021 at 11:31 AM <dan...@chromium.org> wrote:On Tue, May 18, 2021 at 11:05 AM Alexei Svitkine <asvi...@chromium.org> wrote:What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.This would have several benefits:- We can quickly get to a steady-state where failing DCHECKs are rare, so more people can run with DCHECKs and catch issues sooner. Right now, these failing DCHECKs may be masking other issues from being introduced (resulting in more DCHECKs failing over time that are unnoticed).- We get a consistent policy between handling unit tests and DCHECKs.- The downside of those DCHECKs being disabled isn't such a big problem - after all, they're already disabled in production releases.They are disabled in production, but that is under the assumption they are impossible to occur there. I don't think that leads to saying there's no downside to disabling them. A failing DCHECK means our code is doing something unexpected, and it could lead to any sort of surprising result. That we can't know if it's happening on users 'machines does not devalue the urgency of knowing that it's happening and fixing it IMO.If you agree that DCHECKs provide lots of value (of detecting bad assumptions/problems), do you disagree with my argument that if we do the above:1. We would get more value from getting coverage for DCHECKs in general (by more people being able to run DCHECK builds since they're expected to be stable).2. Compared to the value we lose from those specific DCHECKs being disabled.In my mind, a small minority of DCHECKs will be disabled, so we lose coverage for them. But then all the other DCHECKs will get more coverage (since it will be a configuration most people can use - e.g. in local builds).As to prioritization of investigation and fixes, that's up to the team that owns the code and their evaluation of the DCHECK. For example, I filed a bug about a DCHECK about Linux breakpad initialization (crbug.com/1197559). The discussion on that bug is that we're migrating from breakpad to crashpad, so this code path would be going away and therefore fixing that DCHECK is not a priority. Which makes sense, so that's a case where disabling the DCHECK is the correct thing.I agree, if we can see that disabling the DCHECK doesn't lead to other pathalogical behaviour, and/or we can add code to handle the case incorrectly-assumed to not happen.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaSjZ_wOFX%2Boi2n_%3DVW%3DxXrRV%2Bnge_WqhOSuWm0c_LJkaw%40mail.gmail.com.
On Tue, May 18, 2021 at 9:47 AM Sylvain Defresne <sdef...@chromium.org> wrote:Most of the people building the iOS version of Chromium build and run with DCHECK enabled.Has the team working on the iOS platform been diligent from day 1 in running with DCHECK enabled and kept it working well, or did the team slip and have to return to that?I’m asking because this seems like a tragedy of the commons situation. The problem is that Chromium is full of broken DCHECKs, and the incentive is for every developer to take the route of running without DCHECKs.
I'm sure that the scale of the problem on desktop is far larger than what we had to deal with on iOS, but if we can get back to a known-good state, maintaining that should become a lot easier. From my experience, I think it's worth the effort.
PK
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFC_GceQsPLGB%2Bgtjy_tstz-ZiQ6AhFSqKu_wKmH%3D-o-VQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAA2pCLfmTiG_GUjSkTZ3Q8u21hPDX_waUO1ZnRwPghL%2BMHzkDw%40mail.gmail.com.
As mentioned earlier we already have something slightly better than this for the Windows platform, where we ship dcheck-enabled builds to a population of users (Albatross builds); users explore substantially more of Chrome's feature space than any simple CI tests would do. We don't have anything like this for other platforms, however, so something on the CI could be a good starting point there.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAA2pCLcOgjeicy2Wwx18%3DsApT%2BVrCyJpdGjDARhOxEf7YJMPtA%40mail.gmail.com.
There are concerns that enabling DCHECK can slow down development.
On Tue, May 18, 2021 at 8:26 PM Sven Zheng <sven...@chromium.org> wrote:There are concerns that enabling DCHECK can slow down development.I don't understand those concerns; can you clarify what you mean by "slow down development"?DCHECKs are the invariants of the code you are writing, in that you are writing in machine-runnable format your expectations about how the code should behave. If you are not running a DCHECK-enabled build, how are you verifying that the code you are writing is actually following the expectations you've written into the code?I would argue that it speeds up development to actually test the DCHECKs you're putting into the code yourself. If you put DCHECKs into the code but don't run with DCHECKs enabled, you're outsourcing to other people the basic validation of the code that you've written, which is slower.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAZ%3DY5tBqEaAW%2BEZqsz16SUdMME0X3Sj6gA3292BJTi0cA%40mail.gmail.com.
I can’t even access a test page without hitting four different DCHECKs each crashing the browser in a different way,
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAZ5v5%2BsD-dcVQVLg608EAaGcoc9zFnTZzRc7ai0FTDrQQ%40mail.gmail.com.
From a V8 perspective: +1 to running with DCHECKs.Should V8 constitute an obstacle for this plan in any way, we'll fix it. We already have a distinction between DCHECK and SLOW_DCHECK, where the latter need an extra build time flag + runtime flag to turn on. And we have a very strong (and ClusterFuzz-supported) culture to treat every failing DCHECK in V8 as a high-priority bug (so I highly doubt you'll run into any; but if you do, please let us know!).I actually run full Debug builds of Chromium (with renderers in GDB) every now and then, when chasing down crashes. Hitting unrelated DCHECKs as part of that has been an occasional but not super-frequent annoyance in the past. I agree with what's been said that full Debug builds are too slow for regular usage (but they're very useful for debugging!).I don't think the purpose of Debug builds is to provide more coverage than Release+DCHECK. I think their purpose is to be debuggable in debuggers :-)
On Thu, May 20, 2021 at 10:05 AM Jakob Kummerow <jkum...@chromium.org> wrote:From a V8 perspective: +1 to running with DCHECKs.Should V8 constitute an obstacle for this plan in any way, we'll fix it. We already have a distinction between DCHECK and SLOW_DCHECK, where the latter need an extra build time flag + runtime flag to turn on. And we have a very strong (and ClusterFuzz-supported) culture to treat every failing DCHECK in V8 as a high-priority bug (so I highly doubt you'll run into any; but if you do, please let us know!).I actually run full Debug builds of Chromium (with renderers in GDB) every now and then, when chasing down crashes. Hitting unrelated DCHECKs as part of that has been an occasional but not super-frequent annoyance in the past. I agree with what's been said that full Debug builds are too slow for regular usage (but they're very useful for debugging!).I don't think the purpose of Debug builds is to provide more coverage than Release+DCHECK. I think their purpose is to be debuggable in debuggers :-)+1. I use debug if I need to run in a debugger. Since I mostly printf debug, I run in release+component+dchecks. It builds fast and runs fast and includes the correctness checks.I think debug == !NDEBUG is correct and changing that relationship would not be great. I would suggest dchecks_always_on=true be the default unless is_official_build=true (our true "release" build), and we disable it explicitly on bots that want to test without them.
Is the idea behind NDEBUG that you'd have an optimized code path in NDEBUG that you can't easily follow under a debugger?
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAAHOzFDA8%3DNb-HMY2_N8O2-ggeU_OZFYXWsGyDJ1BwoH2c4u_w%40mail.gmail.com.
On Tue, May 18, 2021 at 11:05 AM Alexei Svitkine <asvi...@chromium.org> wrote:What if we treat failing DCHECKs the same as we do failing unit tests?i.e. the policy is to disable them with a bug and assign them to the appropriate owner.This would have several benefits:- We can quickly get to a steady-state where failing DCHECKs are rare, so more people can run with DCHECKs and catch issues sooner. Right now, these failing DCHECKs may be masking other issues from being introduced (resulting in more DCHECKs failing over time that are unnoticed).- We get a consistent policy between handling unit tests and DCHECKs.- The downside of those DCHECKs being disabled isn't such a big problem - after all, they're already disabled in production releases.They are disabled in production, but that is under the assumption they are impossible to occur there. I don't think that leads to saying there's no downside to disabling them. A failing DCHECK means our code is doing something unexpected, and it could lead to any sort of surprising result. That we can't know if it's happening on users 'machines does not devalue the urgency of knowing that it's happening and fixing it IMO.It's not like we're losing coverage much - it's more that we'd be gaining coverage for the remaining DCHECKs (by virtue of more users being able to run DCHECK builds).Of course, that's not to say the test disabling policy is perfect, there's certainly tests that stay disabled for a long time. But that side of the problem can be fixed separately (via discussions of what work teams should prioritize). And anyway, having a consistent policy simplifies things (can be reasoned about in the same way).They are similar, however check failures appear to be even more urgent than a test failure to me. Test failures are often due to our test environment/infrastructure or the way the test is written. DCHECKs firing implies that chrome itself can exhibit this behaviour and unpredictable results will follow for a user.On Tue, May 18, 2021 at 10:38 AM 'Raymond Toy' via Chromium-dev <chromi...@chromium.org> wrote:I generally run with DCHECKS on, mostly to catch mistakes in the code I'm writing. Sometimes I run into failures in other code so I turn it off because I'm trying to get something done right now. Most of the dcheck other failures I've run in to get fixed by someone in a day or two so I haven't been diligent about filing bugs about the failures.The only other time I run with DCHECKS off is if I'm trying to benchmark something. (And then I sometimes forget to turn it back on when I'm done.)On Tue, May 18, 2021 at 6:48 AM Sylvain Defresne <sdef...@chromium.org> wrote:Most of the people building the iOS version of Chromium build and run with DCHECK enabled. On that platform, encountering DCHECK failure is unusual (it happens from time to time). This makes detecting regression easy. If a DCHECK starts failing, it is usually caused by a recently landed CL. CLs that introduce DCHECK failure are usually quickly reverted (especially if the DCHECK fails frequently).I think being able to run Chromium with DCHECK enabled locally is good to catch bugs and is achievable (at least one platform has been able to put this under control). It may be a pain if only a few developers run in that configuration as it puts the workload on those few developers. If most of the developers have DCHECK enabled, then I'm confident that the current situation can get under control eventually. Once this is done, then new regression will be caught earlier and will have less time to impact everyone.-- SylvainOn Tue, May 18, 2021 at 3:30 PM <dan...@chromium.org> wrote:Logging that undefined behaviour is happening doesn't seem like a great situation to be in. Honestly it sounds like maybe we should be writing CHECKs instead of DCHECKs, if we're in a situation where the behaviour of Chromium is so undefined that developers are not able to run it without encountering that constantly. A product where we can expect undefined behaviour for users is a terrible place to be IMO.On Tue, May 18, 2021 at 3:32 AM Wez <w...@chromium.org> wrote:We already have a flag which causes DCHECKS to be checked, but to then be reported at ERROR level - you can set |dcheck_is_configurable=true| to build with that. It implies |dcheck_always_on|, so you can replace one with the other.On Tue, 18 May 2021 at 06:32, 'Chris Lam' via Chromium-dev <chromi...@chromium.org> wrote:My 2c on this.I like DCHECKs. I write DCHECKs. I never run with DCHECKs.It's just too unstable, and my number one priority day to day is to compile and run Chrome and develop the code I'm working on. I still use them because they're a great way to explicitly state your assumptions/preconditions, which helps other developers contextualize your code.But regarding turning on DCHECKs locally, if we want more reporting of DCHECK violations, why don't we make day to day life easier for local DCHECK-on builds? Do we really need to crash the browser when one of these conditions is violated? Can't we have a gn flag to log DCHECK failures as a Big Red Error with a stack trace, and suggest the developer file a bug? In my opinion, the less friction there is, the more adoption there'll be.Also, if there was a way to easily find out if a bug was already filed, that would reduce the bystander effect that I get when I run into a DCHECK failure.On Thu, May 13, 2021 at 9:28 PM Satoru Takabayashi <sat...@chromium.org> wrote:On Thu, May 13, 2021 at 5:28 AM 'Avi Drissman' via Chromium-dev <chromi...@chromium.org> wrote:On Wed, May 12, 2021 at 3:59 PM Ken Rockot <roc...@google.com> wrote:I worry that this would be a counterproductive default policy. In many cases the DCHECK is correct, and the direct owner is not necessarily responsible for all code paths which might lead to its violation.I think this happens commonly with DCHECKs in low level code (ex. thread_restrictions.cc).An interesting question would be how did this evolve. Did the direct owner add the DCHECK to an existing system? If so, then they don't fully understand it, and are directly responsible. Did a second developer add new code that caused the existing DCHECK in a different part of the codebase to fire? How did they do that without noticing the DCHECK firing? Did they have DCHECKs turned off?I think it's the latter in many cases.To be clear, I am not advocating for or against this policy of turning off DCHECKs. I just want to point out how the argument against this policy is indicative of the situation we're in, where a downward spiral of people turning off DCHECKs on local builds has yielded a situation where we have to consider tough policies.Avi
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACWgwAYB%3DQYEawhobSq0%3Dm8BMN2zwCspO2CXJDG1HWVxpoXAkA%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CACjFnbyYpgmDr-J%2B0GUjD49%2B_%3DqTyO7ZpSmwH3HmhLZus22rvw%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CA%2Bg1BH0HO6zoLFv1Jcep1GSE_kDZGVtVAROpFc9O%2BqE%3DyLoD1A%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CALekkJc9WnK84mX_jGNFp031_KXSdJeKpgmgj_xTbJttbz9j-w%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaSzAKs9fQQd%3DVcGtfOKXCHkRBkDRVHjtvW-vaRv92gzVQ%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJauWCHP91osS0D8x8Oow%3DdG%3D25zd0qaeKLEmyRG6%3D7Ajeithg%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAE3TgXFPi34Fh9p0DUp_BrN-aO%2B-zs_jW9L%3DgYHiTxF0dWcG_w%40mail.gmail.com.
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAHtyhaT%3DXF754nzKJByi%3DVF9z%2BnqTTyAObwrPHG2OWf7hvx29A%40mail.gmail.com.