DragonFly BSD
DragonFly bugs List (threaded) for 2009-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: [issue1625] coer dump from hammer info


From: "Steve O'Hara-Smith" <steve@xxxxxxxxxx>
Date: Mon, 14 Dec 2009 14:15:38 +0000

On Mon, 14 Dec 2009 09:36:53 +0000
"Steve O'Hara-Smith" <steve@sohara.org> wrote:

> On Mon, 14 Dec 2009 09:05:00 +0000
> "Alex Hornung \(via DragonFly issue tracker\)"
> <sinknull@leaf.dragonflybsd.org> wrote:
> 
> > 
> > Alex Hornung <ahornung@gmail.com> added the comment:
> > 
> > Can you also recompile libraries such as libc and others that hammer
> > utility links to with DEBUG_FLAGS=-g and try again?
> 
> 	Recompiled libc, libm and libutil - same result.
> 
> 	Is there any kind of debugging mode for the slab allocator that
> can be turned on ?

	Finally got a decent backtrace out of it.

Program terminated with signal 6, Aborted.
#0  0x0807528b in kill ()
(gdb) bt
#0  0x0807528b in kill ()
#1  0x080708ab in raise ()
#2  0x08070276 in abort ()
#3  0x08059cd7 in _mpanic ()
#4  0x08059e7f in _slabfree ()
#5  0x08059f98 in free ()
#6  0x0805560b in show_info (path=0x28090a4c "/roots") at cmd_info.c:185
#7  0x08055696 in hammer_cmd_info () at cmd_info.c:61
#8  0x08048bf0 in main (ac=Cannot access memory at address 0x5
) at hammer.c:310

	Which I think reveals the problem - line 185 of cmd_info.c is
free(mountedon) - mountedon (if set) is the path argument to show_info
which comes from the getmntinfo() call on line 51. According to man
getmntinfo the returned data is an array of statfs structures which
(according to man statfs) contain fixed sized arrays for the mount point
name not allocated pointers.

	So in short I'm pretty sure mountedon should not be being freed,
commenting out the free on line 185 does make hammer info work for me.

-- 
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:>WIN                                      | A better way to focus the sun
The computer obeys and wins.                |    licences available see
You lose and Bill collects.                 |    http://www.sohara.org/



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