Skip to content

debuginfo-gdb tests fail: <error reading variable> #39522

Closed
@canndrew

Description

@canndrew

This is really annoying because I haven't done a successful ./x.py test in months and it's causing me to submit shitty broken PRs.

I'm on NixOS with gdb-7.12.1. When running the test suite I get (with some cruft omitted):

---- [debuginfo-gdb] debuginfo-gdb/borrowed-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $3 = borrowed_enum::Univariant::TheOnlyCase(4820353753753434)
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/borrowed-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa1a: file /home/shum/src/rust/rust-a/src/test/debuginfo/borrowed-enum.rs, line 81.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, borrowed_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/borrowed-enum.rs:81
81	    zzz(); // #break
$1 = borrowed_enum::ABC::TheA{x: 0, y: 8970181431921507452}
$2 = borrowed_enum::ABC::TheB(0, 286331153, 286331153)
$3 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 30521] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/borrowed-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- [debuginfo-gdb] debuginfo-gdb/generic-struct-style-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $4 = generic_struct_style_enum::Univariant<i32>::TheOnlyCase{a: -1}
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/generic-struct-style-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa23: file /home/shum/src/rust/rust-a/src/test/debuginfo/generic-struct-style-enum.rs, line 86.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, generic_struct_style_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/generic-struct-style-enum.rs:86
86	    zzz(); // #break
$1 = generic_struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
$2 = generic_struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153}
$3 = generic_struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897}
$4 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 31117] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/generic-struct-style-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/generic-tuple-style-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $4 = generic_tuple_style_enum::Univariant<i64>::TheOnlyCase(-1)
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/generic-tuple-style-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa24: file /home/shum/src/rust/rust-a/src/test/debuginfo/generic-tuple-style-enum.rs, line 104.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, generic_tuple_style_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/generic-tuple-style-enum.rs:104
104	    zzz(); // #break
$1 = generic_tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868)
$2 = generic_tuple_style_enum::Regular::Case2(0, 286331153, 286331153)
$3 = generic_tuple_style_enum::Regular::Case3(0, 6438275382588823897)
$4 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 31186] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/generic-tuple-style-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/packed-struct.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $5 = 14
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/packed-struct.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xb7d: file /home/shum/src/rust/rust-a/src/test/debuginfo/packed-struct.rs, line 134.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, packed_struct::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/packed-struct.rs:134
134	    zzz(); // #break
$1 = packed_struct::Packed {x: 123, y: 234, z: 345}
$2 = packed_struct::PackedInPacked {a: 1111, b: packed_struct::Packed {x: 2222, y: 3333, z: 4444}, c: 5555, d: packed_struct::Packed {x: 6666, y: 7777, z: 8888}}
$3 = packed_struct::PackedInUnpacked {a: -1111, b: packed_struct::Packed {x: -2222, y: -3333, z: -4444}, c: -5555, d: packed_struct::Packed {x: -6666, y: -7777, z: -8888}}
$4 = packed_struct::UnpackedInPacked {a: 987, b: packed_struct::Unpacked {x: 876, y: 765, z: 654, w: 543}, c: packed_struct::Unpacked {x: 432, y: 321, z: 210, w: 109}, d: -98}

------------------------------------------
stderr:
------------------------------------------
/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/packed-struct.debugger.script:13: Error in sourced command file:
No symbol 'sizeof' in current context

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/packed-struct.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/recursive-struct.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $2 = 1
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/recursive-struct.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0x225b: file /home/shum/src/rust/rust-a/src/test/debuginfo/recursive-struct.rs, line 235.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, recursive_struct::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/recursive-struct.rs:235
235	    zzz(); // #break
$1 = 0

