I have looked at the 3 coredumps, and it is always the same type of
crash. The program terminated with an abort signal (SIGABRT). In this
case SIGABRT is called by libc and other libraries to abort the program
due to error.

# xfsprogs: logprint/log_misc.c
---
default: {
xlog_panic(_("xlog_print_trans_inode: illegal inode type"));
}
}
return 0;
} /* xlog_print_trans_inode */

---

# gdb - post-crash analysis
---
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `xfs_logprint -c /dev/mapper/image-glance'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f534e0dfc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
56      ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

(gdb) bt
#0 0x00007f534e0dfc37 in __GI_raise (sig=sig@entry=6) at 
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1 0x00007f534e0e3028 in __GI_abort () at abort.c:89
#2 0x00000000004323e1 in xlog_panic (fmt=<optimized out>) at util.c:129
#3 0x000000000040447e in xlog_print_trans_inode (ptr=ptr@entry=0x7fff4a571798, 
len=<optimized out>, i=i@entry=0x7fff4a571794, num_ops=num_ops@entry=68) at 
log_misc.c:748
#4 0x0000000000404cf9 in xlog_print_record (fd=<optimized out>, num_ops=68, 
len=<optimized out>, read_type=<optimized out>, partial_buf=<optimized out>, 
rhead=<optimized out>, xhdrs=0x0) at log_misc.c:984
#5 0x0000000000404f49 in xfs_log_print (log=log@entry=0x7fff4a571aa0, 
fd=fd@entry=3, print_block_start=print_block_start@entry=-1) at log_misc.c:1349
#6 0x0000000000401eba in main (argc=<optimized out>, argv=<optimized out>) at 
logprint.c:241

(gdb) frame 3
#3 0x000000000040447e in xlog_print_trans_inode (ptr=ptr@entry=0x7fff4a571798, 
len=<optimized out>, i=i@entry=0x7fff4a571794, num_ops=num_ops@entry=68) at 
log_misc.c:748
748     log_misc.c: No such file or directory.

(gdb) p *f
$1 = {ilf_type = 4667, ilf_size = 4, ==>ilf_fields = 133<==, ilf_asize = 16, 
ilf_dsize = 16, ilf_ino = 21772003, ilf_u = {ilfu_rdev = 0, ilfu_uuid = '\000' 
<repeats 15 times>}, ilf_blkno = 7740272, 
ilf_len = 16, ilf_boffset = 768}
---

It seems like the "ilf_fields" value is outside the range of what
xfsprogs is expecting too. Forcing the code to pick the default:
statement, display the error and then xlog_panic().

There is an upstream commit that does a rework of the function
xlog_print_trans_inode() found in frame #3 to handle more than one field
type set (f->ilf_fields).

I have strong believe this rework will fix the actual situation.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1763086

Title:
  xfs_logprint  can't handle multiply-logged inode fields

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/1763086/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to