Artifacts Associated With Ticket 7c934f4a3d
Ticket change [4fa7a5c642] (rid 226877) by apnadkarni on 2024-05-28 11:28:43:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-markdown"
- comment initialized to:
The following error is printed during a valgrind test run ``` impossible to invoke method "write": no defined method or unknown method while executing "my rpc write otto-$hdl" (class "::MkObjectRpc" destructor line 2) ``` Above does not show if oo-35.7.1 and oo-35.7.2 are disabled or outside of valgrind. Note no test failures are reported, only the above message is printed to output. Further, the message is printed while the file following oo.test - process.test - is running. Running oo.test by itself does not print the error. This makes me suspect it is some background error that is being printed at a later point. Running oo.test by itself probably exits before the error is printed (conjecture). - foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "apnadkarni"
- priority initialized to: "5 Medium"
- private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "apnadkarni"
- subsystem initialized to: "- New Builtin Commands"
- title initialized to: "oo error printed during valgrind run"
- type initialized to: "Bug"
Ticket change [3d75f9a6b7] (rid 226880) by apnadkarni on 2024-05-28 11:34:40:
- icomment:
sebres › apn, related to 7c934f4a3d5fbe0c (oo error), I saw the same without valgrind, but testing with -singleproc 1
- login: "apnadkarni"
- mimetype: "text/plain"
- icomment:
Ticket change [2796f8c676] (rid 227030) by dkf on 2024-05-30 20:21:00:
- icomment: "[7842f33a5c] is indeed related."
- login: "dkf"
- mimetype: "text/x-fossil-plain"
Ticket change [3a57eeb640] (rid 227031) by dkf on 2024-05-30 20:34:16:
- icomment:
The *problem* is that this is trying to do a callback into an object that is in an advanced state of dying, and where that callback is being done from a destructor on an object deleted during that main deletion process. Ugh! Be aware that this will *never* work as written (or rather as originally written; these two failing tests are cut down versions of it designed to determine whether things were crashing, which they were originally); the `write` method implementation in question is definitely not callable at that point. Not that I think we ought to alter these tests. They're making sure we don't do really bad things. I'm actually more interested in why enabling valgrind is causing an empty call chain to be generated (which is what this particular error message is reporting) when otherwise there is no error. That makes me suspicious that there's a Use-After-Free present or that some flag isn't being set correctly... NB: I can't run valgrind on this machine.
- login: "dkf"
- mimetype: "text/x-markdown"
- icomment:
Ticket change [45912d5d2d] (rid 227032) by dkf on 2024-05-30 20:39:34:
- icomment:
The error is *printed* because when you're tangled that far down inside deletion traces and namespace deletion callbacks, there's simply no route to report it sanely except via the background error message mechanism (and that's got a simple message printer attached). Anyway, the questions are: 1. Why does this let this message through with valgrind in use? 2. Why does this *not happen* in other configurations?
- login: "dkf"
- mimetype: "text/x-markdown"
- priority changed to: "9 Immediate"
- severity changed to: "Severe"
- icomment:
Ticket change [1f009521e4] (rid 227044) by dkf on 2024-05-31 09:02:19:
- closedate changed to: "2460461.8766152"
- closer changed to: "dkf"
- icomment:
This turned out to be not very serious after all. Phew! What was happening was that those tests were pitching errors into the background error mechanism (because they arise at a point when we've gone through a C API that *can't* produce errors). Not sure why the valgrind runs were running `update` but the fix was to install our own logging `bgerror` and put the `update` inside the test. Then *all* builds see that *expected error* and the test will in fact fail without it. It was mostly working as designed except for the error handling. No C changes needed.
- login: "dkf"
- mimetype: "text/x-markdown"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"
Ticket change [4a2365b0ca] (rid 227070) by dkf on 2024-05-31 11:01:54:
- assignee changed to: "dkf"
- closedate changed to: "2460461.95965936"
- login: "dkf"
- mimetype: "text/plain"
- subsystem changed to: "35. TclOO Package"