Debian Bug report logs - #285281
core dump on amd64 (gcc-3.4)

version graph

Package: udev; Maintainer for udev is Marco d'Itri <md@linux.it>; Source for udev is src:systemd.

Reported by: "Harald Dunkel" <harald.dunkel@t-online.de>

Date: Sun, 12 Dec 2004 09:33:01 UTC

Severity: normal

Tags: moreinfo, upstream

Found in version 0.048-2

Fixed in version udev/0.048-3

Done: Marco d'Itri <md@linux.it>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to "Harald Dunkel" <harald.dunkel@t-online.de>:
New Bug report received and forwarded. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Harald Dunkel" <harald.dunkel@t-online.de>
To: submit@bugs.debian.org
Subject: core dump on amd64 (gcc-3.4)
Date: Sun, 12 Dec 2004 10:24:03 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: udev
Version: 0.048-2

There seems to be something wrong with udev at least on
amd64 (gcc-3.4). Syslog says

syslog:Dec 12 10:06:56 r10 kernel: udev[4973]: segfault at 0000000000000138 rip 00000000004030ad rsp 0000007fbfffeca0 error 4
syslog:Dec 12 10:15:42 r10 kernel: udev[5478]: segfault at 0000000000000138 rip 00000000004030ad rsp 0000007fbfffeca0 error 4
syslog:Dec 12 10:15:42 r10 kernel: udev[5481]: segfault at 0000000000000138 rip 00000000004030ad rsp 0000007fbfffeca0 error 4

It seems to work, though.


Regards

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBvA4zUTlbRTxpHjcRAmJ9AKCDKlnVfRTEbIwXA1MzKK85dZaMjgCfV4gC
TiapSfHUV21IYWspTQZ7/c4=
=AAfl
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to md@Linux.IT (Marco d'Itri):
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #10 received at 285281@bugs.debian.org (full text, mbox):

From: md@Linux.IT (Marco d'Itri)
To: Harald Dunkel <harald.dunkel@t-online.de>, 285281@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Sun, 12 Dec 2004 11:27:48 +0100
[Message part 1 (text/plain, inline)]
tag 285281 upstream moreinfo
thanks

On Dec 12, Harald Dunkel <harald.dunkel@t-online.de> wrote:

> There seems to be something wrong with udev at least on
> amd64 (gcc-3.4). Syslog says
Please do your best to get a stack trace, possibly from the unstripped
binary. There is nothing I can do without it.
Check if you can reproduce the problem by running udevstart.

-- 
ciao, |
Marco | [9724 abrPpQhnbmPQU]
[signature.asc (application/pgp-signature, inline)]

Tags added: upstream, moreinfo Request was from md@Linux.IT (Marco d'Itri) to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to "Harald Dunkel" <harald.dunkel@t-online.de>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #17 received at 285281@bugs.debian.org (full text, mbox):

From: "Harald Dunkel" <harald.dunkel@t-online.de>
To: Marco d'Itri <md@Linux.IT>
Cc: 285281@bugs.debian.org
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Sun, 12 Dec 2004 19:29:40 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marco d'Itri wrote:
| Please do your best to get a stack trace, possibly from the unstripped
| binary. There is nothing I can do without it.
| Check if you can reproduce the problem by running udevstart.
|

Running udevstart later did not trigger the problem. It
would help to know where the core dump file is written?


Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBvI4UUTlbRTxpHjcRAjtkAJ0XLzFsGK+WyHiEffI79Vt8lXZevwCfcYhV
Dt76JZN6KgAxdJbKpcikyQk=
=ZC3k
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to md@Linux.IT (Marco d'Itri):
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #22 received at 285281@bugs.debian.org (full text, mbox):

From: md@Linux.IT (Marco d'Itri)
To: Harald Dunkel <harald.dunkel@t-online.de>
Cc: 285281@bugs.debian.org
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Sun, 12 Dec 2004 19:55:09 +0100
[Message part 1 (text/plain, inline)]
On Dec 12, Harald Dunkel <harald.dunkel@t-online.de> wrote:

> Running udevstart later did not trigger the problem. It
> would help to know where the core dump file is written?
In the root, apparently:

build-tree/udev-048/udevd.c:	chdir("/");

You will probably have to enable dumping core in /etc/init.d/udev and
reboot. You can get unstripped binaries by building the package and
taking the files from the build-tree/udev-048/ directory.

-- 
ciao, |
Marco | [9728 ta1CYssL/55gc]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to "Harald Dunkel" <harald.dunkel@t-online.de>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #27 received at 285281@bugs.debian.org (full text, mbox):

From: "Harald Dunkel" <harald.dunkel@t-online.de>
To: Marco d'Itri <md@Linux.IT>
Cc: 285281@bugs.debian.org
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Sun, 12 Dec 2004 20:43:47 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marco d'Itri wrote:
| On Dec 12, Harald Dunkel <harald.dunkel@t-online.de> wrote:
|
|
|>Running udevstart later did not trigger the problem. It
|>would help to know where the core dump file is written?
|
| In the root, apparently:
|
| build-tree/udev-048/udevd.c:	chdir("/");
|

Thats where I looked first, but there was none.

I cannot reproduce the problem anyway. Somehow it
went away.


Regards

Harri

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBvJ9zUTlbRTxpHjcRAs1sAJ48vpMPWrWiAc4md8Ai6xnRx3WsoACeKJzQ
hGT50tqR4CLjpyuagurKDlE=
=fYee
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to "Harald Dunkel" <harald.dunkel@t-online.de>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #32 received at 285281@bugs.debian.org (full text, mbox):

From: "Harald Dunkel" <harald.dunkel@t-online.de>
To: Marco d'Itri <md@Linux.IT>
Cc: 285281@bugs.debian.org
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Tue, 14 Dec 2004 06:14:47 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Its back.

Harri
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBvnbHUTlbRTxpHjcRAvYFAJ9EbHXJg+0wkyKI0biwZP3cgUj2lQCgkgVs
QnsJvIN3VfVqGRqAJWC6qTw=
=wO/N
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to martin-deb@zero-based.org:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #37 received at 285281@bugs.debian.org (full text, mbox):

From: martin-deb@zero-based.org
To: 285281@bugs.debian.org
Cc: Harald Dunkel <harald.dunkel@t-online.de>
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Wed, 15 Dec 2004 07:44:34 +0100
On Sun, Dec 12, 2004 at 11:27:48AM +0100, Marco d'Itri wrote:
> On Dec 12, Harald Dunkel <harald.dunkel@t-online.de> wrote:
> 
> > There seems to be something wrong with udev at least on
> > amd64 (gcc-3.4).
>
> Please do your best to get a stack trace, possibly from the unstripped
> binary.

I see the same behavior on amd64 with gcc-3.3. Here is a stacktrace:


GNU gdb 6.3-debian
[...]

Core was generated by `udev vc'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux-x86-64.so.2...done.
Loaded symbols for /lib64/ld-linux-x86-64.so.2
#0  0x0000000000403024 in sysfs_get_classdev_attr (clsdev=0x518260, name=0x40dcac "dev") at libsysfs/sysfs_class.c:643
643             if (clsdev->directory->subdirs == NULL) 
(gdb) backtrace
#0  0x0000000000403024 in sysfs_get_classdev_attr (clsdev=0x518260, name=0x40dcac "dev") at libsysfs/sysfs_class.c:643
#1  0x000000000040904e in get_major_minor (class_dev=0x0, udev=0x7fbffff330) at udev_add.c:57
#2  0x0000000000409874 in udev_add_device (udev=0x7fbffff330, class_dev=0x518260) at udev_add.c:287
#3  0x0000000000402009 in main (argc=2, argv=0x7fbffffdb8, envp=0x0) at udev.c:197
(gdb) print *clsdev
$1 = {name = "vcs1", '\0' <repeats 45 times>, classname = "vc", '\0' <repeats 47 times>, 
  path = "/sys/class/vc/vcs1", '\0' <repeats 236 times>, parent = 0x0, sysdevice = 0x0, driver = 0x0, directory = 0x0}


Martin



Information forwarded to debian-bugs-dist@lists.debian.org, Marco d'Itri <md@linux.it>:
Bug#285281; Package udev. Full text and rfc822 format available.

Acknowledgement sent to Kay Sievers <kay.sievers@vrfy.org>:
Extra info received and forwarded to list. Copy sent to Marco d'Itri <md@linux.it>. Full text and rfc822 format available.

Message #42 received at 285281@bugs.debian.org (full text, mbox):

From: Kay Sievers <kay.sievers@vrfy.org>
To: Marco d'Itri <md@Linux.IT>
Cc: Hotplug Devel <linux-hotplug-devel@lists.sourceforge.net>, Greg KH <greg@kroah.com>, Daniel Stekloff <dsteklof@us.ibm.com>
Subject: Re: Bug#285281: core dump on amd64 (gcc-3.4)
Date: Wed, 15 Dec 2004 14:27:13 +0100
On Wed, 2004-12-15 at 09:50 +0100, Marco d'Itri wrote:
> clsdev->directory is NULL, is this a bug in libsysfs or udev?
> Apparently this only happens on amd64.
> 
> ----- Forwarded message from martin-deb@zero-based.org -----

> #0  0x0000000000403024 in sysfs_get_classdev_attr (clsdev=0x518260, name=0x40dcac "dev") at libsysfs/sysfs_class.c:643
> 643             if (clsdev->directory->subdirs == NULL) 
> (gdb) backtrace

It is caused by the vc class behavior, to emit events on every open()
and close(). We get a lot of events on bootup for every vc device, cause
it is several times reopened. This causes the sysfs-dir to go away while
the device is opened in libsysfs. This simple test program:

#include <stdio.h>
#include <unistd.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>

#include "libsysfs/sysfs/libsysfs.h"


int main(int argc, char *argv[], char *envp[])
{
        struct sysfs_class_device *class_dev;
        struct sysfs_attribute *attr;

        mkdir("test-sys", 0775);
        mkdir("test-sys/class", 0775);
        mkdir("test-sys/class/test", 0775);

        setenv("SYSFS_PATH", "test-sys", 1);

        printf("open\n");
        class_dev = sysfs_open_class_device_path("test-sys/class/test");
        printf("%p\n", class_dev);

        printf("rmdir\n");
        rmdir("test-sys/class/test");

        printf("read attr\n");
        attr = sysfs_get_classdev_attr(class_dev, "dev");
}

segfaults every time:
  [kay@pim udev.kay]$ gcc -g -I libsysfs/sysfs -I libsysfs -o bug bug.c libsysfs/sysfs.a
  [kay@pim udev.kay]$ ./bug 
  open
  0x804f0d8
  rmdir
  read attr
  Segmentation fault


This seems to fix it:

===== libsysfs/sysfs_class.c 1.11 vs edited =====
--- 1.11/libsysfs/sysfs_class.c 2004-10-20 05:15:26 +02:00
+++ edited/libsysfs/sysfs_class.c       2004-12-15 14:20:13 +01:00
@@ -640,6 +640,9 @@
                        return cur;
        }
 
+       if (clsdev->directory == NULL)
+               return NULL;
+
        if (clsdev->directory->subdirs == NULL) 
                if ((sysfs_read_dir_subdirs(clsdev->directory)) != 0 ||
                    clsdev->directory->subdirs == NULL) 


Thanks,
Kay



Reply sent to Marco d'Itri <md@linux.it>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Harald Dunkel" <harald.dunkel@t-online.de>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #47 received at 285281-close@bugs.debian.org (full text, mbox):

From: Marco d'Itri <md@linux.it>
To: 285281-close@bugs.debian.org
Subject: Bug#285281: fixed in udev 0.048-3
Date: Thu, 16 Dec 2004 20:47:04 -0500
Source: udev
Source-Version: 0.048-3

We believe that the bug you reported is fixed in the latest version of
udev, which is due to be installed in the Debian FTP archive:

udev_0.048-3.diff.gz
  to pool/main/u/udev/udev_0.048-3.diff.gz
udev_0.048-3.dsc
  to pool/main/u/udev/udev_0.048-3.dsc
udev_0.048-3_i386.deb
  to pool/main/u/udev/udev_0.048-3_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 285281@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Marco d'Itri <md@linux.it> (supplier of updated udev package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Wed, 15 Dec 2004 21:32:22 +0100
Source: udev
Binary: udev udev-udeb
Architecture: source i386
Version: 0.048-3
Distribution: unstable
Urgency: medium
Maintainer: Marco d'Itri <md@linux.it>
Changed-By: Marco d'Itri <md@linux.it>
Description: 
 udev       - /dev/ management daemon
Closes: 285066 285281 285443 285511
Changes: 
 udev (0.048-3) unstable; urgency=medium
 .
   * devfs.rules: added support for /dev/{cciss,ida}/*. (Closes: #285066)
   * New patch check_null_directory fixes core dump on amd64. (Closes: #285281)
   * Improved the init script check for old kernels. (Closes: #285443)
   * Depend on sed >= 3.95. (Closes: #285511)
   * udev.permissions: fixed the inotify path.
Files: 
 da2125bdee34fba20cc89627f9ba3260 573 admin extra udev_0.048-3.dsc
 2c8219d29bf1e5bc8284f73f01805384 32192 admin extra udev_0.048-3.diff.gz
 8e35ee9c18a5cb2a1ae39dd1a50cf532 242016 admin extra udev_0.048-3_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBwKAZFGfw2OHuP7ERAiqGAJ4gzOOiWOKLaN9IW4BXYINDR1I2mgCgirdB
cn+kMprAMNeiYsf4IO1DqJk=
=wT+M
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 16:25:17 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.