Closed Bug 1668903 Opened 5 years ago Closed 4 years ago

dmd.py may need some py3 fixes

Categories

(Core :: DMD, task, P3)

task

Tracking

()

RESOLVED DUPLICATE of bug 1696531

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached file Emilio's fixes

I attached the things I had to do to make it work... But I'm moderately sure they're not python2 compatible.

I was running it like:

./mach python ./obj-debug-dmd-no-sccache/dist/bin/dmd.py dmd-logs-2/dmd-1601662768-299929.json.gz

Maybe I'm running it wrong?

Nick, I don't know how much we care about py2 for DMD stuff or what not. Is this patch acceptable? I could probably clean it up a bit to actually use key properly etc.

Flags: needinfo?(n.nethercote)

I just looked at the various invocation points and AFAICT they all just run dmd.py directly as an executable. So if you also change the first line of dmd.py to #! /usr/bin/env python3 I think that would be ok.

The tests to run to check this is ok are memory/replace/dmd/test/test_dmd.js and the AWSY+DMD job, which I think requires using ./mach try fuzzy --full to run.

Flags: needinfo?(n.nethercote)
Severity: -- → N/A
Priority: -- → P3

This is not user-facing, so I'm setting it to "task" so that the Severity Flag Alert bot stops yelling at me.

Emilio, do you want to put the patch you have up for review? I think it sounds reasonable if you set it to be explicitly python3 like njn suggested. Thanks.

Type: defect → task
Flags: needinfo?(emilio)
Assignee: nobody → emilio
Status: NEW → ASSIGNED
Flags: needinfo?(emilio)
Attachment #9191640 - Attachment is obsolete: true
Attachment #9191640 - Attachment is obsolete: false
Attachment #9191635 - Attachment is obsolete: true

Thanks for fixing this!

Blocks: 1696531
Flags: needinfo?(emilio)

I've been working on this as well, over in https://bugzilla.mozilla.org/show_bug.cgi?id=1696531. My latest runs are failing with errors like:

[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  TEST-PASS | memory/replace/dmd/test/test_dmd.js | test - [test : 118] script-max-frames-8 - true == true
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | --- /builds/worker/workspace/build/tests/xpcshell/tests/memory/replace/dmd/test/script-max-frames-3-expected.txt	2016-01-01 00:00:00.000000000 +0000
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | +++ /builds/worker/workspace/build/tests/xpcshell/tests/memory/replace/dmd/test/script-max-frames-3-actual.txt	2021-03-17 20:41:55.845767000 +0000
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | @@ -9,10 +9,9 @@
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |  #-----------------------------------------------------------------
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |  Live {
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | -  2 blocks in heap block record 1 of 3
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | -  4,224 bytes (4,224 requested / 0 slop)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | -  Individual block sizes: 4,096; 128
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | -  95.65% of the heap (95.65% cumulative)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | +  1 block in heap block record 1 of 4
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | +  4,096 bytes (4,096 requested / 0 slop)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | +  92.75% of the heap (92.75% cumulative)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |    Allocated at {
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |      #01: E (E.cpp:99)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |      #02: F (F.cpp:99)
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | @@ -21,7 +20,18 @@
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |  }
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 |  Live {
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | -  1 block in heap block record 2 of 3
[task 2021-03-17T20:41:55.975Z] 20:41:55     INFO -  PID 23458 | +  1 block in heap block record 2 of 4
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  128 bytes (128 requested / 0 slop)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  2.90% of the heap (95.65% cumulative)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  Allocated at {
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +    #01: E (E.cpp:99)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +    #02: F (F.cpp:99)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +    #03: G (G.cpp:99)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  }
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +}
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +Live {
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  1 block in heap block record 3 of 4
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    112 bytes (100 requested / 12 slop)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    2.54% of the heap (98.19% cumulative)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    Allocated at {
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | @@ -32,7 +42,7 @@
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |  }
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |  Live {
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | -  1 block in heap block record 3 of 3
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 | +  1 block in heap block record 4 of 4
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    80 bytes (80 requested / 0 slop)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    1.81% of the heap (100.00% cumulative)
[task 2021-03-17T20:41:55.976Z] 20:41:55     INFO -  PID 23458 |    Allocated at {
[task 2021-03-17T20:41:55.976Z] 20:41:55  WARNING -  TEST-UNEXPECTED-FAIL | memory/replace/dmd/test/test_dmd.js | test - [test : 118] script-max-frames-3 - false == true
Flags: needinfo?(emilio)

Ben does that failure ring a bell? I don't really see how my patch could've caused it...

Flags: needinfo?(emilio) → needinfo?(bhearsum)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #12)

Ben does that failure ring a bell? I don't really see how my patch could've caused it...

We talked about this a bit on Slack. I'm not exactly sure what's causing it, but I believe my patch stack fixes it. I'll be posting that soon, and hopefully getting it landed next week.

Flags: needinfo?(bhearsum)

I integrated this work with my overall xpcshell work in https://bugzilla.mozilla.org/show_bug.cgi?id=1696531, and the dmd tests are fully working now (see https://treeherder.mozilla.org/jobs?repo=try&revision=55e22157da9375b9198fb8c67e227910510104eb&searchStr=xpc for an example).

I'm going to close this as a dupe, with a huge thanks to Emilio for his patch, which was invaluable!

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Attachment #9191640 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: