Repository: electron/electron (language: cpp)

Issue:
Symbol generation is failing for 32-bit Windows release builds for nightlies and 19-x-y
Symbol generation on 32-bit Windows release builds on nightlies and 19-x-y are failing with the following error:

```
C:/depot_tools/bootstrap-2@3_8_10_chromium_23_bin/python3/bin/python3.exe ../../electron/build/dump_syms.py ./dump_syms.exe electron.exe breakpad_symbols gen/electron/electron_app_symbols.stamp
failed to get function name
WriteSymbols failed.
Traceback (most recent call last):
  File "../../electron/build/dump_syms.py", line 53, in <module>
    main(*sys.argv[1:])
  File "../../electron/build/dump_syms.py", line 42, in main
    symbol_data = subprocess.check_output(args).decode(sys.stdout.encoding)
  File "C:\depot_tools\bootstrap-2@3_8_10_chromium_23_bin\python3\bin\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\depot_tools\bootstrap-2@3_8_10_chromium_23_bin\python3\bin\lib\subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['./dump_syms.exe', 'electron.exe']' returned non-zero exit status 1.
ninja: build stopped: subcommand failed.
Command exited with code 1
```
Here's a recent nightly release build with the failure: https://ci.appveyor.com/project/electron-bot/electron-ia32-release/builds/43164264

It looks like this failure was introduced via #33454.



Discussion / hints:

Fix patch:
diff --git a/appveyor.yml b/appveyor.yml
index f693c7d634e8a..540fd50f0df75 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -180,19 +180,16 @@ build_script:
   - python %LOCAL_GOMA_DIR%\goma_ctl.py stat
   - python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
   - 7z a node_headers.zip out\Default\gen\node_headers
-  # Temporarily disable symbol generation on 32-bit Windows due to failures  
   - ps: >-
-      if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') {
+      if ($env:GN_CONFIG -eq 'release') {
         # Needed for msdia140.dll on 64-bit windows
         $env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
         ninja -C out/Default electron:electron_symbols
       }
   - ps: >-
       if ($env:GN_CONFIG -eq 'release') {
-        if ($env:TARGET_ARCH -ne 'ia32') {
-          python electron\script\zip-symbols.py
-          appveyor-retry appveyor PushArtifact out/Default/symbols.zip
-        }
+        python electron\script\zip-symbols.py
+        appveyor-retry appveyor PushArtifact out/Default/symbols.zip
       } else {
         # It's useful to have pdb files when debugging testing builds that are
         # built on CI.
diff --git a/script/release/release.js b/script/release/release.js
index 221d7bd6d7cf4..c3c8d6363b120 100755
--- a/script/release/release.js
+++ b/script/release/release.js
@@ -128,9 +128,8 @@ function assetsForVersion (version, validatingRelease) {
     `electron-${version}-mas-arm64-dsym-snapshot.zip`,
     `electron-${version}-mas-arm64-symbols.zip`,
     `electron-${version}-mas-arm64.zip`,
-    // TODO(jkleinsc) Symbol generation on 32-bit Windows is temporarily disabled due to failures
-    // `electron-${version}-win32-ia32-pdb.zip`,
-    // `electron-${version}-win32-ia32-symbols.zip`,
+    `electron-${version}-win32-ia32-pdb.zip`,
+    `electron-${version}-win32-ia32-symbols.zip`,
     `electron-${version}-win32-ia32.zip`,
     `electron-${version}-win32-x64-pdb.zip`,
     `electron-${version}-win32-x64-symbols.zip`,
diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py
index 69c4bbfa5720d..a73955786e47c 100755
--- a/script/release/uploaders/upload.py
+++ b/script/release/uploaders/upload.py
@@ -76,10 +76,9 @@ def main():
   shutil.copy2(os.path.join(OUT_DIR, 'dist.zip'), electron_zip)
   upload_electron(release, electron_zip, args)
   if get_target_arch() != 'mips64el':
-    if (get_target_arch() != 'ia32' or PLATFORM != 'win32'):
-      symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
-      shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
-      upload_electron(release, symbols_zip, args)
+    symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
+    shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
+    upload_electron(release, symbols_zip, args)
   if PLATFORM == 'darwin':
     if get_platform_key() == 'darwin' and get_target_arch() == 'x64':
       api_path = os.path.join(ELECTRON_DIR, 'electron-api.json')
@@ -96,10 +95,9 @@ def main():
     shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip)
     upload_electron(release, dsym_snaphot_zip, args)    
   elif PLATFORM == 'win32':
-    if get_target_arch() != 'ia32':
-      pdb_zip = os.path.join(OUT_DIR, PDB_NAME)
-      shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip)
-      upload_electron(release, pdb_zip, args)
+    pdb_zip = os.path.join(OUT_DIR, PDB_NAME)
+    shutil.copy2(os.path.join(OUT_DIR, 'pdb.zip'), pdb_zip)
+    upload_electron(release, pdb_zip, args)
   elif PLATFORM == 'linux':
     debug_zip = os.path.join(OUT_DIR, DEBUG_NAME)
     shutil.copy2(os.path.join(OUT_DIR, 'debug.zip'), debug_zip)


Test patch: