• Bug#265964: Brash kernels crash bash (buggy process handling?)

    From Kingsley G. Morse Jr.@1:229/2 to All on Mon Aug 16 02:00:19 2004
    From: [email protected]

    Package: bash
    Version: 3.0-5
    Severity: normal
    Tags: sid

    Thanks for maintaining bash.

    It rocks.

    Under certain circumstances, bash crashes after
    upgrading the linux kernel from 2.4.19-aa1 to
    2.6.7-1-k7. The bug has been duplicated two other
    boxes with:

    a.) a custom compiled 2.6.7 kernel for AMD's
    k7 and

    b.) a 2.6.8 rc3 kernel for i486 on Slackware,
    version 10.

    It has also been duplicated with an earlier
    2.? version of bash.

    Although I suspect a bug in the kernel's process
    handling code, I reported this bug for bash first,
    because :

    a.) bash is crashing and

    b.) I expect the kernel guys will respond
    quicker if they know:

    i.) bash has been eliminated and ideally,

    ii.) their attention is directed to
    specific kernel code.

    A script that duplicates the bug follows.

    Feel free to let me know if you have trouble
    duplicating the problem. I'd like to get the
    kernel guys involved soon.

    Thanks,
    Kingsley
    ================== Begin script ====================
    #!/bin/bash

    # This script demonstrates how kernel version
    # 2.6.7-1-k7 causes bash to crash. Another person
    # duplicated the bug with a kernel that he
    # compiled and a third person duplicated the bug
    # with 2.6.8 rc3 on slackware version 10.
    # Although I suspect a bug in the kernel's process
    # handling code, I'll report this bug for bash
    # first, because it's bash that's crashing and I
    # expect the kernel guys will respond quicker if
    # they know bash has been eliminated and ideally,
    # we can direct them to more specific kernel code.
    # The bug didn't happen with 2.4.19-aa1. KGMJR
    # 8/15/2004.

    ####################################################
    # Check if required programs are installed ####################################################

    for application in xmessage xterm mutt gvim bash grep watch test; do
    if ! `which $application > /dev/null` ; then
    echo need to install $application
    echo It is in $(dpkg -S $application)
    exit 1
    fi
    done


    ######################################################
    # Check if a suspect version of the kernel is
    # installed
    ######################################################
    if ! uname -r | grep 2.6 > /dev/null; then
    echo This should be run under a 2.6 version of the linux kernel, ideally debian\'s version 2.6.7-1-k7.
    fi


    ####################################################
    # Create a mutt initialization file ####################################################
    echo "set editor='gvim -f -U /tmp/gvimrc'" > /tmp/muttrc


    ####################################################
    # Create gvimrc file
    ####################################################
    echo 'map <S-F3> :w!:!/tmp/script % &' > /tmp/gvimrc


    ####################################################
    # Create a bash (sub-)script that should abort. ####################################################
    cat > /tmp/script <<EOF
    #!/bin/bash

    echo "Got this far." > /tmp/log

    if ! echo "hello world" | grep "x" > /dev/null ; then
    echo "Got further(1)." >> /tmp/log
    else
    echo "Got further(2)." >> /tmp/log
    fi

    echo "Got to the end." >> /tmp/log
    EOF

    chmod 755 /tmp/script


    ####################################################
    # Watch how far the script gets. ####################################################
    xterm -e watch -n 1 "if test -f /tmp/log ; then cat /tmp/log; fi" &


    ####################################################
    # Instructions for how to duplicate the bug ####################################################

    xmessage "You'll need to have an email waiting for
    you to read. If you don't already have one, send
    an email to yourself now.

    Then, in mutt's xterm, press \"r\" and <enter> a
    few times to reply to the email.

    Once you are editing the reply in gvim, press
    shift-F3 and check the \"watch\" xterm to see how
    far the script got. Press shift-F3 a few times.
    It should duplicate the bug within 10 or so tries,
    in which case you'll see fewer than 3 lines in
    watch's xterm." &


    ####################################################
    # Run the scripts
    ####################################################
    rm /tmp/log 2>/dev/null
    xterm -e mutt -F /tmp/muttrc

    ================== End script ====================

    -- System Information:
    Debian Release: testing/unstable
    APT prefers unstable
    APT policy: (500, 'unstable')
    Architecture: i386 (i686)
    Kernel: Linux 2.6.7-1-k7
    Locale: LANG=C, LC_CTYPE=C

    Versions of packages bash depends on:
    ii base-files 3.0.8 Debian base system miscellaneous f ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an ii libncurses5 5.4-4 Shared libraries for terminal hand ii passwd 1:4.0.3-29 Change and administer password and

    -- no debconf information




    --
    To UNSUBSCRIBE, email to [email protected]
    with a subject of "unsubscribe". Trouble? Contact [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)