Bug#790560: udev fails to start on sparc boot, breaking boot

Artyom Tarasenko atar4qemu at gmail.com
Thu Aug 6 13:36:43 BST 2015


And here is an attempt to debug why parse_proc_cmdline fails:

Breakpoint 3, main (argc=<optimized out>, argv=0x7fefffffc98) at
../src/udev/udevd.c:1662
1662            r = parse_proc_cmdline(parse_proc_cmdline_item);
(gdb) step
parse_proc_cmdline (parse_item=0x10000011180
<parse_proc_cmdline_item.lto_priv.257>) at ../src/basic/util.c:4832
4832            assert(parse_item);
(gdb) next
4834            r = proc_cmdline(&line);
(gdb) step
proc_cmdline (ret=0x7fefffff338) at ../src/basic/util.c:4819
4819            assert(ret);
(gdb) next
4821            if (detect_container(NULL) > 0)
(gdb)
4824                    return read_one_line_file("/proc/cmdline", ret);
(gdb) next
read_one_line_file (fn=0x100000552d8 "root", line=0x7fefffff338) at
../src/basic/fileio.c:103
103     int read_one_line_file(const char *fn, char **line) {


^^ so read_one_line_file was called with a string "/proc/cmdline", but
for some reason it gets the string "root".



And this is how it looks at the assebler level:

Breakpoint 1, proc_cmdline (ret=0x7fefffff338) at ../src/basic/util.c:4824
warning: Source file is more recent than executable.
4824                    return read_one_line_file("/proc/cmdline", ret);

(gdb) disas $pc,+0x10
Dump of assembler code from 0x1000002f554 to 0x1000002f564:
=> 0x000001000002f554 <proc_cmdline+52>:        xor  %i0, -224, %i0
   0x000001000002f558 <proc_cmdline+56>:        add  %l7, %i0, %i0
   0x000001000002f55c <proc_cmdline+60>:        b  %xcc, 0x100000339a0
<read_one_line_file>
   0x000001000002f560 <proc_cmdline+64>:        restore
End of assembler dump.
(gdb) info registers i0 l7
i0             0x2ac00  175104
l7             0x1000007ffb8    1099512151992
(gdb) nexti
0x000001000002f558      4824                    return
read_one_line_file("/proc/cmdline", ret);
(gdb)
0x000001000002f55c      4824                    return
read_one_line_file("/proc/cmdline", ret);
(gdb) x/s $i0
0x100000552d8:  "root"


So it seems to be a compiler/linker bug. For some reason we are 0x2780
bytes off:

(gdb) x/s 0x100000552d8-0x2780
0x10000052b58:  "/proc/cmdline"
(gdb)

Can I do anything else to help debugging the issue?





More information about the Pkg-systemd-maintainers mailing list