Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 364609

Summary: Statically built sys-fs/jfsutils-1.1.14 crashes
Product: Gentoo Linux Reporter: a_tevelev
Component: [OLD] UnspecifiedAssignee: Gentoo Kernel Miscellaneous <kernel-misc>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: emerge --info
backtrace
backtrace
core

Description a_tevelev 2011-04-23 19:23:13 UTC
Statically built sys-fs/jfsutils-1.1.14 crashes with segmentation fault on some JSF systems.

Reproducible: Sometimes

Steps to Reproduce:
1. Compile sys-fs/jfsutils-1.1.14 with 'static' file enabled.
2. Execute 'fsck.jfs -vf /dev/sda1' where /dev/sda1 is a drvie with a JFS filesystem. 

Actual Results:  
On some partitions it is always successful. On other partitions it always fails with the following message:

"fsck from util-linux-ng 2.18
fsck.jfs version 1.1.14, 06-Apr-2009
processing started: 4/23/2011 15.8.31
The current device is:  /dev/sda1
Open(...READ/WRITE EXCLUSIVE...) returned rc = 0
Primary superblock is valid.
The type of file system for the device is JFS.
Block size in bytes:  4096
Filesystem size in blocks:  8388608
**Phase 0 - Replay Journal Log
LOGREDO:  Log already redone!
logredo returned rc = 0
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
Warning... fsck.jfs for device /dev/sda1 exited with signal 11."

The following error is found in dmesg:

"fsck.jfs[2341] general protection ip:454fbf sp:3c404879af8 error:0 in jfs_fsck[400000+d6000]
grsec: From 192.168.1.80: Segmentation fault occurred at (nil) in /sbin/jfs_fsck[fsck.jfs:2341] uid/euid:0/0 gid/egid:0/0, parent /sbin/fsck[fsck:2340] uid/euid:0/0 gid/egid:0/0"


Expected Results:  
It completes successfully.

It is successful on some partitions and fails on others.

If it fails on a given partition, it always fails on it.

If sys-fs/jfsutils-1.1.14 is rebuilt without "static" flag, it is successful even on partitions it crashed on before.
Comment 1 a_tevelev 2011-04-23 19:24:49 UTC
Created attachment 270977 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2011-04-25 20:31:22 UTC
A gdb backtrace would be nice.
Comment 3 a_tevelev 2011-05-01 02:25:50 UTC
Created attachment 271699 [details]
backtrace
Comment 4 a_tevelev 2011-05-01 02:27:26 UTC
# gdb ~/jfs_fsck.static.debug 
GNU gdb (Gentoo 7.2 p1) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /root/jfs_fsck.static.debug...done.
(gdb) set args -f /dev/lvm-base/usr
(gdb) run
Starting program: /root/jfs_fsck.static.debug -f /dev/lvm-a/usr
Warning:
Cannot insert breakpoint -1.
Error accessing memory address 0x493860: Input/output error.

(gdb) set logging file /tmp/backtrace.log
(gdb) set logging on
Copying output to /tmp/backtrace.log.
(gdb) bt
#0  0x0000000000400200 in _start ()
(gdb) set logging off
Done logging to /tmp/backtrace.log.
(gdb) quit
A debugging session is active.

        Inferior 1 [process 2265] will be killed.

Quit anyway? (y or n) y
Comment 5 a_tevelev 2011-05-01 02:32:34 UTC
# ~/jfs_fsck.static.debug -f /dev/lvm-a/usr 
/root/jfs_fsck.static.debug version 1.1.14, 06-Apr-2009
processing started: 4/30/2011 22.29.12
The current device is:  /dev/lvm-base/usr
Block size in bytes:  4096
Filesystem size in blocks:  8388608
**Phase 0 - Replay Journal Log
**Phase 1 - Check Blocks, Files/Directories, and  Directory Entries
Segmentation fault (core dumped)
Comment 6 a_tevelev 2011-05-01 02:33:53 UTC
Created attachment 271701 [details]
backtrace
Comment 7 a_tevelev 2011-05-01 02:38:24 UTC
Created attachment 271703 [details]
core
Comment 8 Tim Harder gentoo-dev 2011-05-18 20:21:13 UTC
Does this occur with sys-fs/jfsutils-1.1.15 as well?
Comment 9 Tim Harder gentoo-dev 2011-05-18 20:24:19 UTC
(In reply to comment #8)
> Does this occur with sys-fs/jfsutils-1.1.15 as well?

To answer myself, this should be fixed in jfsutils-1.1.15 (see bug #353233).

*** This bug has been marked as a duplicate of bug 353233 ***