Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

lx-symbols: Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xff

I'm trying to load the lx-symbols from the kernel. but it keeps showing me the following error:

(gdb) lx-symbols
loading vmlinux
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0xffffffff824fb470: 
Error occurred in Python command: Cannot access memory at address 0xffffffff824fb470

Now I was successfully able to load the lx-symbols before from the same build(not sure if this is the correct terminology) but don't know why I can load it anymore.

Now, When I first connect to the remote machine via gdb it used to shows the build trace like the following:

GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./vmlinux...done.
(gdb) target remote: 1235
Remote debugging using : 1235
native_safe_halt ()
    at /build/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h:61
61    /build/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h: No such file or directory.

Now when I connect to the remote kernel, it is showing me just this :

(gdb) target remote :1235
Remote debugging using :1235
0xffffffff81a98522 in __irqentry_text_end ()

I notice that the build trace /build/linux-hwe-22QmxS/linux-hwe-5.3.0/arch/x86/include/asm/irqflags.h:61 61 disappear (I did not make any changes to the configuration or setting).

This is the second time I'm facing the same problem. At the first time, I thought maybe i accidentally make some changes but as the problem occurs again, this time I'm quite sure I did not make any changes.

I have my .gdbinit file with the correct path.

add-auto-load-safe-path /../../ubuntu-bionic/debian/build/build-generic/vmlinux-gdb.py

I checked if the source is loading correctly by using the this:

(gdb) source /home/../../ubuntu-bionic/debian/build/build-generic/vmlinux-gdb.py

It didn't throw me any error. So, I guess the source is loading correctly. I just don't know what else to do. Please help.

like image 335
perplex Avatar asked Nov 06 '22 10:11

perplex


1 Answers

Try to add to the kernel boot parameters "nokaslr" and/or build with CONFIG_RANDOMIZE_BASE=n

like image 139
John Doe Avatar answered Dec 09 '22 08:12

John Doe