linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthias Schwarzott <zzam@gentoo.org>
To: linux-hotplug@vger.kernel.org
Subject: udev-131 strange segfault
Date: Fri, 07 Nov 2008 12:07:11 +0000	[thread overview]
Message-ID: <200811071307.11884.zzam@gentoo.org> (raw)

Hi there!
I managed to let udev-131 segfault at startup.

I configured it like this:
CFLAGS="-Wall -ggdb" ./configure --prefix=/usr --sysconfdir=/etc --exec-prefix
Running it in gdb shows it segfaults at udev-rules.c:831

(gdb) run
Starting program: /tmp/udev-131/udev/udevd

Program received signal SIGSEGV, Segmentation fault.
0x0804ea06 in get_key (udev=0x9175008, line=0xafcdc8f0, key=0xafcdc5d8, 
op=0xafcdc5d0, value=0xafcdc5d4)
    at udev-rules.c:831
831             dbg(udev, "%s '%s'-'%s'\n", operation_str[*op], *key, *value);



Longer backtrace:
bt full
#0  0x0804ea06 in get_key (udev=0x807d008, line=0xafa7e690, key=0xafa7e378, 
op=0xafa7e370, value=0xafa7e374)
    at udev-rules.c:831
        linepos = 0xafa7e6f0 "block"
        temp = 0xafa7e6f6 ", ENV{MAJOR}=\"254\", ENV{MINOR}=\"0\", 
SYMLINK+=\"root\"\n"
#1  0x0804f02c in add_rule (rules=0x807d188, line=0xafa7e6e4 "SUBSYSTEM",
    filename=0x808c7f8 "/dev/.udev/rules.d/10-root-link.rules", 
filename_off=1, lineno=3) at udev-rules.c:1039
        key = 0xafa7e6e4 "SUBSYSTEM"
        value = 0xafa7e6f0 "block"
        op = OP_MATCH
        valid = 0
        linepos = 0xafa7e6e4 "SUBSYSTEM"
        attr = 0xa7dea6c0 "�8��"
        physdev = 0
        rule_tmp = {rules = 0x807d188, rule = {{type = 1 '\001', rule = {type 
= 1 '\001', flags = 0 '\0',
        token_count = 0, label_off = 0, filename_off = 1, filename_line = 3}, 
key = {type = 1 '\001',
        flags = 0 '\0', op = 0 '\0', glob = 0 '\0', value_off = 0, {attr_off = 
196609, ignore_error = 196609,
          i = 196609, rule_goto = 196609, mode = 196609, uid = 196609, gid = 
196609, num_fake_part = 196609,
          devlink_prio = 196609, event_timeout = 196609}}}}, token = {{{type = 
0 '\0', rule = {type = 0 '\0',
          flags = 0 '\0', token_count = 0, label_off = 0, filename_off = 0, 
filename_line = 0}, key = {
          type = 0 '\0', flags = 0 '\0', op = 0 '\0', glob = 0 '\0', value_off 
= 0, {attr_off = 0,
            ignore_error = 0, i = 0, rule_goto = 0, mode = 0, uid = 0, gid = 
0, num_fake_part = 0,
            devlink_prio = 0, event_timeout = 0}}}} <repeats 64 times>}, 
token_cur = 0}
        __FUNCTION__ = "add_rule"
#2  0x08050dd1 in parse_file (rules=0x807d188, 
filename=0x808c7f8 "/dev/.udev/rules.d/10-root-link.rules",
    filename_off=1) at udev-rules.c:1503
        key = 0xafa7e6e4 "SUBSYSTEM"
        len = 72
        f = (FILE *) 0x808b228
        first_token = 0
        line = "SUBSYSTEM\000=\"block\000, ENV{MAJOR}=\"254\", 
ENV{MINOR}=\"0\", SYMLINK+=\"root\"\n", '\0' <repeats 452 
times>, "u���A�ߧp\216\004\b\000\000\000\000\000\000\000\000Т��\002\000\000\000
(:��\030\213\004\b4\031���\017��l駯�����駯����", '\0' <repeats 17 
times>, "���", '\0' <repeats 12 
times>, "@�����\000^�\003\000\000�\a�\002\003\000\000\000\f�t>��\000\000\000\000\000\000\000"...


This is the rules file it seems to parse at that moment:

# Created by /lib/udev/write_root_link_rule
# This rule should create /dev/root as link to real root device.
SUBSYSTEM="block", ENV{MAJOR}="254", ENV{MINOR}="0", SYMLINK+="root"

Regards
Matthias


             reply	other threads:[~2008-11-07 12:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 12:07 Matthias Schwarzott [this message]
2008-11-07 13:42 ` udev-131 strange segfault Kay Sievers
2008-11-07 18:54 ` Matthias Schwarzott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200811071307.11884.zzam@gentoo.org \
    --to=zzam@gentoo.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).