[SERVER-46596] Compiling can fail with an archive error Created: 03/Mar/20  Updated: 27/Oct/23  Resolved: 10/Mar/20

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Daniel Gottlieb (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Gone away Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Server Development Platform
Operating System: ALL
Participants:
Linked BF Score: 18

 Description   

I'm on Ubuntu 16.04 with the following versions:

dgottlieb@chimichurri ~/xgen/mongo2[master]$ ccache --version
ccache version 3.7.7
 
Copyright (C) 2002-2007 Andrew Tridgell
Copyright (C) 2009-2020 Joel Rosdahl
 
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
dgottlieb@chimichurri ~/xgen/mongo2[master]$ icecc --version
ICECC 1.1rc2
 
dgottlieb@chimichurri ~/xgen/mongo2[master]$ git log -1 --format=%H
61865d1617e39506c9e0c9202ba2bb50217c7c1e

Invoking scons to build a ninja file with:

/opt/mongodbtoolchain/v3/bin/python3 ./buildscripts/scons.py --dbg --variables-files=etc/scons/mongodbtoolchain_stable_clang.vars VARIANT_DIR=ninja MONGO_VERSION=$(git describe --abbrev=0 | sed -e "s/^r//") MONGO_GIT_HASH="unknown" --modules="" CCACHE=ccache ICECC=icecc --ninja generate-ninja

In addition to the spammy log lines regarding /proc/cpuinfo (that I've concluded are cosmetic only):

[3389/3421 ( 99%) 102.418s] Compiling build/ninja/mongo/db/repl/replication_coordinator_impl.o
Can't read /proc/cpuinfo: No such file or directory
Can't read /proc/cpuinfo: No such file or directory

My compile will fail with an archiving error such as:

FAILED: build/ninja/mongo/util/liblatch_analyzer.a 
PATH=/opt/mongodbtoolchain/v3/bin:/usr/local/bin:/opt/bin:/bin:/usr/bin ICECC_CLANG_REMOTE_CPP=1 CCACHE_NOCPP2=1 ICECC_VERSION=/home/dgottlieb/xgen/mongo2/build/scons/icecc/opt_mongodbtoolchain_v3_bin_clang_opt_mongodbtoolchain_v3_bin_clang++.tar.gz CCACHE_PREFIX=/usr/bin/icecc /usr/bin/icerun /opt/mongodbtoolchain/v3/bin/ar @build/ninja/mongo/util/liblatch_analyzer.a.rsp
/opt/mongodbtoolchain/v3/bin/ar: build/ninja/mongo/util/liblatch_analyzer.a: File format not recognized

Contents of the file:

dgottlieb@chimichurri ~/xgen/mongo2[master]$ ll build/ninja/mongo/util/liblatch_analyzer.a.rsp
.rw-rw-r-- 88 dgottlieb  3 Mar 16:19 build/ninja/mongo/util/liblatch_analyzer.a.rsp
dgottlieb@chimichurri ~/xgen/mongo2[master]$ hexdump -c build/ninja/mongo/util/liblatch_analyzer.a.rsp
0000000   r   c   s   T   D       b   u   i   l   d   /   n   i   n   j
0000010   a   /   m   o   n   g   o   /   u   t   i   l   /   l   i   b
0000020   l   a   t   c   h   _   a   n   a   l   y   z   e   r   .   a
0000030       b   u   i   l   d   /   n   i   n   j   a   /   m   o   n
0000040   g   o   /   u   t   i   l   /   l   a   t   c   h   _   a   n
0000050   a   l   y   z   e   r   .   o                                
0000058
dgottlieb@chimichurri ~/xgen/mongo2[master]$ cat build/ninja/mongo/util/liblatch_analyzer.a.rsp
rcsTD build/ninja/mongo/util/liblatch_analyzer.a build/ninja/mongo/util/latch_analyzer.odgottlieb@chimichurri ~/xgen/mongo2[master]$ 



 Comments   
Comment by Andrew Morrow (Inactive) [ 03/Apr/20 ]

daniel.gottlieb - If you ever see this again, could you please try re-executing the failed ar command, not just dumping the output of the rsp file? I'm curious to know if the error is repeatable. Getting some information about the .a file itself would be interesting too. What is inside this corrupt .a? In particular, is it empty?

Comment by Andrew Morrow (Inactive) [ 31/Mar/20 ]

daniel.gottlieb and cristopher.stauffer - There is a known BF for this, BF-14906.

Comment by Brooke Miller [ 10/Mar/20 ]

Please let us know if you see the problem again, daniel.gottlieb, so that we can re-open this ticket.

Comment by Daniel Gottlieb (Inactive) [ 09/Mar/20 ]

When I check out the same commit I filed here, I no longer see the problem.

Comment by Cristopher Stauffer [ 09/Mar/20 ]

Dan, does this problem happen every time?

Generated at Thu Feb 08 05:11:55 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.