From 572cb6528fa572c76e90ff13254dc567a5f9c3a7 Mon Sep 17 00:00:00 2001 From: AlexeyBarabash Date: Wed, 14 Feb 2018 19:18:03 +0200 Subject: [PATCH 1/2] wrapped with try finally to avoid infinite wait on failure --- tools/posix/generate_breakpad_symbols.py | 48 +++++++++++++----------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/tools/posix/generate_breakpad_symbols.py b/tools/posix/generate_breakpad_symbols.py index 32c9f8a085b3..257d7ceadbb7 100755 --- a/tools/posix/generate_breakpad_symbols.py +++ b/tools/posix/generate_breakpad_symbols.py @@ -191,27 +191,33 @@ def _Worker(): while True: binary = queue.get() - if options.verbose: - with print_lock: - print "Generating symbols for %s" % binary - - if sys.platform == 'darwin': - binary = GetDSYMBundle(options, binary) - elif sys.platform == 'linux2': - binary = GetSymbolPath(options, binary) - - syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c', - binary]) - module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms) - output_path = os.path.join(options.symbols_dir, module_line.group(2), - module_line.group(1)) - mkdir_p(output_path) - symbol_file = "%s.sym" % module_line.group(2) - f = open(os.path.join(output_path, symbol_file), 'w') - f.write(syms) - f.close() - - queue.task_done() + try: + if options.verbose: + with print_lock: + print "Generating symbols for %s" % binary + + if sys.platform == 'darwin': + binary = GetDSYMBundle(options, binary) + elif sys.platform == 'linux2': + binary = GetSymbolPath(options, binary) + + syms = GetCommandOutput([GetDumpSymsBinary(options.build_dir), '-r', '-c', + binary]) + module_line = re.match("MODULE [^ ]+ [^ ]+ ([0-9A-F]+) (.*)\n", syms) + output_path = os.path.join(options.symbols_dir, module_line.group(2), + module_line.group(1)) + mkdir_p(output_path) + symbol_file = "%s.sym" % module_line.group(2) + f = open(os.path.join(output_path, symbol_file), 'w') + f.write(syms) + f.close() + except Exception as inst: + if options.verbose: + with print_lock: + print type(inst) + print inst + finally: + queue.task_done() for binary in binaries: queue.put(binary) From f6ecfbf87d4433d4513b2a79f4a059a874eabe76 Mon Sep 17 00:00:00 2001 From: AlexeyBarabash Date: Wed, 14 Feb 2018 19:19:36 +0200 Subject: [PATCH 2/2] deps to generate symbols after executable is ready --- app/linux/BUILD.gn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/linux/BUILD.gn b/app/linux/BUILD.gn index 6b314c048791..9116b314993b 100644 --- a/app/linux/BUILD.gn +++ b/app/linux/BUILD.gn @@ -55,7 +55,10 @@ action("generate_breakpad_symbols") { "--clear", ] - deps = [ "//third_party/breakpad:dump_syms" ] + deps = [ + "//chrome", # To be sure brave executable is ready now + "//third_party/breakpad:dump_syms", + ] } group("symbol_dist_resources") {