Introduction

Bugzilla of the GCC compiler is full of errors where the compiler generates a crash report (yeah commonly known as ICE). When isolating an issues, it's very useful to identify which releases are affected, ideally which concrete revision the culprit. The common approach is to utilize git bisect command, however doing that for many issues can be exhausting.

Chosen approach

I've decided to write a python script that parses the git repository, identifies all releases (marked by git tags) and latest N revisions. The command is able to build a single git revision and install it to an install folder. Such approach is very fast (since you have built up all binaries) to bisect a PR.

All releases are built with 'configure --disable-bootstrap' and all other git revisions are built with '--disable-libsanitizer --disable-multilib --enable-languages=c,c++,fortran' options.

Calculations

Building a git revision (not a release revision) takes about 6 minutes. We've got about 7000 revisions per year and stripped (just debug info) binary folder occupies about 150MB. Which is quite a lot, but 7z compression shrinks that to about 35MB. The compression takes about 20s and decompression is very fast, just 2s.

That said, all built revisions would occupy about 240GB, which is reasonable size. Building all revisions would take me about 29 days.

Features and examples

  1. print command: shows available binaries

    Releases 72d56ebb66ff343f779686a70c7be429238f5d5d:4.5.0: OK 1f8be1d60ef7e4aba6fc9c289312a23478660404:4.5.1: OK 3598ee5d488243596fba837438824f6e7ab0b035:4.5.2: OK db65a9d18789609ec70d37f0bb956dd4d6420417:4.5.3: OK 0c2ca17227668950cae3876c44038c69bade181c:4.5.4: OK cc52afb59a7d680efc31b952a328b1d53022d8bc:4.6.0: OK 31b6f3a04d5ac5d9b9dddafc62cc4e41beb5e590:4.6.1: OK e07bbb139795b3a6702c7c00ab80524be0ba92e8:4.6.2: OK 31839765ee7d53766a69f418e9d7a4ed750de4e9:4.6.3: OK 632cb4d5f22f598d1395fbae90a10fb679e06054:4.6.4: OK 93c5ebd73a4d1626d25203081d079cdd68222fcc:4.7.0: OK 0e3097e7d505b7be8b05725988e27b2bea72fa39:4.7.1: OK c9b304ada7111264d743b1c588393b66a3e3edfb:4.7.2: OK f22940cb824859bd5dcc1c3cfcf7b535a5ba7084:4.7.3: OK ae10eb82fe34c18640ad65c2ab94ffc53f349315:4.7.4: OK e9c762ec4671d77e301492e4f9e92e1d3d667188:4.8.0: OK caa62b4636bfed7193ef77027f56d34a62047b19:4.8.1: OK 9bcca88e24e64d4e23636aafa3404088b13bcb0e:4.8.2: OK 6bbf0dec66c0e719b06cd2fe67559fda6df09000:4.8.3: OK 1a97fa0bb3fa5669f763ab43d6f2b77378b68ff6:4.8.4: OK cf82a597b0d189857acb34a08725762c4f5afb50:4.8.5: OK a7aa383874520cd5762701f1c790c930c5ab5bb5:4.9.0: OK c6fa1b412663593960e6240eb66d82fa41a1fa0b:4.9.1: OK c1283af40b65f1ad862cf5b27e2d9ed10b2076b6:4.9.2: OK 876d41ed80ce13e060084ed5a552c37c301e5563:4.9.3: OK d5ad84b309d0d97d3955fb1f62a96fc262df2b76:5.1.0: OK 7b26e3896e268cd452d68ff8df04f4563d5db6ef:5.2.0: OK 2bc376d60753a58b10cb179f8edb7d72bee7a88b:5.3.0: OK 32c3b88e8ced4b6d022484a73c40f3d663e20fd4:5.4.0: OK c441d9e8e0438dcf54274ec7a3539859e94ad201:6.1.0: OK

    Latest 30 revisions f757b746c0f0f028ad1ff9e23e9ef0a36d6412bb:01 Jul 2016 09:40: OK d0df4c4b9e1addd05fa28878f012f80d813de112:01 Jul 2016 02:16: OK bb68935b4d896ffbd401e01a73430c5e71163cce:30 Jun 2016 23:54: OK c54ee83c33f16ed8663c5637daccde341c530204:30 Jun 2016 20:45: OK a845ae6c1deef0894074c76465b2e5f0ee124e12:30 Jun 2016 19:45: OK 720a0bce9fa0bda69f32c4acfef4433a670b1d44:30 Jun 2016 19:39: OK 17c32c4aaee6a6e98fad4c8340023217c0ed1054:30 Jun 2016 17:59: OK be5f54e1da3d0a6f5c5b4bfa8333244365c601e4:30 Jun 2016 17:46: OK 443405c9d2da2bf7641c1210c2a9b1987d833157:30 Jun 2016 17:19: OK 6e3a3de215d62a8c47a8799833d0a5f72db21f7d:30 Jun 2016 17:15: OK 413c4f6cc73ad5380fb4a533d7b60dd3de7386ed:30 Jun 2016 16:28: OK adc565bd1d50272e67cc6789d203931f402697e5:30 Jun 2016 16:17: OK 4c4e99c34aae02d1215410f2b59c5c5edce641eb:30 Jun 2016 10:52: OK 4e1b04b0cc2248df1b7820c04743935147bd138e:30 Jun 2016 02:16: OK 26a2e9934e1f679b767e631ef75123712575e7f5:30 Jun 2016 02:05: OK 63abcf45e6ae2e8ad40005ded995ad6230bf6474:30 Jun 2016 01:54: OK 5f1d49ac8153c32d6487300d2882330334561489:29 Jun 2016 21:04: OK a635e1ec3f7149cf488aa9a93dad9c1d718e3b80:29 Jun 2016 20:48: OK 0dc00113df95e09c33edfa1d48936369b61142f3:29 Jun 2016 20:01: OK 4b9754452a128c03239faac31326e38e4ecca783:29 Jun 2016 18:04: OK e276a6b9be87e74fad8f40f21d2ce1424f335a1e:29 Jun 2016 15:48: OK 7624232c72dc18ad84ff64c64d4b33474d9d98b4:29 Jun 2016 15:11: OK 61a4bb9fb746d44939dc65b4f69651f98050b539:29 Jun 2016 15:03: OK c02f3e35299655db3875597930457a19ee5b556a:29 Jun 2016 14:37: missing binary 0bee934ee836516fe6ccc5fc92e517b106e1f12a:29 Jun 2016 14:32: missing binary d0c2a3dd9173b4734394df36624d921318121d9b:29 Jun 2016 14:32: missing binary 162fed22f136a19cdf4bc59e5619edfc6e80b58c:29 Jun 2016 14:26: missing binary 9ed0eb006e1744502d30583acc15d6082704db2f:29 Jun 2016 14:12: missing binary 641b1c869e717ea8ece45baa40471cef78b71581:29 Jun 2016 12:16: missing binary 44e775d8fa59d9732f2a10106c3f37e9e3224daa:29 Jun 2016 11:08: missing binary

  2. build command: builds and installs missing binaries

  3. test command: runs a command with all available binaries and shows return value

    Releases 4.5.0: [took: 0.003s] running command with result: FAILED 4.5.1: [took: 0.004s] running command with result: FAILED 4.5.2: [took: 0.003s] running command with result: FAILED 4.5.3: [took: 0.003s] running command with result: FAILED 4.5.4: [took: 0.003s] running command with result: FAILED 4.6.0: [took: 0.003s] running command with result: FAILED 4.6.1: [took: 0.003s] running command with result: FAILED 4.6.2: [took: 0.003s] running command with result: FAILED 4.6.3: [took: 0.003s] running command with result: FAILED 4.6.4: [took: 0.003s] running command with result: FAILED 4.7.0: [took: 0.018s] running command with result: OK 4.7.1: [took: 0.018s] running command with result: OK 4.7.2: [took: 0.019s] running command with result: OK 4.7.3: [took: 0.019s] running command with result: OK 4.7.4: [took: 0.019s] running command with result: OK 4.8.0: [took: 0.019s] running command with result: OK 4.8.1: [took: 0.020s] running command with result: OK 4.8.2: [took: 0.019s] running command with result: OK 4.8.3: [took: 0.020s] running command with result: OK 4.8.4: [took: 0.020s] running command with result: OK 4.8.5: [took: 0.020s] running command with result: OK 4.9.0: [took: 0.049s] running command with result: FAILED 4.9.1: [took: 0.049s] running command with result: FAILED 4.9.2: [took: 0.022s] running command with result: OK 4.9.3: [took: 0.020s] running command with result: OK 5.1.0: [took: 0.021s] running command with result: OK 5.2.0: [took: 0.021s] running command with result: OK 5.3.0: [took: 0.022s] running command with result: OK 5.4.0: [took: 0.021s] running command with result: OK 6.1.0: [took: 0.021s] running command with result: OK

    Latest revisions f757b746c0f0f028(01 Jul 2016 09:40): [took: 0.028s] running command with result: OK d0df4c4b9e1addd0(01 Jul 2016 02:16): [took: 0.028s] running command with result: OK bb68935b4d896ffb(30 Jun 2016 23:54): [took: 0.028s] running command with result: OK c54ee83c33f16ed8(30 Jun 2016 20:45): [took: 0.028s] running command with result: OK a845ae6c1deef089(30 Jun 2016 19:45): [took: 0.028s] running command with result: OK 720a0bce9fa0bda6(30 Jun 2016 19:39): [took: 2.308s] running command with result: OK 17c32c4aaee6a6e9(30 Jun 2016 17:59): [took: 2.329s] running command with result: OK be5f54e1da3d0a6f(30 Jun 2016 17:46): [took: 2.352s] running command with result: OK 443405c9d2da2bf7(30 Jun 2016 17:19): [took: 2.322s] running command with result: OK 6e3a3de215d62a8c(30 Jun 2016 17:15): [took: 2.347s] running command with result: OK 413c4f6cc73ad538(30 Jun 2016 16:28): [took: 2.419s] running command with result: OK adc565bd1d50272e(30 Jun 2016 16:17): [took: 2.419s] running command with result: OK 4c4e99c34aae02d1(30 Jun 2016 10:52): [took: 2.401s] running command with result: OK 4e1b04b0cc2248df(30 Jun 2016 02:16): [took: 2.311s] running command with result: OK 26a2e9934e1f679b(30 Jun 2016 02:05): [took: 2.321s] running command with result: OK 63abcf45e6ae2e8a(30 Jun 2016 01:54): [took: 2.394s] running command with result: OK 5f1d49ac8153c32d(29 Jun 2016 21:04): [took: 2.364s] running command with result: OK a635e1ec3f7149cf(29 Jun 2016 20:48): [took: 2.421s] running command with result: OK 0dc00113df95e09c(29 Jun 2016 20:01): [took: 2.387s] running command with result: OK 4b9754452a128c03(29 Jun 2016 18:04): [took: 2.434s] running command with result: OK e276a6b9be87e74f(29 Jun 2016 15:48): [took: 2.307s] running command with result: OK 7624232c72dc18ad(29 Jun 2016 15:11): [took: 2.359s] running command with result: OK 61a4bb9fb746d449(29 Jun 2016 15:03): [took: 2.360s] running command with result: OK c02f3e35299655db(29 Jun 2016 14:37): missing binary 0bee934ee836516f(29 Jun 2016 14:32): missing binary d0c2a3dd9173b473(29 Jun 2016 14:32): missing binary 162fed22f136a19c(29 Jun 2016 14:26): missing binary 9ed0eb006e174450(29 Jun 2016 14:12): missing binary 641b1c869e717ea8(29 Jun 2016 12:16): missing binary 44e775d8fa59d973(29 Jun 2016 11:08): missing binary

  4. bisect command: very similar to test command, but latest revisions are bisected to find a revision which flips

~/Programming/script-misc/gccbuildbinary.py ~/Programming/gcc2 ~/BIG/gcc-binaries/ bisect 'gcc -v 2>&1 | grep 20160629'

Bisecting latest revisions f757b746c0f0f028(01 Jul 2016 09:40): [took: 0.002s] running command with result: FAILED 61a4bb9fb746d449(29 Jun 2016 15:03): [took: 2.276s] running command with result: OK bisecting: 23 revisions (~4 steps) adc565bd1d50272e(30 Jun 2016 16:17): [took: 2.310s] running command with result: FAILED bisecting: 12 revisions (~3 steps) a635e1ec3f7149cf(29 Jun 2016 20:48): [took: 2.318s] running command with result: OK bisecting: 7 revisions (~2 steps) 26a2e9934e1f679b(30 Jun 2016 02:05): [took: 2.346s] running command with result: OK bisecting: 4 revisions (~1 steps) 4e1b04b0cc2248df(30 Jun 2016 02:16): [took: 2.340s] running command with result: FAILED

First change is:

4e1b04b0cc2248df(30 Jun 2016 02:16): [took: 2.325s] running command with result: FAILED 26a2e9934e1f679b(30 Jun 2016 02:05): [took: 2.367s] running command with result: OK

Looking for hackers with the skills:

Nothing? Add some keywords!

This project is part of:

Hack Week 14

Activity

  • over 7 years ago: dsterba liked this project.
  • over 7 years ago: marxin originated this project.

  • Comments

    Be the first to comment!

    Similar Projects

    This project is one of its kind!