Repository: rust
Issue: Backtrace output displays "<unknown>" when the code running in docker container mounted directory
Labels: O-macos,T-compiler,C-bug,requires-custom-config

The file name and line number cannot be displayed in the backtrace output when running in a **mounted directory within a Docker container**.

```
Custom backtrace:    0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: __libc_start_main
  10: <unknown>
```

When running in a **non-mounted directory** within a Docker container, the backtrace output is as expected:

```
Custom backtrace:    0: std::backtrace_rs::backtrace::libunwind::trace
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1: std::backtrace_rs::backtrace::trace_unsynchronized
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2: std::backtrace::Backtrace::create
             at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/backtrace.rs:331:13
   3: bt2::bt
             at ./src/main.rs:10:38
   4: bt2::main
             at ./src/main.rs:6:5
...
```



I tried this code:

Dockerfile:
```Dockerfile
FROM ubuntu:20.04

RUN apt-get update && apt-get install -y tzdata
ENV tz Asia/Tokyo
RUN cp /usr/share/zoneinfo/$tz /etc/localtime && echo $tz | tee /etc/timezone

RUN apt-get update && apt-get install -y \
    software-properties-common build-essential \
    vim curl wget git inetutils-ping net-tools
```

docker-compose.yml:
```yml
version: "2"
services:
  test_bt:
    image: bttest
    volumes:
      - /Users/john/test_bt:/app
    restart: always
    stdin_open: true
    tty: true
    privileged: true
```

src/main.rs:
```rust
use std::backtrace::Backtrace;

fn main() {
    println!("Hello, world!");

    bt();
}

fn bt() {
    println!("Custom backtrace: {}", Backtrace::capture());
}
```

Command: 
```
// in macos host
$ docker build -t bttest .
$ docker-compose up -d
$ cd && cargo init --bin test_bt
$ vim test_bt/src/main.rs
$ docker exec -it docker-test_bt-1 /bin/bash

// in docker container
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh  // from rustup.rs
$ cd /app && RUST_BACKTRACE=1 cargo run
```

### Meta

`rustc --version --verbose`:
```
rustc 1.75.0 (82e1608df 2023-12-21)
binary: rustc
commit-hash: 82e1608dfa6e0b5569232559e3d385fea5a93112
commit-date: 2023-12-21
host: aarch64-unknown-linux-gnu
release: 1.75.0
LLVM version: 17.0.6
```

Host: `macos 14.2.1 M2`
Docker version: 
```
Client:
 Cloud integration: v1.0.35+desktop.5
 Version:           24.0.6
 API version:       1.43
 Go version:        go1.20.7
 Git commit:        ed223bc
 Built:             Mon Sep  4 12:28:49 2023
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.24.2 (124339)
 Engine:
  Version:          24.0.6
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.7
  Git commit:       1a79695
  Built:            Mon Sep  4 12:31:36 2023
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.6.22
  GitCommit:        8165feabfdfe38c65b599c4993d227328c231fca
 runc:
  Version:          1.1.8
  GitCommit:        v1.1.8-0-g82f18fe
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
```