mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* xfs_db -c frag -r /dev/hda1 - Segmentation fault
       [not found] <4080C826.F4C53CD@dmministries.org>
@ 2005-10-23 11:39 ` Justin Piszcz
  2005-10-23 22:54   ` Nathan Scott
  0 siblings, 1 reply; 3+ messages in thread
From: Justin Piszcz @ 2005-10-23 11:39 UTC (permalink / raw)
  To: linux-xfs, linux-kernel; +Cc: debian-user

p34:~# xfs_db -c frag -r /dev/hda1
Segmentation fault
p34:~# xfs_db -c frag -r /dev/hde1
Segmentation fault
p34:~# xfs_db -c frag -r /dev/hdk1
Segmentation fault
p34:~#

Debian Etch, 2.6.13.4, stopped working a while ago, either before newer 
debian packages or a newer kernel, does anyone who uses Debian+XFS have 
this problem as well?

Towards the end of the strace:
munmap(0xb7fb6000, 4096)                = 0
open("/proc/meminfo", O_RDONLY)         = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0xb7fb6000
read(3, "MemTotal:      1035452 kB\nMemFre"..., 1024) = 598
close(3)                                = 0
munmap(0xb7fb6000, 4096)                = 0
rt_sigaction(SIGINT, {0x80628f4, [], 0}, NULL, 8) = 0
_llseek(4, 512, [512], SEEK_SET)        = 0
read(4, "XAGF\0\0\0\1\0\0\0\0\0:pn\0\0\0\1\0\0\0\2\0\0\0\0\0\0\0"..., 512) 
= 512
_llseek(4, 1024, [1024], SEEK_SET)      = 0
read(4, "XAGI\0\0\0\1\0\0\0\0\0:pn\0\0\3@\0\0\0\3\0\0\0\1\0\0\000"..., 
512) = 512
_llseek(4, 12288, [12288], SEEK_SET)    = 0
read(4, "IABT\0\0\0\r\377\377\377\377\377\377\377\377\0\0\0\200"..., 4096) 
= 4096
_llseek(4, 32768, [32768], SEEK_SET)    = 0
read(4, "INA\355\1\1\0\3\0\0\0\0\0\0\0\0\0\0\0\3\0\0\0\0\0\0\0\0"..., 
16384) = 16384
mmap2(NULL, 268443648, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
-1, 0) = 0xa7df7000
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++
p34:~#

Is this a kernel, XFS or Debian problem?

Thanks!

Justin.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xfs_db -c frag -r /dev/hda1 - Segmentation fault
  2005-10-23 11:39 ` xfs_db -c frag -r /dev/hda1 - Segmentation fault Justin Piszcz
@ 2005-10-23 22:54   ` Nathan Scott
  2005-10-23 23:40     ` Justin Piszcz
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Scott @ 2005-10-23 22:54 UTC (permalink / raw)
  To: Justin Piszcz; +Cc: linux-xfs, linux-kernel, debian-user

On Sun, Oct 23, 2005 at 07:39:34AM -0400, Justin Piszcz wrote:
> p34:~# xfs_db -c frag -r /dev/hda1
> Segmentation fault
> p34:~# xfs_db -c frag -r /dev/hde1
> Segmentation fault
> p34:~# xfs_db -c frag -r /dev/hdk1
> Segmentation fault
> p34:~#
> 
> Debian Etch, 2.6.13.4, stopped working a while ago, either before newer 
> debian packages or a newer kernel, does anyone who uses Debian+XFS have 
> this problem as well?

I see it too - this looks like an endian issue in xfs_db, this patch
should fix it (Works For Me).

cheers.

-- 
Nathan


Index: xfsprogs/db/frag.c
===================================================================
--- xfsprogs.orig/db/frag.c
+++ xfsprogs/db/frag.c
@@ -294,7 +294,7 @@ process_exinode(
 	xfs_bmbt_rec_32_t	*rp;
 
 	rp = (xfs_bmbt_rec_32_t *)XFS_DFORK_PTR(dip, whichfork);
-	process_bmbt_reclist(rp, XFS_DFORK_NEXTENTS(dip, whichfork), extmapp);
+	process_bmbt_reclist(rp, XFS_DFORK_NEXTENTS_HOST(dip, whichfork), extmapp);
 }
 
 static void
@@ -305,7 +305,7 @@ process_fork(
 	extmap_t	*extmap;
 	int		nex;
 
-	nex = XFS_DFORK_NEXTENTS(dip, whichfork);
+	nex = XFS_DFORK_NEXTENTS_HOST(dip, whichfork);
 	if (!nex)
 		return;
 	extmap = extmap_alloc(nex);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: xfs_db -c frag -r /dev/hda1 - Segmentation fault
  2005-10-23 22:54   ` Nathan Scott
@ 2005-10-23 23:40     ` Justin Piszcz
  0 siblings, 0 replies; 3+ messages in thread
From: Justin Piszcz @ 2005-10-23 23:40 UTC (permalink / raw)
  To: Nathan Scott; +Cc: linux-xfs, linux-kernel, debian-user

Thanks, I will give this a try.


On Mon, 24 Oct 2005, Nathan Scott wrote:

> On Sun, Oct 23, 2005 at 07:39:34AM -0400, Justin Piszcz wrote:
>> p34:~# xfs_db -c frag -r /dev/hda1
>> Segmentation fault
>> p34:~# xfs_db -c frag -r /dev/hde1
>> Segmentation fault
>> p34:~# xfs_db -c frag -r /dev/hdk1
>> Segmentation fault
>> p34:~#
>>
>> Debian Etch, 2.6.13.4, stopped working a while ago, either before newer
>> debian packages or a newer kernel, does anyone who uses Debian+XFS have
>> this problem as well?
>
> I see it too - this looks like an endian issue in xfs_db, this patch
> should fix it (Works For Me).
>
> cheers.
>
> -- 
> Nathan
>
>
> Index: xfsprogs/db/frag.c
> ===================================================================
> --- xfsprogs.orig/db/frag.c
> +++ xfsprogs/db/frag.c
> @@ -294,7 +294,7 @@ process_exinode(
> 	xfs_bmbt_rec_32_t	*rp;
>
> 	rp = (xfs_bmbt_rec_32_t *)XFS_DFORK_PTR(dip, whichfork);
> -	process_bmbt_reclist(rp, XFS_DFORK_NEXTENTS(dip, whichfork), extmapp);
> +	process_bmbt_reclist(rp, XFS_DFORK_NEXTENTS_HOST(dip, whichfork), extmapp);
> }
>
> static void
> @@ -305,7 +305,7 @@ process_fork(
> 	extmap_t	*extmap;
> 	int		nex;
>
> -	nex = XFS_DFORK_NEXTENTS(dip, whichfork);
> +	nex = XFS_DFORK_NEXTENTS_HOST(dip, whichfork);
> 	if (!nex)
> 		return;
> 	extmap = extmap_alloc(nex);
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-10-23 23:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <4080C826.F4C53CD@dmministries.org>
2005-10-23 11:39 ` xfs_db -c frag -r /dev/hda1 - Segmentation fault Justin Piszcz
2005-10-23 22:54   ` Nathan Scott
2005-10-23 23:40     ` Justin Piszcz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®