Closed Bug 1608849 Opened 6 years ago Closed 5 years ago

Linux fuzzing debug build should use clang

Categories

(Firefox Build System :: General, defect)

Unspecified
Linux
defect
Not set
normal

Tracking

(firefox77 fixed)

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: truber, Assigned: truber)

References

Details

Attachments

(1 file)

All other fuzzing builds except ccov are built with clang. This one was probably missed when we switched everything over to clang in 1480631.

Assignee: nobody → jschwartzentruber
Status: NEW → ASSIGNED

I pushed to try here:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5f70c55bea7b5f3da063b04ec220aadb847f4c2f

... but it's broken by a check failure:

20:39:45     INFO -  check> make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/memory/replace/logalloc/replay'
20:39:45     INFO -  check> MALLOC_LOG=1  ./../../../../dist/bin/logalloc-replay < /builds/worker/workspace/build/src/memory/replace/logalloc/replay/replay.log | sed -n '/jemalloc_stats/,$p' | /builds/worker/workspace/build/src/obj-firefox/_virtualenvs/init/bin/python /builds/worker/workspace/build/src/memory/replace/logalloc/replay/logalloc_munge.py | diff -w - expected_output.log
20:39:45     INFO -  check> #1 mapped: 2359296; allocated: 73760; waste: 262144; dirty: 0; bookkeep: 37008; binunused: 8016
20:39:45     INFO -  check> #12 mapped: 2359296; allocated: 84096; waste: 262144; dirty: 0; bookkeep: 38096; binunused: 74416
20:39:45     INFO -  check> 0a1,17
20:39:45     INFO -  check> > 1 1 jemalloc_stats()
20:39:45     INFO -  check> > 1 1 malloc(42)=#1
20:39:45     INFO -  check> > 1 1 malloc(24)=#2
20:39:45     INFO -  check> > 1 1 free(#1)
20:39:45     INFO -  check> > 1 1 posix_memalign(4096,1024)=#1
20:39:45     INFO -  check> > 1 1 calloc(4,42)=#3
20:39:45     INFO -  check> > 1 1 free(#2)
20:39:45     INFO -  check> > 1 1 realloc(#3,84)=#2
20:39:45     INFO -  check> > 1 1 aligned_alloc(256,1024)=#3
20:39:45     INFO -  check> > 1 1 memalign(512,1024)=#4
20:39:45     INFO -  check> > 1 1 valloc(1024)=#5
20:39:45     INFO -  check> > 1 1 jemalloc_stats()
20:39:45     INFO -  check> > 1 1 free(#5)
20:39:45     INFO -  check> > 1 1 free(#4)
20:39:45     INFO -  check> > 1 1 free(#3)
20:39:45     INFO -  check> > 1 1 free(#2)
20:39:45     INFO -  check> > 1 1 free(#1)
20:39:45     INFO -  check> Makefile:43: recipe for target 'check' failed
20:39:45    ERROR -  check> make[4]: *** [check] Error 1
20:39:45     INFO -  check> make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/memory/replace/logalloc/replay'
20:39:45     INFO -  check> /builds/worker/workspace/build/src/config/recurse.mk:101: recipe for target 'memory/replace/logalloc/replay/check' failed

glandium, do you know what the issue is here and what we could do to fix it?

Flags: needinfo?(mh+mozilla)

So, what's going on is that ubsan has a static initializer that calls dlsym, which allocates memory, which initializes the allocator. That's at that point that the allocator looks for the MALLOC_LOG environment variable to initialize the allocator logger. The problem is that the ubsan static initializer runs before the environ global variable pointing to the environment variables is initialized, so when the allocator calls getenv during initialization, it gets no result, which prevents the allocator logger from being initialized, which prevents the test from working at all.

Flags: needinfo?(mh+mozilla)

There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:truber, could you have a look please?
For more information, please visit auto_nag documentation.

Flags: needinfo?(jschwartzentruber)

choller pointed out that if the ubsan allocator is in use, we should not be linking jemalloc. I'll fix that in bug 1435148.

Depends on: 1435148
Flags: needinfo?(jschwartzentruber)
Pushed by choller@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6cac3798d4e5 Switch Linux Fuzzing Debug build to use clang. r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77

[alert posted originally in the wrong bug]

(In reply to Alexandru Ionescu (needinfo me) :alexandrui from comment #9)

== Change summary for alert #25655 (as of Mon, 20 Apr 2020 22:22:14 GMT) ==

This alert was attached to the wrong bug. Based on the graph, https://treeherder.mozilla.org/perf.html#/graphs?highlightAlerts=1&series=autoland,1928265,1,1&timerange=604800&zoom=1587033232045,1587474018144,100.23899016243347,415.100112635844,

The improvements are a fix for the regression in alert #25647, which is still untriaged. The regression was noticed by a user in bug 1631293 and fixed there.

Could you please link alert #25647 to those bugs?

Flags: needinfo?(aionescu)

Thank you, :dmajor

Flags: needinfo?(aionescu)
No longer depends on: 1435148
See Also: → 1435148
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: