Bug 701157 - [abrt] ksh-20110208-3.fc14: strcmp: Process /bin/ksh was killed by signal 11 (SIGSEGV)
Summary: [abrt] ksh-20110208-3.fc14: strcmp: Process /bin/ksh was killed by signal 11 ...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ksh
Version: 14
Hardware: i686
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michal Hlavinka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c31c8656eff19370386946982d0...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-01 17:27 UTC by jd1008
Modified: 2012-04-02 14:48 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-02 14:48:05 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (8.12 KB, text/plain)
2011-05-01 17:27 UTC, jd1008
no flags Details

Description jd1008 2011-05-01 17:27:14 UTC
abrt version: 1.1.18
architecture: i686
Attached file: backtrace, 8314 bytes
cmdline: -ksh
comment: See script above.
component: ksh
Attached file: coredump, 729088 bytes
crash_function: strcmp
executable: /bin/ksh
kernel: 2.6.37.4-1.fc14.i686
package: ksh-20110208-3.fc14
rating: 4
reason: Process /bin/ksh was killed by signal 11 (SIGSEGV)
release: Fedora release 14 (Laughlin)
time: 1304270578
uid: 1008

How to reproduce
-----
From the command line I typed the following commands (script, actually)

typeset -fx sizeof

function sizeof
{
        integer s
        s=`/bin/ls -l "$1" | awk '{ print $5 }'`
        return s
}

integer max
integer tsize
integer n
max=4718582000
tsize=0
n=0
flist=list$n
find dir_x  -type f | while read f; do
        size=`sizeof "$f"`
        tsize+=$size
        if [ $tsize -gt $max ]; then
                n+=1
                flist=list$n
                tsize=$size
        fi
        echo "$f" >> $flist
done

It crashed when I pressed the CR key after typing done.

Comment 1 jd1008 2011-05-01 17:27:16 UTC
Created attachment 496083 [details]
File: backtrace

Comment 2 Michal Hlavinka 2011-05-02 14:22:43 UTC
I tried to reproduce this bug, but without any success. Are you able to reproduce it at will? Is dir_x somehow special? Extra big? Files with special encoding or something?

Comment 3 jd1008 2011-05-02 16:28:04 UTC
(In reply to comment #2)
> I tried to reproduce this bug, but without any success. Are you able to
> reproduce it at will?
Yes! Absolutely!

> Is dir_x somehow special?
It is within a vfat filesystem
> Extra big?
60+ GB.
> Files with special encoding or something?
Contains media files and some text files describing the media files.
The media files are mostly mp3, with a smattering of flac, mp4, flash.

Comment 4 jd1008 2011-05-02 16:50:24 UTC
I do not know what was causing it,
but I modified the script, and now it all works just fine.
Here is the modified script:


typeset -fx sizeof
integer __fisize__
__fsize__=0
export __fsize__
function sizeof
{
        __fsize__=`/bin/ls -l "$1" | awk '{ print $5 }'`
}

integer max
integer tsize
integer n
integer size
max=4718582000
tsize=0
size=0
n=0
flist=list$n
rm -rf list*
find dir_x -type f | while read f; do
        sizeof "$f"
        tsize+=$__fsize__
        echo size = $__fsize__   tsize = $tsize    max = $max    flist = $flist
        if [ $tsize -gt $max ]; then
                n+=1
                flist=list$n
                tsize=$__fsize__
        fi
        echo "$f" >> $flist
done


I had thought that when a kshell function returns a value,
that that value should be returned to the caller. 
It seems that that is not the case.
It seems that ksh funcs can no longer return a value.
To test that,  I created a simple function on the command line:

function xx
{
         return 0
}

and my shell immediately exited and that kill my gnome terminal.

So, I changed the function sizeof
and made it to export the variable __fsize__ and let the caller
simply use  $__fsize__
That fixed the problem.

PS: I am using ksh-20110208-3.fc14.i686


Thanx

Comment 5 Michal Hlavinka 2011-05-11 13:07:31 UTC
I've tried it with huge directories, but it was working fine.

Could you try whether updated package works for you?

http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/

you can update ksh using following command (as root):

rpm -Fvh http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/ksh-debuginfo-20110505-1.fc14.i686.rpm http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/ksh-20110505-1.fc14.i686.rpm

Comment 6 jd1008 2011-05-11 16:14:23 UTC
(In reply to comment #5)
> I've tried it with huge directories, but it was working fine.
> 
> Could you try whether updated package works for you?
> 
> http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/
> 
> you can update ksh using following command (as root):
> 
> rpm -Fvh
> http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/ksh-debuginfo-20110505-1.fc14.i686.rpm
> http://kojipkgs.fedoraproject.org/packages/ksh/20110505/1.fc14/i686/ksh-20110505-1.fc14.i686.rpm

Could you please tell me where I can get the koji .repo files?
That way, I can update with yum.

Comment 7 Michal Hlavinka 2011-05-12 06:28:14 UTC
There are no repo files for koji. Buildsystem contains tons of packages where new packages are created every few minutes and old ones deleted. Also not all packages that maintainer builds should be used by users. So there is not a such repository. When using packages from koji, you can:
a) use rpm -Uvh / -Fvh with links to rpms

b) download packages manually and use rpm -Uvh / -Fvh package1.rpm package2.rpm ...

c) download packages manually and use: yum localupdate --nogpgcheck package1.rpm package2.rpm ...

Anyway, this time, I've pushed this version to updates testing repository, because I've verified it fixes different bug, so you can use:

yum update --enablerepo=updates-testing ksh

but it'll take a few hours before this package gets in repository and mirrors get synced

Comment 8 Michal Hlavinka 2012-04-02 14:48:05 UTC
Needinfo state for a loong time. Also Fedora 14 is no longer supported. Closing.


Note You need to log in before you can comment on or make changes to this bug.