[SERVER-29886] Hang analyzer shouldn't produce core dumps on ASan builders Created: 28/Jun/17  Updated: 30/Oct/23  Resolved: 28/Jul/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.7, 3.5.11

Type: Task Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Yves Duhem
Resolution: Fixed Votes: 0
Labels: tig-hanganalyzer
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Duplicate
Related
related to SERVER-47312 Run hang_analyzer.py via assert.soon(... Closed
Backwards Compatibility: Fully Compatible
Backport Requested:
v3.4
Sprint: TIG 2017-07-31, TIG 2017-08-21
Participants:
Linked BF Score: 0

 Description   

ASan uses a very large amount of virtual memory to do its bookkeeping (20TB). When running the gcore command, GDB attempts to include the shadow memory of the process causing the core dump to reach the amount of available disk space before failing.

[2017/06/18 23:02:05.552] ubuntu   29054  1.9  0.6 21476345012 188920 ?  Sl   23:01   0:00 ./mongod --setParameter enableTestCommands=1 --setParameter enableLocalhostAuthBypass=false --dbpath /data/db/job0/resmoke --nopreallocj --auth --storageEngine mmapv1 --keyFile jstests/libs/authTestsKey --port 20000
...
[2017/06/19 01:16:11.226] ubuntu   29054  0.0  1.7 21476342668 533232 ?  tl   Jun18   0:06 ./mongod --setParameter enableTestCommands=1 --setParameter enableLocalhostAuthBypass=false --dbpath /data/db/job0/resmoke --nopreallocj --auth --storageEngine mmapv1 --keyFile jstests/libs/authTestsKey --port 20000

Based on my reading of https://sourceware.org/bugzilla/show_bug.cgi?id=16092, https://sourceware.org/ml/gdb-patches/2015-03/msg00144.html, and the changes in https://reviews.llvm.org/D7294?id=19035, I think GDB should already be respecting the madvise() settings when it goes to take a core dump.

However, until we are able to determine if there's different bits to set to modifies GDB's behavior, we should run hang_analyzer.py without specifying -c on the following build variants that compile with --sanitize=address:

  • ubuntu1604-asan
  • ubuntu1604-debug-asan
  • ubuntu1604-debug-aubsan-lite

This can be accomplished by setting a new hang_analyzer_dump_core=false expansion on the aforementioned build variants and defaulting the expansion to true if it is unset.



 Comments   
Comment by Githook User [ 28/Jul/17 ]

Author:

{'email': 'yves.duhem@mongodb.com', 'username': 'syev', 'name': 'Yves Duhem'}

Message: SERVER-29886 Do not produce core dumps on ASan builders

(cherry picked from commit d63e014e242832301fde2c9c4b1ccc04be767df2)
Branch: v3.4
https://github.com/mongodb/mongo/commit/144825f7bb036647bbb0cac1b0f6e1a86cacec59

Comment by Githook User [ 28/Jul/17 ]

Author:

{'email': 'yves.duhem@mongodb.com', 'username': 'syev', 'name': 'Yves Duhem'}

Message: SERVER-29886 Do not produce core dumps on ASan builders
Branch: master
https://github.com/mongodb/mongo/commit/d63e014e242832301fde2c9c4b1ccc04be767df2

Generated at Thu Feb 08 04:22:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.