------------------------------------------
stderr:
------------------------------------------
/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/recursive-struct.debugger.script:10: Error in sourced command file:
Attempting to access named field val of tuple variant recursive_struct::Opt<alloc::boxed::Box<recursive_struct::UniqueNode<u16>>>::Val, which has only anonymous fields

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/recursive-struct.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/struct-in-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $3 = struct_in_enum::Univariant::TheOnlyCase(struct_in_enum::Struct {x: 123, y: 456, z: 789})
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/struct-in-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa33: file /home/shum/src/rust/rust-a/src/test/debuginfo/struct-in-enum.rs, line 92.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, struct_in_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/struct-in-enum.rs:92
92	    zzz(); // #break
$1 = struct_in_enum::Regular::Case1(0, struct_in_enum::Struct {x: 2088533116, y: 2088533116, z: 31868})
$2 = struct_in_enum::Regular::Case2(0, 1229782938247303441, 4369)
$3 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 32359] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/struct-in-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/struct-style-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $4 = struct_style_enum::Univariant::TheOnlyCase{a: -1}
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/struct-style-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa24: file /home/shum/src/rust/rust-a/src/test/debuginfo/struct-style-enum.rs, line 101.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, struct_style_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/struct-style-enum.rs:101
101	    zzz(); // #break
$1 = struct_style_enum::Regular::Case1{a: 0, b: 31868, c: 31868, d: 31868, e: 31868}
$2 = struct_style_enum::Regular::Case2{a: 0, b: 286331153, c: 286331153}
$3 = struct_style_enum::Regular::Case3{a: 0, b: 6438275382588823897}
$4 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 32437] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/struct-style-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/tuple-style-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $4 = tuple_style_enum::Univariant::TheOnlyCase(-1)
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/tuple-style-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xa24: file /home/shum/src/rust/rust-a/src/test/debuginfo/tuple-style-enum.rs, line 101.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, tuple_style_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/tuple-style-enum.rs:101
101	    zzz(); // #break
$1 = tuple_style_enum::Regular::Case1(0, 31868, 31868, 31868, 31868)
$2 = tuple_style_enum::Regular::Case2(0, 286331153, 286331153)
$3 = tuple_style_enum::Regular::Case3(0, 6438275382588823897)
$4 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 32555] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/tuple-style-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/unique-enum.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $3 = unique_enum::Univariant::TheOnlyCase(123234)
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/unique-enum.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0xe90: file /home/shum/src/rust/rust-a/src/test/debuginfo/unique-enum.rs, line 85.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, unique_enum::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/unique-enum.rs:85
85	    zzz(); // #break
$1 = unique_enum::ABC::TheA{x: 0, y: 8970181431921507452}
$2 = unique_enum::ABC::TheB(0, 286331153, 286331153)
$3 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 32629] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/unique-enum.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474

---- [debuginfo-gdb] debuginfo-gdb/union-smoke.rs stdout ----
	NOTE: compiletest thinks it is using GDB with native rust support
NOTE: compiletest thinks it is using GDB version 7012001

error: line not found in debugger output: $1 = union_smoke::U {a: (2, 2), b: 514}
status: exit code: 0
command: /run/current-system/sw/bin/gdb -quiet -batch -nx -command=/home/shum/src/rust/rust-a/build/x86_64-unknown-linux-gnu/test/debuginfo/union-smoke.debugger.script
stdout:
------------------------------------------
...
Breakpoint 1 at 0x9dc: file /home/shum/src/rust/rust-a/src/test/debuginfo/union-smoke.rs, line 50.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/nix/store/kk71vkqipf30qc165718jmp0s8cggn2y-glibc-2.24/lib/libthread_db.so.1".

Breakpoint 1, union_smoke::main () at /home/shum/src/rust/rust-a/src/test/debuginfo/union-smoke.rs:50
50	    zzz(); // #break
$1 = <error reading variable>
$2 = <error reading variable>
A debugging session is active.

	Inferior 1 [process 307] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]

------------------------------------------
stderr:
------------------------------------------

------------------------------------------

thread '[debuginfo-gdb] debuginfo-gdb/union-smoke.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:2474


failures:
    [debuginfo-gdb] debuginfo-gdb/borrowed-enum.rs
    [debuginfo-gdb] debuginfo-gdb/generic-struct-style-enum.rs
    [debuginfo-gdb] debuginfo-gdb/generic-tuple-style-enum.rs
    [debuginfo-gdb] debuginfo-gdb/packed-struct.rs
    [debuginfo-gdb] debuginfo-gdb/recursive-struct.rs
    [debuginfo-gdb] debuginfo-gdb/struct-in-enum.rs
    [debuginfo-gdb] debuginfo-gdb/struct-style-enum.rs
    [debuginfo-gdb] debuginfo-gdb/tuple-style-enum.rs
    [debuginfo-gdb] debuginfo-gdb/union-smoke.rs
    [debuginfo-gdb] debuginfo-gdb/unique-enum.rs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions