* [PATCH] xfsdump: don't put null inode
@ 2008-10-11 4:29 Eric Sandeen
2008-10-11 4:32 ` [PATCH] xfs_db: " Eric Sandeen
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2008-10-11 4:29 UTC (permalink / raw)
To: xfs-oss; +Cc: John Willis
John Willis pointed this out:
$ sudo xfs_db -x /dev/evms/RAID5-SATA-1
cache_node_purge: refcount was 1, not zero (node=0x80dd660)
xfs_db: cannot read root inode (22)
cache_node_purge: refcount was 1, not zero (node=0x80e0008)
xfs_db: cannot read realtime bitmap inode (22)
Segmentation fault
it dies when pthread code gets a null ptr, like this:
(gdb) bt
#0 0x0000003ef1c08309 in pthread_mutex_lock () from /lib64/libpthread.so.0
#1 0x000000000044f5af in cache_node_put (cache=0x25a2030, node=0x0) at cache.c:368
#2 0x000000000041ff7e in libxfs_mount (mp=0x0, sb=<value optimized out>, dev=<value optimized out>, logdev=<value optimized out>,
rtdev=<value optimized out>, flags=1) at init.c:680
#3 0x0000000000416157 in init (argc=2, argv=0x7fffd9e19798) at init.c:125
#4 0x000000000041635a in main (argc=48, argv=0x7fffd9e19798) at init.c:153
(gdb)
when reading the root inode fails, and we try to libxfs_iput it anyway.
The following seems to fix it ...
-Eric
Index: xfsprogs/libxfs/init.c
===================================================================
--- xfsprogs.orig/libxfs/init.c
+++ xfsprogs/libxfs/init.c
@@ -677,7 +677,8 @@ libxfs_mount(
ASSERT(mp->m_rootip != NULL);
}
if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) {
- libxfs_iput(mp->m_rootip, 0);
+ if (mp->m_rootip)
+ libxfs_iput(mp->m_rootip, 0);
return NULL;
}
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfs_db: don't put null inode
2008-10-11 4:29 [PATCH] xfsdump: don't put null inode Eric Sandeen
@ 2008-10-11 4:32 ` Eric Sandeen
2008-10-12 23:32 ` Mark Goodwin
0 siblings, 1 reply; 3+ messages in thread
From: Eric Sandeen @ 2008-10-11 4:32 UTC (permalink / raw)
To: xfs-oss; +Cc: John Willis
Ugh subject should be xfs_db of course :/
Eric Sandeen wrote:
> John Willis pointed this out:
>
> $ sudo xfs_db -x /dev/evms/RAID5-SATA-1
> cache_node_purge: refcount was 1, not zero (node=0x80dd660)
> xfs_db: cannot read root inode (22)
> cache_node_purge: refcount was 1, not zero (node=0x80e0008)
> xfs_db: cannot read realtime bitmap inode (22)
> Segmentation fault
>
> it dies when pthread code gets a null ptr, like this:
>
> (gdb) bt
> #0 0x0000003ef1c08309 in pthread_mutex_lock () from /lib64/libpthread.so.0
> #1 0x000000000044f5af in cache_node_put (cache=0x25a2030, node=0x0) at cache.c:368
> #2 0x000000000041ff7e in libxfs_mount (mp=0x0, sb=<value optimized out>, dev=<value optimized out>, logdev=<value optimized out>,
> rtdev=<value optimized out>, flags=1) at init.c:680
> #3 0x0000000000416157 in init (argc=2, argv=0x7fffd9e19798) at init.c:125
> #4 0x000000000041635a in main (argc=48, argv=0x7fffd9e19798) at init.c:153
> (gdb)
>
> when reading the root inode fails, and we try to libxfs_iput it anyway.
>
> The following seems to fix it ...
>
> -Eric
>
> Index: xfsprogs/libxfs/init.c
> ===================================================================
> --- xfsprogs.orig/libxfs/init.c
> +++ xfsprogs/libxfs/init.c
> @@ -677,7 +677,8 @@ libxfs_mount(
> ASSERT(mp->m_rootip != NULL);
> }
> if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) {
> - libxfs_iput(mp->m_rootip, 0);
> + if (mp->m_rootip)
> + libxfs_iput(mp->m_rootip, 0);
> return NULL;
> }
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] xfs_db: don't put null inode
2008-10-11 4:32 ` [PATCH] xfs_db: " Eric Sandeen
@ 2008-10-12 23:32 ` Mark Goodwin
0 siblings, 0 replies; 3+ messages in thread
From: Mark Goodwin @ 2008-10-12 23:32 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss, John Willis
Thanks Eric (and John). Barry, can you please rv and pull this into libxfs
Cheers
Eric Sandeen wrote:
> Ugh subject should be xfs_db of course :/
>
> Eric Sandeen wrote:
>> John Willis pointed this out:
>>
>> $ sudo xfs_db -x /dev/evms/RAID5-SATA-1
>> cache_node_purge: refcount was 1, not zero (node=0x80dd660)
>> xfs_db: cannot read root inode (22)
>> cache_node_purge: refcount was 1, not zero (node=0x80e0008)
>> xfs_db: cannot read realtime bitmap inode (22)
>> Segmentation fault
>>
>> it dies when pthread code gets a null ptr, like this:
>>
>> (gdb) bt
>> #0 0x0000003ef1c08309 in pthread_mutex_lock () from /lib64/libpthread.so.0
>> #1 0x000000000044f5af in cache_node_put (cache=0x25a2030, node=0x0) at cache.c:368
>> #2 0x000000000041ff7e in libxfs_mount (mp=0x0, sb=<value optimized out>, dev=<value optimized out>, logdev=<value optimized out>,
>> rtdev=<value optimized out>, flags=1) at init.c:680
>> #3 0x0000000000416157 in init (argc=2, argv=0x7fffd9e19798) at init.c:125
>> #4 0x000000000041635a in main (argc=48, argv=0x7fffd9e19798) at init.c:153
>> (gdb)
>>
>> when reading the root inode fails, and we try to libxfs_iput it anyway.
>>
>> The following seems to fix it ...
>>
>> -Eric
>>
>> Index: xfsprogs/libxfs/init.c
>> ===================================================================
>> --- xfsprogs.orig/libxfs/init.c
>> +++ xfsprogs/libxfs/init.c
>> @@ -677,7 +677,8 @@ libxfs_mount(
>> ASSERT(mp->m_rootip != NULL);
>> }
>> if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) {
>> - libxfs_iput(mp->m_rootip, 0);
>> + if (mp->m_rootip)
>> + libxfs_iput(mp->m_rootip, 0);
>> return NULL;
>> }
>>
>>
>>
>
>
--
Mark Goodwin markgw@sgi.com
Engineering Manager for XFS and PCP Phone: +61-3-99631937
SGI Australian Software Group Cell: +61-4-18969583
-------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-10-12 22:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-11 4:29 [PATCH] xfsdump: don't put null inode Eric Sandeen
2008-10-11 4:32 ` [PATCH] xfs_db: " Eric Sandeen
2008-10-12 23:32 ` Mark Goodwin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox