polkadot
                                
                                 polkadot copied to clipboard
                                
                                    polkadot copied to clipboard
                            
                            
                            
                        Official docker polkadot image contains a `polkadot` executable with missing symbol table
Our official docker image for polkadot contains a polkadot binary with its whole .symtab section stripped. This results in useless backtraces anytime anything panics (e.g. see here or here).
The most likely culprit of this is that while building the image something (either directly on indirectly) calls strip on the polkadot binary which strips out the .symtab section necessary to decode the backtrace symbols. If so it instead should be called with the --strip-debug argument which will ensure that the symbol table is preserved.
(The polkadot binaries we put up in our Github releases don't have this problem.)
cc @paritytech/ci
One way of checking this is to use the file command on the binary before releasing it.
When used on the released Polkadot binary, this returns:
polkadot: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=38dc68abeb2d1fcb5a475a85a221d4f59470eb4b,
with debug_info, not stripped
on the Docker version of the binary, it shows "stripped":
docker-polkadot: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=9823d45269bac875dde7c7ead70bc497e771b98e,
stripped
this probably comes from the .deb package that the docker build pulls from, i'll dig further
it looks like cargo-deb strips it, we can pass --no-strip to that when building the deb to avoid this
This is resolved, right?
I just checked our newest Docker image; the .symtab section's there now, so this should be resolved. Thanks.