unknown coredump !

Panagiotis Astithas past at ebs.gr
Thu Aug 25 07:57:36 GMT 2005


Nikolay Kalev wrote:
> Pawel Worach wrote:
> 
>> On 8/25/05, Nikolay Kalev <nkalev at gmail.com> wrote:
>>  
>>
>>> chkgrp: /etc/group: line 30: missing field(s)
>>> Segmentation fault (core dumped)
>>> Exit 3
>>>
>>> so i found the problem in my group file there was a bugy line that i
>>> added ... i;m not sure if this is normal to coredump when the syntax in
>>> /etc/group is mistaken ???
>>>
>>> the line was : "user:1001:" and it has to be "user:*:1001:"
>>>
>>>   
>>
>>
>> I can not reproduce this on a 7-CURRENT system.
>>
>> # grep -n ^user /etc/group
>> 30:user:1001:
>> # chkgrp
>> chkgrp: /etc/group: line 30: missing field(s)
>> chkgrp: /etc/group: line 30: GID is not numeric
>>
>> You can get a chkgrp with debug symbols this way:
>> # cd /usr/src/usr.sbin/chkgrp/
>> # make clean
>> # make DEBUG_FLAGS=-g
>> # make STRIP= install
>>
>> Then reproduce the problem and fire up gdb as said elsewhere..
>>
>>  
>>
> [lapi]:/root# gdb -c chkgrp.core /usr/sbin/chkgrp
> GNU gdb 6.1.1 [FreeBSD]
> Copyright 2004 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you 
> are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i386-marcel-freebsd"...
> Core was generated by `chkgrp'.
> 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 /libexec/ld-elf.so.1...done.
> Loaded symbols for /libexec/ld-elf.so.1
> #0  0x280b67b1 in strcspn () from /lib/libc.so.6
> (gdb) bt
> #0  0x280b67b1 in strcspn () from /lib/libc.so.6
> #1  0x08048a3c in main (argc=65536, argv=0x10000) at chkgrp.c:137
> (gdb)
> 
> 
> As i said, my system is FreeBSD 6.0 BETA3
> i wonder if others have the same problem with beta3 ?

I can confirm it too, on:

FreeBSD ajax.ebs.gr 6.0-BETA3 FreeBSD 6.0-BETA3 #2: Mon Aug 22 23:38:51 
EEST 2005     root@:/usr/obj/usr/src/sys/GENERIC  i386

I get the following from a full trace:

(gdb) bt full
#0  0x280bf7b1 in strcspn () from /lib/libc.so.6
No symbol table info available.
#1  0x08048a3c in main (argc=65536, argv=0x10000)
     at /usr/src/usr.sbin/chkgrp/chkgrp.c:137
         i = 14
         len = 14
         n = 30
         k = 2
         e = 1
         line = 0xffffffff <Address 0xffffffff out of bounds>
         f = {0x804b19a "past", 0x804b19f "1001",
   0x804b1a4 "past\ngdm:*:92:\nmessagebus:*:556:\n", 'Π' <repeats 167 
times>..., 0x804b199 ""}
         p = 0x0
         cp = 0xffffffff <Address 0xffffffff out of bounds>
         gfn = 0x8048c1e "/etc/group"
         gf = (FILE *) 0x281522c0
(gdb)


Cheers,

Panagiotis


More information about the freebsd-current mailing list