[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#626001: sigseg in memset (powerpc)



Jonathan Nieder hat am Sat 07. May, 17:06 (-0500) geschrieben:
> Jörg Sommer wrote:
> 
> > last night, grep was killed by SIGSEG. It was run by a cron job and I
> > can't reproduce the error. But I've a coredump.
> 
> What version of grep do you use?

The current version in unstable 2.6.3-3.

> I don't know of anything like debug.debian.net for powerpc which would
> make it easy to get a full backtrace, (though it should be possible to
> get with sufficient interest and time) unfortunately.

Is debug.d.n still alive? The filestamps for unstable are rather old:
http://debug.debian.net/debian/dists/sid/debug/main/binary-amd64/

> Also, do you have the cron job and the /var/lib/rkhunter/db/i18n/en
> file from the time of failure?  Can we take a look at them?

I append the *current* version. According to the timestamps of the file,
it wasn't modified since the crash, but I can't reproduce it:

# stat /var/lib/rkhunter/db/i18n/en
  File: „/var/lib/rkhunter/db/i18n/en“
  Size: 35729           Blocks: 72         IO Block: 4096   reguläre Datei
Device: 805h/2053d      Inode: 174839      Links: 1
Access: (0640/-rw-r-----)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2011-05-01 13:14:00.000000000 +0200
Modify: 2011-04-30 09:41:45.000000000 +0200
Change: 2011-05-01 13:14:08.681779178 +0200

> [...]
> > Core was generated by `grep ^ROOTKIT_FILES_DIRS_FILE: /var/lib/rkhunter/db/i18n/en'.
> [...]
> > #0  memset () at ../sysdeps/powerpc/powerpc32/memset.S:100
> > No locals.
> > #1  0x0fed241c in __libc_calloc (n=<value optimized out>, elem_size=<value optimized out>) at malloc.c:4123
> >         av = 0xffc9268
> >         oldtop = 0x103fcd18
> >         bytes = 4
> 
> Looks like calloc is being called for a 4-byte allocation.  Usually
> for such small allocations calloc handles the clearing itself, so that
> information might help to narrow things down.
> 
> Just to check: are there any MALLOC_* or LD_* environment variables
> set in your cron jobs' environment?  (I'm asking probably stupid
> questions just to get basic information to trace what happened,
> nothing else.)

I don't know. I didn't set them, but the caller, rkhunter might do so.

> [...]
> > #2  0x10018700 in ?? ()
> > No symbol table info available.
> > #3  0x1000f260 in ?? ()
> > No symbol table info available.
> [...]
> > Dump of assembler code for function memset:
> 
> I'd also be interested in disassembly for frame 2 or 3, so we can get
> some idea of what grep was doing.

This wasn't very easy. I had to rebuild grep with the old version, but
here it is:

Core was generated by `grep ^ROOTKIT_FILES_DIRS_FILE: /var/lib/rkhunter/db/i18n/en'.
Program terminated with signal 11, Segmentation fault.
#0  memset () at ../sysdeps/powerpc/powerpc32/memset.S:100
100     ../sysdeps/powerpc/powerpc32/memset.S: Datei oder Verzeichnis nicht gefunden.
        in ../sysdeps/powerpc/powerpc32/memset.S
#0  memset () at ../sysdeps/powerpc/powerpc32/memset.S:100
No locals.
#1  0x0fed241c in __libc_calloc (n=<value optimized out>, elem_size=<value optimized out>) at malloc.c:4123
        av = 0xffc9268
        oldtop = 0x103fcd18
        bytes = 4
        csz = <value optimized out>
        oldtopsize = 82664
        mem = 0xffc9265
        clearsize = <value optimized out>
        nclears = <value optimized out>
        __func__ = "__libc_calloc"
#2  0x10018700 in xrealloc (p=<value optimized out>, n=<value optimized out>) at xmalloc.c:61
No locals.
#3  0x1000f260 in build_state_zero (d=0x1, begin=0x103f85ca "ROOTKIT_FILES_DIRS_FILE:Checking for file '$1'\nROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\n"..., end=0x103f85f9 "ROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\nROOTKIT_FILES_DIRS_DIR_FOUND:Directory '$1' fou"..., newline=0, count=0x0, backref=0xbfa127ec) at dfa.c:2325
No locals.
#4  dfaexec (d=0x1, begin=0x103f85ca "ROOTKIT_FILES_DIRS_FILE:Checking for file '$1'\nROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\n"..., end=0x103f85f9 "ROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\nROOTKIT_FILES_DIRS_DIR_FOUND:Directory '$1' fou"..., newline=0, count=0x0, backref=0xbfa127ec) at dfa.c:2797
        s = <value optimized out>
        s1 = <value optimized out>
        p = <value optimized out>
        trans = <value optimized out>
        t = <value optimized out>
        eol = 10 '\n'
        sbit = {268621076, 0 <repeats 18 times>, 1 <repeats 11 times>, 4, 1 <repeats 37 times>, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2 <repeats 26 times>, 1, 1, 1, 1, 2, 1, 2 <repeats 26 times>, 1 <repeats 113 times>}
        sbit_init = 0
        saved_end = <value optimized out>
#5  0x10001cdc in EGexecute (buf=0x103f4000 "Version:2010110901\n#\n# We start with the definitions of the message types and results. There\n# are very few of these, so including these and all the parts of each\n# message in one file makes sense and"..., size=32733, match_size=<value optimized out>, start_ptr=<value optimized out>) at dfasearch.c:260
        offset = <value optimized out>
        buflim = 0x103fbfdd "NETWORK_PROMISC_NO_IP:Promiscuous n"
        beg = 0x103f85ca "ROOTKIT_FILES_DIRS_FILE:Checking for file '$1'\nROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\n"...
        end = 0x103f85f9 "ROOTKIT_FILES_DIRS_DIR:Checking for directory '$1'\nROOTKIT_FILES_DIRS_KSYM:Checking for kernel symbol '$1'\nROOTKIT_FILES_DIRS_FILE_FOUND:File '$1' found\nROOTKIT_FILES_DIRS_DIR_FOUND:Directory '$1' fou"...
        match = <value optimized out>
        best_match = 0x103f4000 "Version:2010110901\n#\n# We start with the definitions of the message types and results. There\n# are very few of these, so including these and all the parts of each\n# message in one file makes sense and"...
        mb_start = 0x103f4000 "Version:2010110901\n#\n# We start with the definitions of the message types and results. There\n# are very few of these, so including these and all the parts of each\n# message in one file makes sense and"...
        eol = <value optimized out>
        backref = 268550440
        start = <value optimized out>
        len = 268621264
        best_len = 268621020
        kwsm = {index = 0, offset = {17866}, size = {24}}
        i = 268621264
        ret_val = <value optimized out>
#6  0x10004c4c in grepbuf (beg=<value optimized out>, lim=0x103fbfdd "NETWORK_PROMISC_NO_IP:Promiscuous n") at main.c:1014
        b = <value optimized out>
        endp = <value optimized out>
        nlines = 0
        n = 32768
        p = 0x103f4000 "Version:2010110901\n#\n# We start with the definitions of the message types and results. There\n# are very few of these, so including these and all the parts of each\n# message in one file makes sense and"...
        match_offset = <value optimized out>
        match_size = 4294967271
#7  0x100057ec in add_count (file=0xbfa1388f "/var/lib/rkhunter/db/i18n/en", stats=0x1002d6b8) at main.c:615
        sum = <value optimized out>
#8  nlscan (file=0xbfa1388f "/var/lib/rkhunter/db/i18n/en", stats=0x1002d6b8) at main.c:631
        newlines = 3215010160
        beg = <value optimized out>
#9  grep (file=0xbfa1388f "/var/lib/rkhunter/db/i18n/en", stats=0x1002d6b8) at main.c:1159
        i = <value optimized out>
        residue = 35
        oldc = <value optimized out>
        not_text = 0
        save = 0
        beg = 0x1001ab14 ""
        eol = 10 '\n'
#10 grepfile (file=0xbfa1388f "/var/lib/rkhunter/db/i18n/en", stats=0x1002d6b8) at main.c:1260
        desc = 4
        count = 0
        status = <value optimized out>
#11 0x10005efc in main (argc=<value optimized out>, argv=<value optimized out>) at main.c:2199
        keys = <value optimized out>
        keycc = <value optimized out>
        keyalloc = <value optimized out>
        with_filenames = 0
        opt = <value optimized out>
        status = 1
        default_context = 0
        fp = <value optimized out>
        file_list = 0x103f08b0

Bye, Jörg.
-- 
“Hey, dad, you see how this man can twist his fingers? Amazing, isn't
it?” “No, son, not really. He's been using Emacs for ten years…”

Attachment: signature.asc
Description: Digital signature http://en.wikipedia.org/wiki/OpenPGP


Reply to: