Google Groups Home
Help | Sign in
Assertion device.good right after "Loading journal descriptors... sorting..."
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
eduardo  
View profile
 More options May 13, 9:22 pm
From: eduardo <etrap...@gmail.com>
Date: Tue, 13 May 2008 18:22:37 -0700 (PDT)
Local: Tues, May 13 2008 9:22 pm
Subject: Assertion device.good right after "Loading journal descriptors... sorting..."
Hi,

Find below the output from the program.

/dev/vg/backuppc is a VLM volume with 330310176 blocks (cleanly
unmounted, read as a device with read only permission)
ext3grep version 6.0
kernel version 2.4.27
Debian 3.1, e2fslibs-dev_1.39+1.40-WIP-2006

My situation is the following, I had the files in one tree with
hardlinks to the "actual" contents in another tree.  The first tree
had the real names and directory structure, but the second tree is
almost flat and all files have an md5sum string as name. (That is
backuppc, that allows for multiple linking of the same file across
many backups).

After accidentally erasing the tree that held the names, all I have
now are the files with the md5 names.

So, I'm trying to recover the filenames and make them point to the
mdsum names so that I don't have to go every file to know what it is
and how to name it, and so that I don't lose the directory hierarchy.

I guess this is pretty easy for ext3grep, if I get it to work.  Any
ideas on how to overcome the error below?

Thanks for anytime you can devote to this.

~/src$ ext3grep-0.6.0/src/ext3grep /dev/vg/backuppc --ls --inode 2
Running ext3grep version 0.6.0
Number of groups: 2561
Loading group metadata... done
Minimum / maximum journal block: 1033 / 496305
Loading journal descriptors... sorting...ext3grep.cc:1336: void
load_meta_data(int): Assertion `device.good()' failed.
Backtrace:
#0  ext3grep-0.6.0/src/ext3grep(_Z17dump_backtrace_onRSo+0x3e)
[0x80b73ae]
    /home/edu/src/ext3grep-0.6.0/src/backtrace.cc:61
#1  ext3grep-0.6.0/src/ext3grep(_Z11assert_failPKcS0_iS0_+0xbc)
[0x807ed06]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:331
#2  ext3grep-0.6.0/src/ext3grep(_Z14load_meta_datai+0xdc) [0x8080e22]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:1337
#3  ext3grep-0.6.0/src/ext3grep [0x807f9ca]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:840
#4  ext3grep-0.6.0/src/ext3grep [0x808c2ff]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:4167
#5  ext3grep-0.6.0/src/ext3grep(_Z11run_programv+0x93e) [0x80818e4]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:1502
#6  ext3grep-0.6.0/src/ext3grep(main+0x63b) [0x8084163]
    /home/edu/src/ext3grep-0.6.0/src/ext3grep.cc:2084
#7  /lib/libc.so.6(__libc_start_main+0x9e) [0x401253be]
    ??:0
#8  ext3grep-0.6.0/src/ext3grep(__gxx_personality_v0+0x44d)
[0x807e951]
    ../sysdeps/i386/elf/start.S:122
Aborted
~/src$


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlo Wood  
View profile
 More options May 13, 11:29 pm
From: Carlo Wood <ca...@alinoe.com>
Date: Wed, 14 May 2008 05:29:14 +0200
Local: Tues, May 13 2008 11:29 pm
Subject: Re: [ext3grep] Assertion device.good right after "Loading journal descriptors... sorting..."
Hmm, have a look at
http://groups.google.com/group/ext3grep/web/sticky-howto-report-a-bug

Also note point 7) there.

--
Carlo Wood <ca...@alinoe.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eduardo  
View profile
 More options May 14, 9:46 am
From: eduardo <etrap...@gmail.com>
Date: Wed, 14 May 2008 06:46:02 -0700 (PDT)
Local: Wed, May 14 2008 9:46 am
Subject: Re: Assertion device.good right after "Loading journal descriptors... sorting..."

> Hmm, have a look athttp://groups.google.com/group/ext3grep/web/sticky-howto-report-a-bug

> Also note point 7) there.

Done Carlo, sorry forno having read it before. I've followed all the
steps and I get this error.  I'm simply doing ext3grep --debug /dev/vg/
backuppc

Do you think that there is an easier approach for the situation I'm
in?

Full debug below:

~/src/svn/ext3grep-read-only-objdir$ src/ext3grep --debug /dev/vg/
backuppc
RCFILE  : /home/edu/.libcwdrc:2: channels_default = on
RCFILE  : /home/edu/.libcwdrc:3: channels_off = malloc,bfd
RCFILE  :     Turned off MALLOC
RCFILE  :     Turned off BFD
RCFILE  : /home/edu/.libcwdrc:4: gdb = /usr/bin/gdb
RCFILE  : /home/edu/.libcwdrc:5: xterm = gnome-terminal --
geometry=165x24+0+0 -e "%s"
Running Revision: 95
No action specified; implying --superblock.

NOTICE  : Entering run_program()
Inodes count: 41959424
Blocks count: 83894272
Reserved blocks count: 1677885
Free blocks count: 8118556
Free inodes count: 41093528
First Data Block: 0
Block size: 4096
Fragment size: 4096
Number of blocks per group: 32768
Number of fragments per group: 32768
Number of inodes per group: 16384
Mount time: Sun Apr  6 17:08:58 2008
Write time: Tue May 13 19:14:27 2008
Mount count: 17
Maximal mount count: 21
Magic signature: 0xef53
File system state: 'Unmounted cleanly'
Size of inode structure: 128
Block group # of this superblock: 0
compatible feature set: HAS_JOURNAL
incompatible feature set: FILETYPE
readonly-compatible feature set: SPARSE_SUPER LARGE_FILE
Per group desc for online growth: 0
UUID of journal superblock: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Inode number of journal file: 8
Device number of journal file: 0
Start of list of inodes to delete: 0
First metablock block group: 0

Segmentation fault (core dumped)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlo Wood  
View profile
 More options May 14, 4:41 pm
From: Carlo Wood <ca...@alinoe.com>
Date: Wed, 14 May 2008 22:41:12 +0200
Local: Wed, May 14 2008 4:41 pm
Subject: Re: [ext3grep] Re: Assertion device.good right after "Loading journal descriptors... sorting..."

On Wed, May 14, 2008 at 06:46:02AM -0700, eduardo wrote:
> Segmentation fault (core dumped)

Back trace inside gdb?

--
Carlo Wood <ca...@alinoe.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eduardo  
View profile
 More options May 14, 5:34 pm
From: eduardo <etrap...@gmail.com>
Date: Wed, 14 May 2008 14:34:46 -0700 (PDT)
Local: Wed, May 14 2008 5:34 pm
Subject: Re: Assertion device.good right after "Loading journal descriptors... sorting..."

> > Segmentation fault (core dumped)

> Back trace inside gdb?

/src/svn/ext3grep-read-only-objdir$ gdb src/ext3grep
GNU gdb 6.3-debian
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-linux"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) run --debug /dev/vg/backuppc
Starting program: /home/edu/src/svn/ext3grep-read-only-objdir/src/
ext3grep --debug /dev/vg/backuppc
RCFILE  : /home/edu/.libcwdrc:2: channels_default = on
RCFILE  : /home/edu/.libcwdrc:3: channels_off = malloc,bfd
RCFILE  :     Turned off MALLOC
RCFILE  :     Turned off BFD
RCFILE  : /home/edu/.libcwdrc:4: gdb = /usr/bin/gdb
RCFILE  : /home/edu/.libcwdrc:5: xterm = gnome-terminal --
geometry=165x24+0+0 -e "%s"
Running Revision: 95
No action specified; implying --superblock.

NOTICE  : Entering run_program()
Inodes count: 41959424
Blocks count: 83894272
Reserved blocks count: 1677885
Free blocks count: 8118556
Free inodes count: 41093528
First Data Block: 0
Block size: 4096
Fragment size: 4096
Number of blocks per group: 32768
Number of fragments per group: 32768
Number of inodes per group: 16384
Mount time: Sun Apr  6 17:08:58 2008
Write time: Tue May 13 19:14:27 2008
Mount count: 17
Maximal mount count: 21
Magic signature: 0xef53
File system state: 'Unmounted cleanly'
Size of inode structure: 128
Block group # of this superblock: 0
compatible feature set: HAS_JOURNAL
incompatible feature set: FILETYPE
readonly-compatible feature set: SPARSE_SUPER LARGE_FILE
Per group desc for online growth: 0
UUID of journal superblock: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
Inode number of journal file: 8
Device number of journal file: 0
Start of list of inodes to delete: 0
First metablock block group: 0

Program received signal SIGSEGV, Segmentation fault.
0x40356428 in vtable for __cxxabiv1::__si_class_type_info ()
   from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0x40356428 in vtable for __cxxabiv1::__si_class_type_info ()
   from /usr/lib/libstdc++.so.6
#1  0x400b8b38 in std::basic_ios<char, std::char_traits<char> >::widen
()
   from /usr/lib/libstdc++.so.5
#2  0x400e4761 in std::ostream::operator<< () from /usr/lib/libstdc+
+.so.5
#3  0x400e4c1d in std::ostream::operator<< () from /usr/lib/libstdc+
+.so.5
#4  0x08081fa9 in inode_mmap (group=0)
    at ../../ext3grep-read-only/src/ext3grep.cc:467
#5  0x0809ff3a in get_inode (inode=8)
    at ../../ext3grep-read-only/src/ext3grep.cc:578
#6  0x08083f00 in run_program ()
    at ../../ext3grep-read-only/src/ext3grep.cc:1382
#7  0x08087131 in main (argc=1, argv=0xbffffd5c)
    at ../../ext3grep-read-only/src/ext3grep.cc:2090


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlo Wood  
View profile
 More options May 14, 6:10 pm
From: Carlo Wood <ca...@alinoe.com>
Date: Thu, 15 May 2008 00:10:08 +0200
Local: Wed, May 14 2008 6:10 pm
Subject: Re: [ext3grep] Re: Assertion device.good right after "Loading journal descriptors... sorting..."
Hmm, a core dump in operator<< of a Dout() call..
must be some memory corruption somewhere.
I have no clue what caused that or where that happened.

In order to find this one would need to start to add
a LOT of extra (range checking) tests until you find
where something is wrong.

A logical first step would be to configure libcwd
with --enable-glibcxx_debug (and recompile+reinstall,
and then recompile ext3grep). And if that doesn't
tell anything (probably not) then run ext3grep
inside valgrind to see if that sees where some
memory error happens. Not that I think this will
help, but it's simply the first thing to try.

Note that one reason that ext3grep starts doing
very weird things is when your stage1/stage2 files
aren't up to date (ie, if the filesystem changed
since you created them). So... I suppose it would
also make sense to at least delete those once
again and rerun ext3grep to generate them again,
on the same and UNmounted partition.

--
Carlo Wood <ca...@alinoe.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eduardo  
View profile
 More options May 15, 8:40 am
From: eduardo <etrap...@gmail.com>
Date: Thu, 15 May 2008 05:40:39 -0700 (PDT)
Local: Thurs, May 15 2008 8:40 am
Subject: Re: Assertion device.good right after "Loading journal descriptors... sorting..."
I'm going to try to follow your steps.  In the meantime I did a strace
on the execution, --list --inode 2 and, right before the segfault (and
right after printing "sorting...") I found an llseek with a huge
number.  That llseek fails.

I copy part of the trace (without the gettimeofday and brk calls),
maybe that rings a bell or maybe you can tell me more or less where to
check in the code ...

_llseek(4, 31576064, [31576064], SEEK_SET) = 0
read(4, "\36\36\0\0\37\36\0\0 \36\0\0!\36\0\0\"\36\0\0#\36\0\0$"...,
8192) = 8192
_llseek(4, 6381568, [6381568], SEEK_SET) = 0
read(4, "\27\6\0\0\30\n\0\0\31\16\0\0\32\22\0\0\33\26\0\0\34\32"...,
8192) = 8192
_llseek(4, 31576064, [31576064], SEEK_SET) = 0
read(4, "\36\36\0\0\37\36\0\0 \36\0\0!\36\0\0\"\36\0\0#\36\0\0$"...,
8192) = 8192
write(1, " sorting...", 11 sorting...)             = 11
_llseek(4, 18446744071830503424, 0xbffff5dc, SEEK_SET) = -1 EINVAL
(Invalid argument)
write(1, "../../ext3grep-read-only/src/ext"..., 107../../ext3grep-read-
only/src/ext3grep.cc:1336: void load_meta_data(int): Assertion
`device.good()' failed.
) = 107
getpid()                                = 13879
kill(13879, SIGABRT)                    = 0
--- SIGABRT (Aborted) @ 0 (0) ---
+++ killed by SIGABRT (core dumped) +++


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Carlo Wood  
View profile
 More options May 15, 9:38 am
From: Carlo Wood <ca...@alinoe.com>
Date: Thu, 15 May 2008 15:38:48 +0200
Local: Thurs, May 15 2008 9:38 am
Subject: Re: [ext3grep] Re: Assertion device.good right after "Loading journal descriptors... sorting..."

On Thu, May 15, 2008 at 05:40:39AM -0700, eduardo wrote:
> I'm going to try to follow your steps.  In the meantime I did a strace
> on the execution, --list --inode 2 and, right before the segfault (and
> right after printing "sorting...") I found an llseek with a huge
> number.  That llseek fails.

Good idea... A device.good() fails assertion is probably always
a wrong seek. My guess would be that this is the seekg in get_block.
This would always be a value returned by block_to_offset, called with
a block number that is out of range. I suppose I should add an assertion
there that would have avoided this search.

Thus, change

static inline off_t block_to_offset(int block)
{
#ifdef CWDEBUG
  if (block > 83894272)              // Out of range for your case.
    Debug(attach_gdb());        // Open window with debugger.
#endif
  off_t offset = block;
  offset <<= block_size_log_;
  return offset;

}

Using attach_gdb() requires that your .libcwdrc file is correctly
setup. I'm using this:

gdb = /usr/bin/gdb
xterm = gnome-terminal --geometry=165x24-0+0 -e "%s"

in which case you need to have gnome-terminal installed (if you are running gnome
thus). [This only works if extgrep is NOT running inside gdb already: if you
want to skip a break point like this you have to quit, rather than continue gdb.]

Of course, you can also run ext3grep inside gdb and set the breakpoint
yourself, ie:

(gdb) b block_to_offset
(gdb) cond 1 block > 83894272
(gdb) r --arguments here ...

--
Carlo Wood <ca...@alinoe.com>


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
eduardo  
View profile
 More options May 15, 9:54 am
From: eduardo <etrap...@gmail.com>
Date: Thu, 15 May 2008 06:54:22 -0700 (PDT)
Local: Thurs, May 15 2008 9:54 am
Subject: Re: Assertion device.good right after "Loading journal descriptors... sorting..."
SOLVED!

I had not noticed this error message while linking:

/usr/bin/ld: warning: libstdc++.so.6, needed by /usr/lib/gcc-lib/i486-
linux-gnu/3.3.6/../../../libcwd.so, may conflict with libstdc++.so.5

Since libcwd was already packaged, I downloaded g++-4.1 and recompiled
and ... voilą, it works!  That's why there was an error on Dout.  It
seems that gcc3 links against libstdc++.so.5 and gcc4 against libstdc+
+.so.6, you cannot choose the library.

Maybe you could add a notice about it, I don't know ...

Thanks for your time.  Now it's time to see if I finally can recover
the information I need.  And, by the way, your document on ext3 is
impressive, great work, it should be linked from the ext3 FAQ.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google